After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683738 - Simplify GtkApplicationWindow accel handling
Simplify GtkApplicationWindow accel handling
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkApplication
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-09-10 18:44 UTC by Allison Karlitskaya (desrt)
Modified: 2012-09-18 00:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkAccelLabel: add (private) manual accel API (12.91 KB, patch)
2012-09-10 18:44 UTC, Allison Karlitskaya (desrt)
reviewed Details | Review

Description Allison Karlitskaya (desrt) 2012-09-10 18:44:12 UTC
Let's drop all the GtkAccelGroup madness in GMenuModel menu creation and
just use the 'accel' labels directly.
Comment 1 Allison Karlitskaya (desrt) 2012-09-10 18:44:14 UTC
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.
Comment 2 Matthias Clasen 2012-09-12 03:30:24 UTC
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.
Comment 3 Christian Persch 2012-09-18 00:15:04 UTC
(Sorry about the accidental reopening.)