aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2012-06-25 16:52:05 +0200
committerLars Uebernickel <lars.uebernickel@canonical.com>2012-06-25 16:52:05 +0200
commit27dbefcc92d9c91bb090f94ba64910867baa605b (patch)
treeefd7201a15e703fe8845bc0b44b5fa82a52872fc /src
parent787dff35a9a9e0c491e960754b8bbdeb46ae800c (diff)
downloadayatana-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.c7
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);