[gnome-control-center] panel: Add the sidebar-activated signal



commit dbfc3e4c7ad514185f59c75a5496169a4455aa4c
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed Jan 9 21:06:33 2019 +0100

    panel: Add the sidebar-activated signal
    
    This is necessary for the application panel to warn that an element of
    its sidebar has been activated so the window can focus on it when the
    window will use a leaflet.

 shell/cc-panel.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
---
diff --git a/shell/cc-panel.c b/shell/cc-panel.c
index d3c6151de..8a299c681 100644
--- a/shell/cc-panel.c
+++ b/shell/cc-panel.c
@@ -53,6 +53,12 @@ typedef struct
 
 G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (CcPanel, cc_panel, GTK_TYPE_BIN)
 
+enum
+{
+  SIDEBAR_ACTIVATED,
+  LAST_SIGNAL
+};
+
 enum
 {
   PROP_0,
@@ -63,6 +69,8 @@ enum
 
 static GParamSpec *properties [N_PROPS];
 
+static guint signals [LAST_SIGNAL] = { 0 };
+
 static void
 cc_panel_set_property (GObject      *object,
                        guint         prop_id,
@@ -152,6 +160,13 @@ cc_panel_class_init (CcPanelClass *klass)
   object_class->set_property = cc_panel_set_property;
   object_class->finalize = cc_panel_finalize;
 
+  signals[SIDEBAR_ACTIVATED] = g_signal_new ("sidebar-activated",
+                                             G_TYPE_FROM_CLASS (object_class),
+                                             G_SIGNAL_RUN_LAST,
+                                             0, NULL, NULL,
+                                             g_cclosure_marshal_VOID__VOID,
+                                             G_TYPE_NONE, 0);
+
   properties[PROP_SHELL] = g_param_spec_object ("shell",
                                                 "Shell",
                                                 "Shell the Panel resides in",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]