diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-06-25 16:52:05 +0200 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-06-25 16:52:05 +0200 |
commit | 27dbefcc92d9c91bb090f94ba64910867baa605b (patch) | |
tree | efd7201a15e703fe8845bc0b44b5fa82a52872fc /src | |
parent | 787dff35a9a9e0c491e960754b8bbdeb46ae800c (diff) | |
download | ayatana-indicator-messages-27dbefcc92d9c91bb090f94ba64910867baa605b.tar.gz ayatana-indicator-messages-27dbefcc92d9c91bb090f94ba64910867baa605b.tar.bz2 ayatana-indicator-messages-27dbefcc92d9c91bb090f94ba64910867baa605b.zip |
Set action namespace on application sections
Diffstat (limited to 'src')
-rw-r--r-- | src/messages-service.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/messages-service.c b/src/messages-service.c index 805e684..fcceb58 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -97,6 +97,8 @@ add_application (const gchar *desktop_id) section = g_hash_table_lookup (applications, id); if (!section) { + GMenuItem *menuitem; + section = app_section_new(appinfo); g_hash_table_insert (applications, g_strdup (id), section); @@ -105,7 +107,10 @@ add_application (const gchar *desktop_id) G_CALLBACK (actions_changed), NULL); /* TODO insert it at the right position (alphabetically by application name) */ - g_menu_insert_section (menu, 2, NULL, app_section_get_menu (section)); + menuitem = g_menu_item_new_section (NULL, app_section_get_menu (section)); + g_menu_item_set_attribute (menuitem, "action-namespace", "s", id); + g_menu_insert_item (menu, 2, menuitem); + g_object_unref (menuitem); } g_free (id); |