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 764975 - GTKShortcutWindow runtime changes to accelerator not reflected in Search
GTKShortcutWindow runtime changes to accelerator not reflected in Search
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-04-13 01:57 UTC by Gerald Nunn
Modified: 2016-04-17 20:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gerald Nunn 2016-04-13 01:57:33 UTC
I've added a GTKShortcutWindow to my application (https://github.com/gnunn1/terminix) which allows users to customize the shortcuts in a fashion similar to gnome-terminal. I'm having an issue with the search facility in that while it shows the matching actions the associated accelerator isn't displayed.

After playing around a bit, it looks like the search capability is driven off of the initial load of the widgets and any changes at runtime to accelerators in GTKShortcutShortcut are ignored. In my application the ui file doesn't specify any accelerators, after I use GTKBuilder to load the ui file I iterate over all my shortcuts and assign the accelerator at that time.

If I modify the ui file to assign a temporary accelerator, the search feature shows the temporary accelerator instead of the one assigned at runtime.
Comment 1 Matthias Clasen 2016-04-13 15:44:26 UTC
Sounds like a bug. Patch more than welcome, otherwise I will get around to looking at this eventually.
Comment 2 Matthias Clasen 2016-04-17 20:21:01 UTC
Pushed a change that lets you fix tihs for 3.22. Instead of setting GtkShortcutsShortcut::accelerator, set GtkShortcutsShortcut::action-name.