[gtk+/wip/gmenu: 72/87] Only add a separator when a section ends



commit d25809fe6bd4da2db974863a43893fdb61eddf77
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Dec 1 20:49:05 2011 -0500

    Only add a separator when a section ends

 tests/testgmenu.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/tests/testgmenu.c b/tests/testgmenu.c
index 5fb657c..9fd5258 100644
--- a/tests/testgmenu.c
+++ b/tests/testgmenu.c
@@ -314,15 +314,16 @@ append_items_from_model (GtkWidget    *menu,
           append_items_from_model (menu, m, group, need_separator, label);
           g_object_unref (m);
           g_free (label);
-          continue;
-        }
 
-      if (*need_separator)
-        {
-          w = gtk_separator_menu_item_new ();
-          gtk_widget_show (w);
-          gtk_menu_shell_append (GTK_MENU_SHELL (menu), w);
-          *need_separator = FALSE;
+          if (*need_separator)
+            {
+              w = gtk_separator_menu_item_new ();
+              gtk_widget_show (w);
+              gtk_menu_shell_append (GTK_MENU_SHELL (menu), w);
+              *need_separator = FALSE;
+            }
+
+          continue;
         }
 
       menuitem = create_menuitem_from_model (model, i, group);



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