From d123c5ac2b2379360c92fddda5998b1fe667e80b Mon Sep 17 00:00:00 2001 From: Sam Day Date: Sat, 25 May 2024 15:48:04 +0200 Subject: [PATCH 1/2] shell: Register plugin extension points in constructor This makes it possible for PhoshShell subclasses to register lockscreen and quick-settings custom widgets. It introduces an implicit dependency that extension points will not be looked up until the shell setup_idle callback. Part-of: --- src/shell.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shell.c b/src/shell.c index c9ec5e533..43e759d87 100644 --- a/src/shell.c +++ b/src/shell.c @@ -66,6 +66,7 @@ #include "password-entry.h" #include "phosh-private-client-protocol.h" #include "phosh-wayland.h" +#include "plugin-loader.h" #include "polkit-auth-agent.h" #include "portal-access-manager.h" #include "proximity.h" @@ -1296,6 +1297,9 @@ phosh_shell_init (PhoshShell *self) PhoshShellPrivate *priv = phosh_shell_get_instance_private (self); GtkSettings *gtk_settings; + g_io_extension_point_register (PHOSH_EXTENSION_POINT_LOCKSCREEN_WIDGET); + g_io_extension_point_register (PHOSH_EXTENSION_POINT_QUICK_SETTING_WIDGET); + debug_flags = g_parse_debug_string(g_getenv ("PHOSH_DEBUG"), debug_keys, G_N_ELEMENTS (debug_keys)); -- GitLab From 03f45b6f19e805146dc333acc7f38f23d6f8b9fe Mon Sep 17 00:00:00 2001 From: Sam Day Date: Wed, 4 Sep 2024 10:51:40 +0200 Subject: [PATCH 2/2] shell: Minor formatting fix in phosh_shell_init Part-of: --- src/shell.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shell.c b/src/shell.c index 43e759d87..cf942adf2 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1300,9 +1300,9 @@ phosh_shell_init (PhoshShell *self) g_io_extension_point_register (PHOSH_EXTENSION_POINT_LOCKSCREEN_WIDGET); g_io_extension_point_register (PHOSH_EXTENSION_POINT_QUICK_SETTING_WIDGET); - debug_flags = g_parse_debug_string(g_getenv ("PHOSH_DEBUG"), - debug_keys, - G_N_ELEMENTS (debug_keys)); + debug_flags = g_parse_debug_string (g_getenv ("PHOSH_DEBUG"), + debug_keys, + G_N_ELEMENTS (debug_keys)); gtk_settings = gtk_settings_get_default (); g_object_set (G_OBJECT (gtk_settings), "gtk-application-prefer-dark-theme", TRUE, NULL); -- GitLab