From 06c8739de421e7eae0f4676566089ac98a9196df Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Fri, 29 Jun 2012 18:29:42 -0400 Subject: [PATCH] modelmenu: set the accel group on the GtkMenu Or the accelerators added for actions in the menu won't be displayed in the menu items. https://bugzilla.gnome.org/show_bug.cgi?id=679166 --- gtk/gtkmodelmenu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkmodelmenu.c b/gtk/gtkmodelmenu.c index 1ac533dac9..1f12595e52 100644 --- a/gtk/gtkmodelmenu.c +++ b/gtk/gtkmodelmenu.c @@ -267,6 +267,7 @@ gtk_model_menu_create_menu (GMenuModel *model, GtkWidget *menu; menu = gtk_menu_new (); + gtk_menu_set_accel_group (GTK_MENU (menu), accels); gtk_model_menu_bind (GTK_MENU_SHELL (menu), model, TRUE); gtk_model_menu_populate (GTK_MENU_SHELL (menu), actions, accels); @@ -291,6 +292,7 @@ notify_attach (GtkMenu *menu, actions = gtk_application_window_get_observable (GTK_APPLICATION_WINDOW (toplevel)); accels = gtk_application_window_get_accel_group (GTK_APPLICATION_WINDOW (toplevel)); + gtk_menu_set_accel_group (menu, accels); gtk_model_menu_populate (GTK_MENU_SHELL (menu), actions, accels); } }