From 3aa66a7c29f62a0d862ad04f9d61d61bee9a23ef Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sat, 28 Jan 2012 21:22:14 -0600 Subject: Support the title property over dbus and emitting the dbus signal when it changes --- src/app-indicator.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/app-indicator.c') 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) { -- cgit v1.2.3