[glib/wip/gmenu: 44/59] gmenu exporter: put submenus in separate groups



commit b2ab1dc48785899dec3259bb2d15b7ac2048c736
Author: Ryan Lortie <desrt desrt ca>
Date:   Tue Nov 29 08:18:38 2011 -0500

    gmenu exporter: put submenus in separate groups
    
    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 |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gio/gmenuexporter.c b/gio/gmenuexporter.c
index 87e2ca3..ba938d9 100644
--- a/gio/gmenuexporter.c
+++ b/gio/gmenuexporter.c
@@ -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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]