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 172536 - GtkAction::accelerator
Product: gtk+
Classification: Platform
Component: Class: UIManager / Actions
Other Linux
: Normal normal
: Small API
Assigned To: gtk-bugs
Depends on:
Blocks: gtkbuilder
Reported: 2005-04-03 19:33 UTC by Johan (not receiving bugmail) Dahlin
Modified: 2014-08-30 05:00 UTC
See Also:
GNOME target: ---
GNOME version: ---

a patch (6.68 KB, patch)
2005-04-10 06:05 UTC, Matthias Clasen
needs-work Details | Review
test case (1.76 KB, text/plain)
2005-04-10 18:31 UTC, Johan (not receiving bugmail) Dahlin

Description Johan (not receiving bugmail) Dahlin 2005-04-03 19:33:55 UTC
This simplifies for UI builders, to be able to set all information on a
GtkAction through properties.

Currently most of this code lives in gtk_action_group_add_with_accel. This can
be refactored to be a property in a GtkAction.
Comment 1 Matthias Clasen 2005-04-10 06:05:04 UTC
Created attachment 45099 [details] [review]
a patch

Does this look like it does what you need, Johan ?
Comment 2 Johan (not receiving bugmail) Dahlin 2005-04-10 18:30:11 UTC
Thanks for looking at this Matthias.

Unfortunately I cannot get it to work properly. I suspect it might be because
the action is not attached to an action group when the accelerator property is set.

Test case follows.
Comment 3 Johan (not receiving bugmail) Dahlin 2005-04-10 18:31:48 UTC
Created attachment 45107 [details]
test case
Comment 4 Matthias Clasen 2005-04-11 00:52:59 UTC
You have to set up the accel path of the action.
Comment 5 Johan (not receiving bugmail) Dahlin 2005-04-11 04:27:33 UTC
Of course, that's it! Sorry about that.

This patch and a small modification to the code that adds actions to action
groups is everything I need.

Comment 6 Matthias Clasen 2005-06-20 06:18:33 UTC
I have not commmitted the patch yet, since we found out in another bug that we
need to use gtk_accel_map_add_entry(), not change_entry() for setting the
accelerator. But then, only the very first time this property is set will have
any effect. Making it construct-only does not sound quite right either, though.

Moving off 2.8 API freeze until inspiration hits
Comment 7 Philip Withnall 2007-05-26 15:58:57 UTC
Patch 45099 doesn't apply cleanly. Reviewing it would take a little while.

(Working on
Comment 8 Matthias Clasen 2014-08-30 05:00:49 UTC
GtkAction has been deprecated