diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-11-29 13:06:28 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2012-11-29 13:06:28 +0000 |
commit | 892d46d42c6858783c89072fae8e6c5295ac73c2 (patch) | |
tree | fd1ec12fcc4c4b3732273a6aa75c320109e53155 /src/im-application-list.c | |
parent | c9ddfbead428ec96459cd80b57aba6ad6ed0492a (diff) | |
parent | 5c7569e03d770c5f29b0011b2b0ad04f0be2ff88 (diff) | |
download | ayatana-indicator-messages-892d46d42c6858783c89072fae8e6c5295ac73c2.tar.gz ayatana-indicator-messages-892d46d42c6858783c89072fae8e6c5295ac73c2.tar.bz2 ayatana-indicator-messages-892d46d42c6858783c89072fae8e6c5295ac73c2.zip |
Expose a root item on the menu as described in the indicator spec and remove some related dead code in messages-service.c.
Approved by Renato Araujo Oliveira Filho, PS Jenkins bot.
Diffstat (limited to 'src/im-application-list.c')
-rw-r--r-- | src/im-application-list.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/im-application-list.c b/src/im-application-list.c index d766f24..c5e34b7 100644 --- a/src/im-application-list.c +++ b/src/im-application-list.c @@ -304,22 +304,21 @@ im_application_list_class_init (ImApplicationListClass *klass) static void im_application_list_init (ImApplicationList *list) { + const GActionEntry action_entries[] = { + { "messages", NULL, NULL, "('', 'indicator-messages', 'Messages', true)", NULL }, + { "remove-all", im_application_list_remove_all } + }; + GSimpleActionGroup *actions; - GSimpleAction *remove_all_action; list->applications = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, application_free); - list->muxer = g_action_muxer_new (); actions = g_simple_action_group_new (); + g_simple_action_group_add_entries (actions, action_entries, G_N_ELEMENTS (action_entries), list); - remove_all_action = g_simple_action_new ("remove-all", NULL); - g_signal_connect (remove_all_action, "activate", G_CALLBACK (im_application_list_remove_all), list); - - g_simple_action_group_insert (actions, G_ACTION (remove_all_action)); - + list->muxer = g_action_muxer_new (); g_action_muxer_insert (list->muxer, NULL, G_ACTION_GROUP (actions)); - g_object_unref (remove_all_action); g_object_unref (actions); } |