summaryrefslogtreecommitdiff
path: root/src/gtkutil.c
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2007-04-27 06:21:37 +0000
committerJan Djärv <jan.h.d@swipnet.se>2007-04-27 06:21:37 +0000
commit9d1536a63b09c27ba8450b9ca45e99aa7048ed2f (patch)
treebd084f8ab7a1d943a1bae89ca4dc91712daaf52b /src/gtkutil.c
parent7d9e0340cce69ee1b90742a031285e66a6d8e341 (diff)
downloademacs-9d1536a63b09c27ba8450b9ca45e99aa7048ed2f.tar.gz
(xg_update_menubar, create_menus): Create empty
submenu for menu bar items.
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r--src/gtkutil.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 8dfcf84f0f2..02e42f74852 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -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));