From 190841b5d7262d9619c618e19bcb08e30968fd41 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 15 Aug 2013 15:32:36 -0500 Subject: Emit to dbus when the status changes --- src/messages-service.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/messages-service.c b/src/messages-service.c index 6423cd5..71fa09b 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -107,6 +107,13 @@ set_status (IndicatorMessagesService *service, g_object_unref (appinfo); } +/* The status has been set by the user, let's tell the world! */ +static void +status_set_by_user (ImApplicationList * list, const gchar * status, gpointer user_data) +{ + indicator_messages_service_emit_status_changed(messages_service, status); + return; +} static void on_bus_acquired (GDBusConnection *bus, @@ -199,6 +206,8 @@ main (int argc, char ** argv) G_CALLBACK (set_status), NULL); applications = im_application_list_new (); + g_signal_connect (applications, "status-set", + G_CALLBACK (status_set_by_user), NULL); settings = g_settings_new ("com.canonical.indicator.messages"); { -- cgit v1.2.3