Fix crash

Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
Vasiliy Doylov 2025-07-11 05:30:11 +03:00
parent 6676905485
commit 305dbcb1dd
4 changed files with 30 additions and 21 deletions

28
src/entrypoints.vala Normal file
View file

@ -0,0 +1,28 @@
/*
* Copyright (C) 2025 The Phosh Developers
* Copyright (C) 2025 Vasiliy Doylov <nekocwd@mainlining.org>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Author: Vasiliy Doylov <nekocwd@mainlining.org>
* Author: Guido Günther <agx@sigxcpu.org>
*/
using Phosh;
using GLib;
namespace MediaPlayer {
public class QuickSetting : Phosh.QuickSetting {
construct {
child = new Utils.PlayerReplacer ();
visible = false;
}
}
public class LockScreen : Gtk.Box {
construct {
add (new Utils.PlayerReplacer ());
add (new Gtk.Label ("That's a placeholder label. Your player now replaced"));
visible = false;
}
}
}

View file

@ -20,7 +20,7 @@ namespace MediaPlayer {
"media-player",
10);
IOExtensionPoint.implement ("phosh-lockscreen-widget",
typeof (Utils.PlayerReplacer),
typeof (LockScreen),
"media-player",
10);
if (css == null) {

View file

@ -22,9 +22,9 @@ resources = gnome.compile_resources(
sources = files(
'color.vala',
'entrypoints.vala',
'extension.vala',
'player.vala',
'qs.vala',
'utils.vala',
)

View file

@ -1,19 +0,0 @@
/*
* Copyright (C) 2025 The Phosh Developers
* Copyright (C) 2025 Vasiliy Doylov <nekocwd@mainlining.org>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Author: Vasiliy Doylov <nekocwd@mainlining.org>
* Author: Guido Günther <agx@sigxcpu.org>
*/
using Phosh;
using GLib;
public class MediaPlayer.QuickSetting : Phosh.QuickSetting {
construct {
child = new Utils.PlayerReplacer ();
}
}