diff -Nru indicator-messages-13.10.1+14.04.20140408/debian/changelog indicator-messages-13.10.1+14.04.20140410/debian/changelog --- indicator-messages-13.10.1+14.04.20140408/debian/changelog 2014-04-10 15:29:13.000000000 +0000 +++ indicator-messages-13.10.1+14.04.20140410/debian/changelog 2014-04-10 15:29:13.000000000 +0000 @@ -1,3 +1,16 @@ +indicator-messages (13.10.1+14.04.20140410-0ubuntu1) trusty; urgency=low + + [ Lars Uebernickel ] + * messages-service: listen to the ApplicationStoppedRunning call Prior + to this patch, only applications that exit were marked as "not + running". However, this must also happen when an application unrefs + it's MessagingMenuApp instance. This is a problem for applications + which implement messaging menu integration as a plugin (when + unloading the plugin). Specifically, this causes bug #1302930, as + telepathy-indicator doesn't exit when empathy exits. (LP: #1302930) + + -- Ubuntu daily release Thu, 10 Apr 2014 12:07:10 +0000 + indicator-messages (13.10.1+14.04.20140408-0ubuntu1) trusty; urgency=low [ Ted Gould ] diff -Nru indicator-messages-13.10.1+14.04.20140408/src/im-application-list.c indicator-messages-13.10.1+14.04.20140410/src/im-application-list.c --- indicator-messages-13.10.1+14.04.20140408/src/im-application-list.c 2014-04-08 16:24:38.000000000 +0000 +++ indicator-messages-13.10.1+14.04.20140410/src/im-application-list.c 2014-04-10 12:06:55.000000000 +0000 @@ -1158,6 +1158,12 @@ return; } + if (!connection && !unique_bus_name && !object_path) + { + im_application_list_unset_remote (app); + return; + } + if (app->cancellable) { gchar *name_owner = NULL; diff -Nru indicator-messages-13.10.1+14.04.20140408/src/messages-service.c indicator-messages-13.10.1+14.04.20140410/src/messages-service.c --- indicator-messages-13.10.1+14.04.20140408/src/messages-service.c 2014-04-08 16:24:16.000000000 +0000 +++ indicator-messages-13.10.1+14.04.20140410/src/messages-service.c 2014-04-10 12:06:55.000000000 +0000 @@ -123,6 +123,28 @@ return TRUE; } +static gboolean +app_stopped (IndicatorMessagesService *service, + GDBusMethodInvocation *invocation, + const gchar *desktop_id, + gpointer user_data) +{ + GDesktopAppInfo *appinfo; + const gchar *id; + + appinfo = g_desktop_app_info_new (desktop_id); + if (!appinfo) + return TRUE; + + id = g_app_info_get_id (G_APP_INFO (appinfo)); + im_application_list_set_remote (applications, id, NULL, NULL, NULL); + indicator_messages_service_complete_application_stopped_running (service, invocation); + + g_object_unref (appinfo); + + return TRUE; +} + /* 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) @@ -231,6 +253,8 @@ G_CALLBACK (unregister_application), NULL); g_signal_connect (messages_service, "handle-set-status", G_CALLBACK (set_status), NULL); + g_signal_connect (messages_service, "handle-application-stopped-running", + G_CALLBACK (app_stopped), NULL); applications = im_application_list_new (); g_signal_connect (applications, "status-set",