GNOME Bugzilla – Bug 721367
Add gtk_application_get_actions_for_accel()
Last modified: 2014-08-03 18:28:42 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.
Created attachment 265195 [details] [review] Add gtk_application_get_actions_for_accel()
Created attachment 265196 [details] [review] Add gtk_application_get_actions_for_accel() Add the obvious missing parts: docs and header
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?
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'
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?
Attachment 265196 [details] pushed as 7d81d0a - Add gtk_application_get_actions_for_accel()