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.
This commit is contained in:
Adrien Plazas 2019-01-09 21:06:33 +01:00 committed by Georges Basile Stavracas Neto
parent 64ac458804
commit dbfc3e4c7a

View file

@ -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",