GNOME Bugzilla – Bug 683738
Simplify GtkApplicationWindow accel handling
Last modified: 2012-09-18 00:15:04 UTC
Let's drop all the GtkAccelGroup madness in GMenuModel menu creation and just use the 'accel' labels directly.
Created attachment 223941 [details] [review] GtkAccelLabel: add (private) manual accel API Add a private API to GtkAccelLabel for hardcoding the accel key to be displayed (ie: allowing us to bypass the GtkAccelGroup lookup). Use that from the GMenuModel-based GtkMenu construction code instead of passing around the accel group. This makes accel labels work in bloatpad again. This patch effectively removes any hope of automatic runtime accel changes in GMenuModel-based menus without additional application support.
Review of attachment 223941 [details] [review]: Looks fine to me in general; I don't think runtime accel changing will come back into fashion... I just wonder why accelerators were broken in bloatpad to begin with - weren't they supposed to work before ? ::: gtk/gtkaccellabel.h @@ +98,3 @@ +void _gtk_accel_label_set_accel (GtkAccelLabel *accel_label, + guint accelerator_key, + GdkModifierType accelerator_mods); We could just as well make this public, I guess ? If we don't, it should probably go in a private header.
(Sorry about the accidental reopening.)