diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-05-31 19:29:27 +0200 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-05-31 19:29:27 +0200 |
commit | eea45a449eb4de159aab08bad864b27f584af519 (patch) | |
tree | 043341fc431d7e38d16cb3daacc5d400f44d6336 /src/messages-service.c | |
parent | 4f2dd60a130dcaeb4378219baca1f3d4e9637824 (diff) | |
download | ayatana-indicator-messages-eea45a449eb4de159aab08bad864b27f584af519.tar.gz ayatana-indicator-messages-eea45a449eb4de159aab08bad864b27f584af519.tar.bz2 ayatana-indicator-messages-eea45a449eb4de159aab08bad864b27f584af519.zip |
Put the 'launch' action onto app's menu sections
This requires clients to make those menu sections clickable.
Diffstat (limited to 'src/messages-service.c')
-rw-r--r-- | src/messages-service.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/messages-service.c b/src/messages-service.c index dcce1c5..ddedee9 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -64,13 +64,14 @@ add_application (const gchar *desktop_id, if (!g_hash_table_lookup (applications, desktop_file)) { AppSection *section = app_section_new(appinfo); + GMenuItem *item = app_section_create_menu_item (section); + + g_hash_table_insert (applications, g_strdup (desktop_file), section); /* TODO insert it at the right position (alphabetically by application name) */ - g_menu_insert_section (menu, 2, - app_section_get_name (section), - app_section_get_menu (section)); + g_menu_insert_item (menu, 2, item); - g_hash_table_insert (applications, g_strdup (desktop_file), section); + g_object_unref (item); } g_object_unref (appinfo); |