[gtk+/gtk-3-4] modelmenu: set the accel group on the GtkMenu
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-4] modelmenu: set the accel group on the GtkMenu
- Date: Sun, 15 Jul 2012 17:01:00 +0000 (UTC)
commit 0f3d475c251af3df069ecada52d85046fcec41f9
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Jun 29 18:29:42 2012 -0400
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 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmodelmenu.c b/gtk/gtkmodelmenu.c
index 1ac533d..1f12595 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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]