diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/messages-service.c | 25 | ||||
-rw-r--r-- | src/messages-service.xml | 4 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/messages-service.c b/src/messages-service.c index f93cf68..25a19b9 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -474,6 +474,29 @@ unregister_application (IndicatorMessagesService *service, } static void +application_stopped_running (IndicatorMessagesService *service, + GDBusMethodInvocation *invocation, + const gchar *desktop_id, + gpointer user_data) +{ + GDesktopAppInfo *appinfo; + gchar *id; + AppSection *section; + + indicator_messages_service_complete_application_stopped_running (service, invocation); + + if (!(appinfo = g_desktop_app_info_new (desktop_id))) + return; + + id = g_app_info_get_simple_id (G_APP_INFO (appinfo)); + section = g_hash_table_lookup (applications, id); + app_section_unset_object_path (section); + + g_free (id); + g_object_unref (appinfo); +} + +static void set_status (IndicatorMessagesService *service, GDBusMethodInvocation *invocation, const gchar *desktop_id, @@ -650,6 +673,8 @@ main (int argc, char ** argv) G_CALLBACK (register_application), NULL); g_signal_connect (messages_service, "handle-unregister-application", G_CALLBACK (unregister_application), NULL); + g_signal_connect (messages_service, "handle-application-stopped-running", + G_CALLBACK (application_stopped_running), NULL); g_signal_connect (messages_service, "handle-set-status", G_CALLBACK (set_status), NULL); diff --git a/src/messages-service.xml b/src/messages-service.xml index 00ae154..3c3c779 100644 --- a/src/messages-service.xml +++ b/src/messages-service.xml @@ -11,6 +11,10 @@ <arg type="s" name="desktop_id" direction="in" /> </method> + <method name="ApplicationStoppedRunning"> + <arg type="s" name="desktop_id" direction="in" /> + </method> + <method name="SetStatus"> <arg type="s" name="desktop_id" direction="in" /> <arg type="s" name="status" direction="in" /> |