]> git.eshelyaron.com Git - emacs.git/commitdiff
(xg_update_menubar, create_menus): Create empty
authorJan Djärv <jan.h.d@swipnet.se>
Fri, 27 Apr 2007 06:39:45 +0000 (06:39 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Fri, 27 Apr 2007 06:39:45 +0000 (06:39 +0000)
submenu for menu bar items.

src/ChangeLog
src/gtkutil.c

index 4b567e72e337f0909bdb9f245c3b3ef72f387e95..22055a99973079a9b2490934704184175525a6c1 100644 (file)
@@ -1,3 +1,10 @@
+2007-04-27  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * xmenu.c (xdialog_show): Call Fredisplay before showing the dialog.
+
+       * gtkutil.c (xg_update_menubar, create_menus): Create empty
+       submenu for menu bar items.
+
 2007-04-24  Chong Yidong  <cyd@stupidchicken.com>
 
        * xdisp.c (redisplay_window): Use BEG_UNCHANGED and END_UNCHANGED
index 8dfcf84f0f2da08d7b00ab3f351236e9466a793d..02e42f74852707fce219ef9e7a3dbc0d6d2a6704 100644 (file)
@@ -2192,7 +2192,9 @@ create_menus (data, f, select_cb, deactivate_cb, highlight_cb,
                                       cl_data,
                                       &group);
 
-          if (item->contents)
+          /* Create a possibly empty submenu for menu bar items, since some
+             themes don't highlight items correctly without it. */
+          if (item->contents || menu_bar_p)
             {
               GtkWidget *submenu = create_menus (item->contents,
                                                  f,
@@ -2479,8 +2481,14 @@ xg_update_menubar (menubar, f, list, iter, pos, val,
                                                  cl_data,
                                                  &group);
 
+          /* Create a possibly empty submenu for menu bar items, since some
+             themes don't highlight items correctly without it. */
+          GtkWidget *submenu = create_menus (NULL, f,
+                                             select_cb, NULL, highlight_cb,
+                                             0, 0, 0, 0, cl_data, 0);
           gtk_widget_set_name (w, MENU_ITEM_NAME);
           gtk_menu_shell_insert (GTK_MENU_SHELL (menubar), w, pos);
+          gtk_menu_item_set_submenu (GTK_MENU_ITEM (w), submenu);
 
           g_list_free (*list);
           *list = iter = gtk_container_get_children (GTK_CONTAINER (menubar));