[gtk+/wip/gmenu] Never add separators to menubars



commit 57d7f0ef11a2f5bf6161699448cea8f4360dfe84
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Dec 2 18:18:58 2011 -0500

    Never add separators to menubars

 gtk/gtkapplicationwindow.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index 5031006..f68a0a2 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -628,7 +628,7 @@ append_items_from_model (GtkMenuShell      *menu,
 
   n = g_menu_model_get_n_items (model);
 
-  if (*need_separator && n > 0)
+  if (!GTK_IS_MENU_BAR (menu) && *need_separator && n > 0)
     {
       w = gtk_separator_menu_item_new ();
       gtk_widget_show (w);
@@ -654,7 +654,7 @@ append_items_from_model (GtkMenuShell      *menu,
           g_object_unref (m);
           g_free (label);
 
-          if (*need_separator)
+          if (!GTK_IS_MENU_BAR (menu)  && *need_separator)
             {
               w = gtk_separator_menu_item_new ();
               gtk_widget_show (w);



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