aboutsummaryrefslogtreecommitdiff
path: root/src/messages-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/messages-service.c')
-rw-r--r--src/messages-service.c9
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);