diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-11-26 20:12:13 +0100 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-11-26 20:12:13 +0100 |
commit | 9287c2e6577e71d8f68d9c9e7d393a4f8524ab10 (patch) | |
tree | b5c87bcc747acd9cc8f261c6d3d62c7cf8a8daf4 /src/im-application-list.c | |
parent | b2c6b50cdfc1cc9a288516cef102ad2943b0e950 (diff) | |
download | ayatana-indicator-messages-9287c2e6577e71d8f68d9c9e7d393a4f8524ab10.tar.gz ayatana-indicator-messages-9287c2e6577e71d8f68d9c9e7d393a4f8524ab10.tar.bz2 ayatana-indicator-messages-9287c2e6577e71d8f68d9c9e7d393a4f8524ab10.zip |
Tell applications when messages and sources are dismissed
Right now, this is only used to clean up internal data structures in
libmessaging-menu. It's not exposed to the application itself.
Diffstat (limited to 'src/im-application-list.c')
-rw-r--r-- | src/im-application-list.c | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/src/im-application-list.c b/src/im-application-list.c index c3be647..d766f24 100644 --- a/src/im-application-list.c +++ b/src/im-application-list.c @@ -118,6 +118,13 @@ im_application_list_source_activated (GSimpleAction *action, app->cancellable, NULL, NULL); } + else + { + const gchar *sources[] = { source_id, NULL }; + const gchar *messages[] = { NULL }; + indicator_messages_application_call_dismiss (app->proxy, sources, messages, + app->cancellable, NULL, NULL); + } im_application_list_source_removed (app, source_id); } @@ -148,6 +155,13 @@ im_application_list_message_activated (GSimpleAction *action, app->cancellable, NULL, NULL); } + else + { + const gchar *sources[] = { NULL }; + const gchar *messages[] = { message_id, NULL }; + indicator_messages_application_call_dismiss (app->proxy, sources, messages, + app->cancellable, NULL, NULL); + } im_application_list_message_removed (app, message_id); } @@ -164,18 +178,25 @@ im_application_list_remove_all (GSimpleAction *action, g_hash_table_iter_init (&iter, list->applications); while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &app)) { - gchar **actions; + gchar **source_actions; + gchar **message_actions; gchar **it; - actions = g_action_group_list_actions (G_ACTION_GROUP (app->source_actions)); - for (it = actions; *it; it++) + source_actions = g_action_group_list_actions (G_ACTION_GROUP (app->source_actions)); + for (it = source_actions; *it; it++) im_application_list_source_removed (app, *it); - g_strfreev (actions); - actions = g_action_group_list_actions (G_ACTION_GROUP (app->message_actions)); - for (it = actions; *it; it++) + message_actions = g_action_group_list_actions (G_ACTION_GROUP (app->message_actions)); + for (it = message_actions; *it; it++) im_application_list_message_removed (app, *it); - g_strfreev (actions); + + indicator_messages_application_call_dismiss (app->proxy, + (const gchar * const *) source_actions, + (const gchar * const *) message_actions, + app->cancellable, NULL, NULL); + + g_strfreev (source_actions); + g_strfreev (message_actions); } } |