aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-08-03 15:55:21 -0500
committerTed Gould <ted@gould.cx>2010-08-03 15:55:21 -0500
commitfc9d5d4f762493d0b8378b12ac6c8451e5b9683b (patch)
tree01575b20e87d2e63621108a33f8fbddcc990faf8 /src
parente0f472f173a2bb2931f7ddbb1c5bd3d25af5f462 (diff)
downloadlibayatana-appindicator-fc9d5d4f762493d0b8378b12ac6c8451e5b9683b.tar.gz
libayatana-appindicator-fc9d5d4f762493d0b8378b12ac6c8451e5b9683b.tar.bz2
libayatana-appindicator-fc9d5d4f762493d0b8378b12ac6c8451e5b9683b.zip
Adding in a signal to tell when the label is updated.
Diffstat (limited to 'src')
-rw-r--r--src/app-indicator.c18
-rw-r--r--src/app-indicator.h15
2 files changed, 31 insertions, 2 deletions
diff --git a/src/app-indicator.c b/src/app-indicator.c
index ce79165..ec153c6 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -89,6 +89,7 @@ enum {
NEW_ICON,
NEW_ATTENTION_ICON,
NEW_STATUS,
+ NEW_LABEL,
CONNECTION_CHANGED,
LAST_SIGNAL
};
@@ -374,6 +375,23 @@ app_indicator_class_init (AppIndicatorClass *klass)
G_TYPE_STRING);
/**
+ AppIndicator::new-label:
+ @arg0: The #AppIndicator object
+ @arg1: The string for the label
+ @arg1: The string for the guide
+
+ Emitted when either #AppIndicator:label or #AppIndicator:label-guide are
+ changed.
+ */
+ signals[NEW_LABEL] = g_signal_new (APP_INDICATOR_SIGNAL_NEW_LABEL,
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (AppIndicatorClass, new_label),
+ NULL, NULL,
+ g_cclosure_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
diff --git a/src/app-indicator.h b/src/app-indicator.h
index 767cf72..586d2dc 100644
--- a/src/app-indicator.h
+++ b/src/app-indicator.h
@@ -92,6 +92,11 @@ G_BEGIN_DECLS
String identifier for the #AppIndicator::new-status signal.
*/
/**
+ APP_INDICATOR_SIGNAL_NEW_LABEL:
+
+ String identifier for the #AppIndicator::new-label signal.
+*/
+/**
APP_INDICATOR_SIGNAL_CONNECTION_CHANGED:
String identifier for the #AppIndicator::connection-changed signal.
@@ -99,6 +104,7 @@ G_BEGIN_DECLS
#define APP_INDICATOR_SIGNAL_NEW_ICON "new-icon"
#define APP_INDICATOR_SIGNAL_NEW_ATTENTION_ICON "new-attention-icon"
#define APP_INDICATOR_SIGNAL_NEW_STATUS "new-status"
+#define APP_INDICATOR_SIGNAL_NEW_LABEL "new-label"
#define APP_INDICATOR_SIGNAL_CONNECTION_CHANGED "connection-changed"
/**
@@ -152,8 +158,8 @@ typedef struct _AppIndicatorPrivate AppIndicatorPrivate;
there is no Application Indicator area available.
@unfallback: The function that gets called if an Application
Indicator area appears after the fallback has been created.
+ @new_label: Slot for #AppIndicator::new-label.
@app_indicator_reserved_1: Reserved for future use.
- @app_indicator_reserved_2: Reserved for future use.
The signals and external functions that make up the #AppIndicator
class object.
@@ -181,9 +187,14 @@ struct _AppIndicatorClass {
void (*unfallback) (AppIndicator * indicator,
GtkStatusIcon * status_icon);
+ /* Another DBus Signal */
+ void (* new_label) (AppIndicator *indicator,
+ const gchar *label,
+ const gchar *guide,
+ gpointer user_data);
+
/* Reserved */
void (*app_indicator_reserved_1)(void);
- void (*app_indicator_reserved_2)(void);
};
/**