aboutsummaryrefslogtreecommitdiff
path: root/src/app-indicator.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-01-28 21:22:14 -0600
committerTed Gould <ted@gould.cx>2012-01-28 21:22:14 -0600
commit3aa66a7c29f62a0d862ad04f9d61d61bee9a23ef (patch)
treed6b23ebca084678c3623a9f045d71c32793905a9 /src/app-indicator.c
parente5b9bc347ccaf27c351fbcb2305db5dc5816e5e0 (diff)
downloadlibayatana-appindicator-3aa66a7c29f62a0d862ad04f9d61d61bee9a23ef.tar.gz
libayatana-appindicator-3aa66a7c29f62a0d862ad04f9d61d61bee9a23ef.tar.bz2
libayatana-appindicator-3aa66a7c29f62a0d862ad04f9d61d61bee9a23ef.zip
Support the title property over dbus and emitting the dbus signal when it changes
Diffstat (limited to 'src/app-indicator.c')
-rw-r--r--src/app-indicator.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/app-indicator.c b/src/app-indicator.c
index f29d08e..bb44e50 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -878,7 +878,20 @@ app_indicator_set_property (GObject * object, guint prop_id, const GValue * valu
}
if (g_strcmp0(oldtitle, priv->title) != 0) {
- // signal_title_change(APP_INDICATOR(object));
+ GError * error = NULL;
+
+ g_dbus_connection_emit_signal(self->priv->connection,
+ NULL,
+ self->priv->path,
+ NOTIFICATION_ITEM_DBUS_IFACE,
+ "NewTitle",
+ NULL,
+ &error);
+
+ if (error != NULL) {
+ g_warning("Unable to send signal for NewTitle: %s", error->message);
+ g_error_free(error);
+ }
}
if (oldtitle != NULL) {
@@ -1104,6 +1117,8 @@ bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar *
return g_variant_new_string(priv->icon_name ? priv->icon_name : "");
} else if (g_strcmp0(property, "AttentionIconName") == 0) {
return g_variant_new_string(priv->attention_icon_name ? priv->attention_icon_name : "");
+ } else if (g_strcmp0(property, "Title") == 0) {
+ return g_variant_new_string(priv->title ? priv->title : "");
} else if (g_strcmp0(property, "IconThemePath") == 0) {
return g_variant_new_string(priv->icon_theme_path ? priv->icon_theme_path : "");
} else if (g_strcmp0(property, "Menu") == 0) {