diff options
author | Adrien Plazas <kekun.plazas@laposte.net> | 2019-01-09 21:06:33 +0100 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2019-01-21 21:53:21 +0000 |
commit | dbfc3e4c7ad514185f59c75a5496169a4455aa4c (patch) | |
tree | fa698d47990c8053d06db6e5548fa7bd36cfb8bd /shell | |
parent | 64ac458804e51be6e8096e3cd8f50b973d9b31ab (diff) | |
download | gnome-control-center-dbfc3e4c7ad514185f59c75a5496169a4455aa4c.tar.gz |
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.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/cc-panel.c | 15 |
1 files changed, 15 insertions, 0 deletions
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 @@ -55,6 +55,12 @@ G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (CcPanel, cc_panel, GTK_TYPE_BIN) enum { + SIDEBAR_ACTIVATED, + LAST_SIGNAL +}; + +enum +{ PROP_0, PROP_SHELL, PROP_PARAMETERS, @@ -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", |