diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-08-27 14:28:43 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-08-27 14:28:43 +0000 |
commit | 21c5321683550681ec3557ea76b2550dc4aae8b9 (patch) | |
tree | a38ee57b51610525114dc541a41200b2c656d865 /src/im-application-list.c | |
parent | 6f3d6ce8f7cfafb350518c41ce4e9b7f69a597b2 (diff) | |
parent | e1050a9ceed9cfd0c31ebcaf1d4abb931c5d62ed (diff) | |
download | ayatana-indicator-messages-21c5321683550681ec3557ea76b2550dc4aae8b9.tar.gz ayatana-indicator-messages-21c5321683550681ec3557ea76b2550dc4aae8b9.tar.bz2 ayatana-indicator-messages-21c5321683550681ec3557ea76b2550dc4aae8b9.zip |
Fix bug #1216843
Remove all sources when an applications quits and don't show sources with a count of 0. Fixes: https://bugs.launchpad.net/bugs/1216843.
Approved by Charles Kerr, PS Jenkins bot.
Diffstat (limited to 'src/im-application-list.c')
-rw-r--r-- | src/im-application-list.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/im-application-list.c b/src/im-application-list.c index 1493adf..17fffdc 100644 --- a/src/im-application-list.c +++ b/src/im-application-list.c @@ -476,11 +476,12 @@ im_application_list_class_init (ImApplicationListClass *klass) NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, - 4, + 5, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, - G_TYPE_STRING); + G_TYPE_STRING, + G_TYPE_BOOLEAN); signals[SOURCE_REMOVED] = g_signal_new ("source-removed", IM_TYPE_APPLICATION_LIST, @@ -539,7 +540,7 @@ im_application_list_class_init (ImApplicationListClass *klass) G_SIGNAL_RUN_FIRST, 0, NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); @@ -806,6 +807,7 @@ im_application_list_source_changed (Application *app, const gchar *string; gboolean draws_attention; gboolean old_draw; + gboolean visible; g_variant_get (source, "(&s&s&sux&sb)", &id, &label, &iconstr, &count, &time, &string, &draws_attention); @@ -815,9 +817,11 @@ im_application_list_source_changed (Application *app, g_action_group_change_action_state (G_ACTION_GROUP (app->source_actions), id, g_variant_new ("(uxsb)", count, time, string, draws_attention)); - g_signal_emit (app->list, signals[SOURCE_CHANGED], 0, app->id, id, label, iconstr); + visible = count > 0; + + g_signal_emit (app->list, signals[SOURCE_CHANGED], 0, app->id, id, label, iconstr, visible); - if (!old_draw && draws_attention) + if (visible && !old_draw && draws_attention) app->draws_attention = TRUE; im_application_list_update_draws_attention (app->list); |