gaction: add parser for detailed action names

Expand and formalise the syntax for detailed action names, adding a
well-documented (and tested) public parser API for them.

Port the only GLib-based user of detailed action names to the new API:
g_menu_item_set_detailed_action().  The users in Gtk+ will also be
ported soon.

https://bugzilla.gnome.org/show_bug.cgi?id=688954
This commit is contained in:
Ryan Lortie
2013-04-01 15:01:20 -04:00
parent e1fdd59f08
commit 8cddb54659
5 changed files with 196 additions and 21 deletions

View File

@@ -81,6 +81,12 @@ void g_action_change_state (GAction
GLIB_AVAILABLE_IN_ALL
void g_action_activate (GAction *action,
GVariant *parameter);
GLIB_AVAILABLE_IN_2_38
gboolean g_action_parse_detailed_name (const gchar *detailed_name,
gchar **action_name,
GVariant **target_value,
GError **error);
G_END_DECLS
#endif /* __G_ACTION_H__ */