diff options
author | Benjamin Otte <otte@redhat.com> | 2018-08-24 06:58:44 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-03-25 23:14:28 -0400 |
commit | 33045c3e0b061f52d292b037449b1276d388ee8d (patch) | |
tree | 5dc6fdcef82d960cb06dc20a18ce3cbdcf4dfca3 /gtk/gtkbuilder.c | |
parent | 7974751e2432178686b13f9057efcb7dbe39af60 (diff) | |
download | gtk+-33045c3e0b061f52d292b037449b1276d388ee8d.tar.gz |
shortcutaction: Integrate with GtkBuilder property parsing
<property name="action">action(win.quit)</property> style action
specifications now work for GtkShortcutAction properties.
Diffstat (limited to 'gtk/gtkbuilder.c')
-rw-r--r-- | gtk/gtkbuilder.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index c2285dfbf9..7045e8f9df 100644 --- a/gtk/gtkbuilder.c +++ b/gtk/gtkbuilder.c @@ -222,6 +222,7 @@ #include "gtkicontheme.h" #include "gtkintl.h" #include "gtkprivate.h" +#include "gtkshortcutactionprivate.h" #include "gtkshortcuttrigger.h" #include "gtktestutils.h" #include "gtktypebuiltins.h" @@ -2111,6 +2112,13 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, ret = FALSE; } } + else if (G_VALUE_HOLDS (value, GTK_TYPE_SHORTCUT_ACTION)) + { + GtkShortcutAction *action = gtk_shortcut_action_parse_builder (builder, string, error); + + /* Works for success and failure (NULL) case */ + g_value_take_boxed (value, action); + } else if (G_VALUE_HOLDS (value, G_TYPE_STRV)) { gchar **vector = g_strsplit (string, "\n", 0); |