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 721367 - Add gtk_application_get_actions_for_accel()
Add gtk_application_get_actions_for_accel()
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkApplication
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-01-02 23:05 UTC by Allison Karlitskaya (desrt)
Modified: 2014-08-03 18:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add gtk_application_get_actions_for_accel() (2.61 KB, patch)
2014-01-02 23:05 UTC, Allison Karlitskaya (desrt)
none Details | Review
Add gtk_application_get_actions_for_accel() (4.96 KB, patch)
2014-01-02 23:17 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2014-01-02 23:05:36 UTC
This counterpart to gtk_application_get_accels_for_action() lets you
find out if a particular accelerator has one or more actions associated
with it.  This might be useful from an accelerator editor or plugin
system to prevent the the installation of conflicting accelerators.
Comment 1 Allison Karlitskaya (desrt) 2014-01-02 23:05:37 UTC
Created attachment 265195 [details] [review]
Add gtk_application_get_actions_for_accel()
Comment 2 Allison Karlitskaya (desrt) 2014-01-02 23:17:58 UTC
Created attachment 265196 [details] [review]
Add gtk_application_get_actions_for_accel()

Add the obvious missing parts: docs and header
Comment 3 Ignacio Casal Quinteiro (nacho) 2014-01-03 07:41:33 UTC
Review of attachment 265196 [details] [review]:

Patch looks good to me, although I am missing in the docs that the list is null terminated and maybe some gobject introspection annotation?
Comment 4 Matthias Clasen 2014-01-04 19:00:28 UTC
Review of attachment 265196 [details] [review]:

::: gtk/gtkapplication.c
@@ +1554,3 @@
+ * you are unsure, check it with gtk_accelerator_parse() first.
+ *
+ * Returns: the list of actions for @accel

We don't usually call a strv a 'list', I think. Also, should have the usual transfer annotation and blurb: (transfer full) and 'Free with g_strfreev() when no longer needed'
Comment 5 Murray Cumming 2014-03-20 12:07:46 UTC
Could there maybe also be some hint in the documentation about how these new *_accels_for_action_* functions relate to gtk_application_add_accelerator()? Are they alternatives/better/different?
Comment 6 Matthias Clasen 2014-08-03 18:28:37 UTC
Attachment 265196 [details] pushed as 7d81d0a - Add gtk_application_get_actions_for_accel()