diff options
Diffstat (limited to 'gtk/gtkshortcutaction.c')
-rw-r--r-- | gtk/gtkshortcutaction.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/gtk/gtkshortcutaction.c b/gtk/gtkshortcutaction.c index 176fe5fa5a..c1357d04e8 100644 --- a/gtk/gtkshortcutaction.c +++ b/gtk/gtkshortcutaction.c @@ -44,6 +44,10 @@ * - #GtkNamedAction: a shortcut action that calls gtk_widget_activate_action() * - #GtkGActionAction: a shortcut action that activates a given #GAction * - #GtkNothingAction: a shortcut action that does nothing +* +* # GtkShortcutAction as GtkBuildable +* +* GtkShortcut */ #include "config.h" @@ -180,9 +184,7 @@ string_is_function (const char *string, } GtkShortcutAction * -gtk_shortcut_action_parse_builder (GtkBuilder *builder, - const char *string, - GError **error) +gtk_shortcut_action_parse_string (const char *string) { GtkShortcutAction *result; char *arg; @@ -204,6 +206,22 @@ gtk_shortcut_action_parse_builder (GtkBuilder *builder, result = gtk_signal_action_new (arg); g_free (arg); } + else + return NULL; + + return result; +} + +GtkShortcutAction * +gtk_shortcut_action_parse_builder (GtkBuilder *builder, + const char *string, + GError **error) +{ + GtkShortcutAction *result; + + result = gtk_shortcut_action_parse_string (string); + + if (!result) { g_set_error (error, GTK_BUILDER_ERROR, GTK_BUILDER_ERROR_INVALID_VALUE, |