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



commit 9a6344d8923c816cf23272ddf6b64136be89bccf
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]