summaryrefslogtreecommitdiff
path: root/gtk/gtkcenterbox.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-03-08 03:13:57 +0100
committerCarlos Garnacho <carlosg@gnome.org>2018-04-26 17:59:41 +0200
commit9c0acf62b47102e3b16b29839516f8528f5590d3 (patch)
tree0b8583dc2f6dd51aaac68569dad7da39da530a18 /gtk/gtkcenterbox.c
parent9af03fa602b8b0cd72572c64e2e8ed3e63ede03f (diff)
downloadgtk+-9c0acf62b47102e3b16b29839516f8528f5590d3.tar.gz
widget: Allow adding event controllers in ui files
Diffstat (limited to 'gtk/gtkcenterbox.c')
-rw-r--r--gtk/gtkcenterbox.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkcenterbox.c b/gtk/gtkcenterbox.c
index 83d378f9a0..2d3354c0d7 100644
--- a/gtk/gtkcenterbox.c
+++ b/gtk/gtkcenterbox.c
@@ -88,6 +88,8 @@ enum {
PROP_ORIENTATION
};
+static GtkBuildableIface *parent_buildable_iface;
+
static void gtk_center_box_buildable_init (GtkBuildableIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkCenterBox, gtk_center_box, GTK_TYPE_WIDGET,
@@ -107,12 +109,14 @@ gtk_center_box_buildable_add_child (GtkBuildable *buildable,
else if (g_strcmp0 (type, "end") == 0)
gtk_center_box_set_end_widget (GTK_CENTER_BOX (buildable), GTK_WIDGET (child));
else
- GTK_BUILDER_WARN_INVALID_CHILD_TYPE (GTK_CENTER_BOX (buildable), type);
+ parent_buildable_iface->add_child (buildable, builder, child, type);
}
static void
gtk_center_box_buildable_init (GtkBuildableIface *iface)
{
+ parent_buildable_iface = g_type_interface_peek_parent (iface);
+
iface->add_child = gtk_center_box_buildable_add_child;
}