gmenu exporter: put submenus in separate groups
authorRyan Lortie <desrt@desrt.ca>
Tue, 29 Nov 2011 13:18:38 +0000 (08:18 -0500)
committerRyan Lortie <desrt@desrt.ca>
Thu, 8 Dec 2011 23:05:13 +0000 (18:05 -0500)
Keep sections in the same subscription group as the parent (since they
will be needed immediately) but put submenus in a separate group.

gio/gmenuexporter.c

index 87e2ca3..ba938d9 100644 (file)
@@ -269,7 +269,10 @@ g_menu_exporter_menu_create_links (GMenuExporterMenu *menu,
       GMenuExporterGroup *group;
       GMenuExporterLink *tmp;
 
-      if (0) /* [magic] */
+      /* keep sections in the same group, but create new groups
+       * otherwise
+       */
+      if (!g_str_equal (name, "section"))
         group = g_menu_exporter_create_group (g_menu_exporter_group_get_exporter (menu->group));
       else
         group = menu->group;