]> git.eshelyaron.com Git - emacs.git/commitdiff
gtkutil.c (xg_modify_menubar_widgets): If menubar is totally empty
authorJan Djärv <jan.h.d@swipnet.se>
Fri, 20 Nov 2009 08:54:18 +0000 (08:54 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Fri, 20 Nov 2009 08:54:18 +0000 (08:54 +0000)
add a blank entry so it doesn't collapse into nothing.

src/ChangeLog
src/gtkutil.c

index eeceb7b767d1a0962602ff0855ac53027cc1db5a..e1cce91b646bd3b8a3f9953556fca83735d10a5e 100644 (file)
@@ -1,3 +1,8 @@
+2009-11-20  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * gtkutil.c (xg_modify_menubar_widgets): If menubar is totally empty
+       add a blank entry so it doesn't collapse into nothing.
+
 2009-11-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * lread.c (Funintern): Comment out last change.
index b182b52e6a7802d04a65d8f17026a36e208135b9..4a55e51b8b23dd2087b05538ea605960027f5d1c 100644 (file)
@@ -2477,6 +2477,10 @@ xg_update_menubar (menubar, f, list, iter, pos, val,
       /* Item(s) have been removed.  Remove all remaining items.  */
       xg_destroy_widgets (iter);
 
+      /* Add a blank entry so the menubar doesn't collapse to nothing. */
+      gtk_menu_shell_insert (GTK_MENU_SHELL (menubar),
+                             gtk_menu_item_new_with_label (""),
+                             0);
       /* All updated.  */
       val = 0;
       iter = 0;