[gtk+/composite-templates: 6/17] gtk_container_class_set_template() Clear list of classes with templates since this function in rare



commit af394406f7497ef9835450cea7f1b329a762f64a
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Thu Sep 27 21:38:31 2012 -0300

    gtk_container_class_set_template() Clear list of classes with templates since
    this function in rare occacions can be called more than once. (Glade)

 gtk/gtkcontainer.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index a89dd92..fa3379c 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -1408,6 +1408,12 @@ gtk_container_class_set_template (GtkContainerClass *container_class,
   priv->tmpl = tmpl;
   priv->tmpl_type = tmpl_type;
 
+  if (priv->tmpl_classes)
+    {
+      g_slist_free (priv->tmpl_classes);
+      priv->tmpl_classes = NULL;
+    }
+
   /* Collect an ordered list of class which have templates to build */
   for (oclass = G_OBJECT_CLASS (container_class);
        GTK_IS_CONTAINER_CLASS (oclass);



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