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 788841 - Fix gtk_actionable_set_detailed_action_name API inconsistency
Fix gtk_actionable_set_detailed_action_name API inconsistency
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-10-11 18:48 UTC by Christian Persch
Modified: 2017-10-26 10:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.63 KB, patch)
2017-10-11 18:51 UTC, Christian Persch
committed Details | Review

Description Christian Persch 2017-10-11 18:48:35 UTC
What the 'detailed action name' format is defined by g_action_parse_detailed_name() to be one of "action" (no parameter), "action::string" (parameter type "s") or "action(target)" for arbitrary parameter types.

However, in gtk+' gtk_actionable_set_detailed_action_name(), the only allowed formats are the first two. This creates an unexpected API inconsistency and and inability to use this API for non-"s" actions (which *is* documented there, but still unexpected). IMO this should be fixed to make this function accept the full format as defined by gio; patch attached.
Comment 1 Christian Persch 2017-10-11 18:51:18 UTC
Created attachment 361346 [details] [review]
patch

This is analogous to how g_menu_item_set_detailed_action() does it.
Comment 2 Matthias Clasen 2017-10-12 00:12:33 UTC
Review of attachment 361346 [details] [review]:

I don't see any harm in allowing this.
Comment 3 Daniel Boles 2017-10-12 00:15:15 UTC
Note that the doc needs to be updated to say prior to version 3.22.25