[gtk+] widget: Add a GtkBuildable::add_child implementation



commit 653b766e306d4e4c3297aef31103ddaf6bf90ec9
Author: Timm Bäder <mail baedert org>
Date:   Sat Mar 25 17:17:40 2017 +0100

    widget: Add a GtkBuildable::add_child implementation
    
    Just call gtk_widget_set_parent in there.

 gtk/gtkwidget.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 33547f1..001a190 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -12165,6 +12165,15 @@ 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)
 {
   quark_builder_has_default = g_quark_from_static_string ("gtk-builder-has-default");
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]