diff options
author | Benjamin Otte <otte@redhat.com> | 2018-03-08 03:13:57 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2018-04-26 17:59:41 +0200 |
commit | 9c0acf62b47102e3b16b29839516f8528f5590d3 (patch) | |
tree | 0b8583dc2f6dd51aaac68569dad7da39da530a18 /gtk/gtkframe.c | |
parent | 9af03fa602b8b0cd72572c64e2e8ed3e63ede03f (diff) | |
download | gtk+-9c0acf62b47102e3b16b29839516f8528f5590d3.tar.gz |
widget: Allow adding event controllers in ui files
Diffstat (limited to 'gtk/gtkframe.c')
-rw-r--r-- | gtk/gtkframe.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index 38dea2211d..62a8428dc6 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -206,9 +206,13 @@ gtk_frame_class_init (GtkFrameClass *class) gtk_widget_class_set_css_name (widget_class, I_("frame")); } +static GtkBuildableIface *parent_buildable_iface; + static void gtk_frame_buildable_init (GtkBuildableIface *iface) { + parent_buildable_iface = g_type_interface_peek_parent (iface); + iface->add_child = gtk_frame_buildable_add_child; } @@ -220,10 +224,8 @@ gtk_frame_buildable_add_child (GtkBuildable *buildable, { if (type && strcmp (type, "label") == 0) gtk_frame_set_label_widget (GTK_FRAME (buildable), GTK_WIDGET (child)); - else if (!type) - gtk_container_add (GTK_CONTAINER (buildable), GTK_WIDGET (child)); else - GTK_BUILDER_WARN_INVALID_CHILD_TYPE (GTK_FRAME (buildable), type); + parent_buildable_iface->add_child (buildable, builder, child, type); } static void |