diff options
author | Ted Gould <ted@gould.cx> | 2010-08-11 13:43:36 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-08-11 13:43:36 -0500 |
commit | 1fbc480b06ae2596b2644134d3c906ef3ba15f8e (patch) | |
tree | 0a5dcd80f9eb98ba1a29cfbaa7054604c1f71e60 | |
parent | ea682be679779ba60d98393f2d613e8c980b3fd2 (diff) | |
download | ayatana-indicator-application-1fbc480b06ae2596b2644134d3c906ef3ba15f8e.tar.gz ayatana-indicator-application-1fbc480b06ae2596b2644134d3c906ef3ba15f8e.tar.bz2 ayatana-indicator-application-1fbc480b06ae2596b2644134d3c906ef3ba15f8e.zip |
Adding in a wrapper signal
-rw-r--r-- | src/app-indicator.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/app-indicator.c b/src/app-indicator.c index 3f7c85f..e174e57 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -92,6 +92,7 @@ enum { NEW_ATTENTION_ICON, NEW_STATUS, NEW_LABEL, + X_NEW_LABEL, CONNECTION_CHANGED, NEW_ICON_THEME_PATH, LAST_SIGNAL @@ -135,6 +136,9 @@ enum { #define APP_INDICATOR_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), APP_INDICATOR_TYPE, AppIndicatorPrivate)) +/* Signal wrapper */ +#define APP_INDICATOR_SIGNAL_X_NEW_LABEL ("x-ayatana-" APP_INDICATOR_SIGNAL_NEW_LABEL) + /* Default Path */ #define DEFAULT_ITEM_PATH "/org/ayatana/NotificationItem" @@ -426,6 +430,23 @@ app_indicator_class_init (AppIndicatorClass *klass) G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); /** + AppIndicator::x-ayatana-new-label: + @arg0: The #AppIndicator object + @arg1: The string for the label + @arg1: The string for the guide + + Wrapper for #AppIndicator::new-label, please don't use this signal + use the other one. + */ + signals[X_NEW_LABEL] = g_signal_new (APP_INDICATOR_SIGNAL_X_NEW_LABEL, + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AppIndicatorClass, new_label), + NULL, NULL, + _application_service_marshal_VOID__STRING_STRING, + G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); + + /** AppIndicator::connection-changed: @arg0: The #AppIndicator object @arg1: Whether we're connected or not @@ -811,6 +832,10 @@ signal_label_change_idle (gpointer user_data) priv->label != NULL ? priv->label : "", priv->label_guide != NULL ? priv->label_guide : "", TRUE); + g_signal_emit(G_OBJECT(self), signals[X_NEW_LABEL], 0, + priv->label != NULL ? priv->label : "", + priv->label_guide != NULL ? priv->label_guide : "", + TRUE); priv->label_change_idle = 0; |