From 653b766e306d4e4c3297aef31103ddaf6bf90ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 25 Mar 2017 17:17:40 +0100 Subject: [PATCH] widget: Add a GtkBuildable::add_child implementation Just call gtk_widget_set_parent in there. --- gtk/gtkwidget.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 33547f1a23..001a190850 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -12164,6 +12164,15 @@ static GQuark quark_builder_has_focus = 0; static GQuark quark_builder_atk_relations = 0; static GQuark quark_builder_set_name = 0; +static void +gtk_widget_buildable_add_child (GtkBuildable *buildable, + GtkBuilder *builder, + GObject *child, + const gchar *type) +{ + gtk_widget_set_parent (GTK_WIDGET (child), GTK_WIDGET (buildable)); +} + static void gtk_widget_buildable_interface_init (GtkBuildableIface *iface) { @@ -12179,6 +12188,7 @@ gtk_widget_buildable_interface_init (GtkBuildableIface *iface) iface->parser_finished = gtk_widget_buildable_parser_finished; iface->custom_tag_start = gtk_widget_buildable_custom_tag_start; iface->custom_finished = gtk_widget_buildable_custom_finished; + iface->add_child = gtk_widget_buildable_add_child; } static void