diff options
-rw-r--r-- | libmessaging-menu/messaging-menu.c | 4 | ||||
-rw-r--r-- | src/messages-service.c | 25 | ||||
-rw-r--r-- | src/messages-service.xml | 4 |
3 files changed, 33 insertions, 0 deletions
diff --git a/libmessaging-menu/messaging-menu.c b/libmessaging-menu/messaging-menu.c index 04f8d1d..a51695a 100644 --- a/libmessaging-menu/messaging-menu.c +++ b/libmessaging-menu/messaging-menu.c @@ -277,6 +277,10 @@ messaging_menu_app_dispose (GObject *object) if (app->messages_service) { + indicator_messages_service_call_application_stopped_running (app->messages_service, + g_app_info_get_id (G_APP_INFO (app->appinfo)), + NULL, NULL, NULL); + g_signal_handlers_disconnect_by_func (app->messages_service, global_status_changed, app); diff --git a/src/messages-service.c b/src/messages-service.c index 48c830e..e48e3f8 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -473,6 +473,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, @@ -648,6 +671,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" /> |