summaryrefslogtreecommitdiff
path: root/gtk/gtkmodelmenu.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2012-06-29 18:29:42 -0400
committerCosimo Cecchi <cosimoc@gnome.org>2012-07-05 10:21:55 -0400
commit06c8739de421e7eae0f4676566089ac98a9196df (patch)
treeb6fd74a53341b8674e41fc5e562da4cd050b102d /gtk/gtkmodelmenu.c
parent598163e52684019e4975c3d4ca728a54b00c2f74 (diff)
downloadgtk+-06c8739de421e7eae0f4676566089ac98a9196df.tar.gz
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
Diffstat (limited to 'gtk/gtkmodelmenu.c')
-rw-r--r--gtk/gtkmodelmenu.c2
1 files changed, 2 insertions, 0 deletions
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);
}
}