aboutsummaryrefslogtreecommitdiff
path: root/libindicate/indicator.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-01-12 16:17:25 -0600
committerTed Gould <ted@canonical.com>2009-01-12 16:17:25 -0600
commit3d55f9063f2ee1a1a472f5a7b0b4bfa4a798b1f9 (patch)
treea878282484487ac32b9cf6af56e27588fbacfed9 /libindicate/indicator.c
parentb687b3aefb3b7a231d18dea06ca511b990049487 (diff)
downloadlibayatana-indicator-3d55f9063f2ee1a1a472f5a7b0b4bfa4a798b1f9.tar.gz
libayatana-indicator-3d55f9063f2ee1a1a472f5a7b0b4bfa4a798b1f9.tar.bz2
libayatana-indicator-3d55f9063f2ee1a1a472f5a7b0b4bfa4a798b1f9.zip
Basic show hide support in the indicator
Diffstat (limited to 'libindicate/indicator.c')
-rw-r--r--libindicate/indicator.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/libindicate/indicator.c b/libindicate/indicator.c
index 3e168c9..43eac55 100644
--- a/libindicate/indicator.c
+++ b/libindicate/indicator.c
@@ -33,6 +33,20 @@ indicate_indicator_class_init (IndicateIndicatorClass * class)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+ signals[HIDE] = g_signal_new(INDICATE_INDICATOR_SIGNAL_HIDE,
+ G_TYPE_FROM_CLASS(class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(IndicateIndicatorClass, hide),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+ signals[SHOW] = g_signal_new(INDICATE_INDICATOR_SIGNAL_SHOW,
+ G_TYPE_FROM_CLASS(class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(IndicateIndicatorClass, show),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
return;
}
@@ -70,14 +84,16 @@ indicate_indicator_new (void)
void
indicate_indicator_show (IndicateIndicator * indicator)
{
+ if (indicator->server) {
+ indicate_server_show(indicator->server);
+ }
-
+ g_signal_emit(indicator, signals[SHOW], NULL, G_TYPE_NONE);
}
void
indicate_indicator_hide (IndicateIndicator * indicator)
{
-
-
+ g_signal_emit(indicator, signals[HIDE], NULL, G_TYPE_NONE);
}