gimp r25316 - in trunk: . app/widgets



Author: neo
Date: Sun Mar 30 18:20:36 2008
New Revision: 25316
URL: http://svn.gnome.org/viewvc/gimp?rev=25316&view=rev

Log:
2008-03-30  Sven Neumann  <sven gimp org>

	* app/widgets/gimpcontainertreeview.c: added a finalizer that 
frees
	the memory allocated for the cell lists.



Modified:
   trunk/ChangeLog
   trunk/app/widgets/gimpcontainertreeview.c

Modified: trunk/app/widgets/gimpcontainertreeview.c
==============================================================================
--- trunk/app/widgets/gimpcontainertreeview.c	(original)
+++ trunk/app/widgets/gimpcontainertreeview.c	Sun Mar 30 18:20:36 2008
@@ -57,6 +57,7 @@
                                                        guint                   n_params,
                                                        GObjectConstructParam  *params);
 
+static void    gimp_container_tree_view_finalize      (GObject                *object);
 static void    gimp_container_tree_view_unmap         (GtkWidget              *widget);
 static gboolean  gimp_container_tree_view_popup_menu  (GtkWidget              *widget);
 
@@ -124,6 +125,7 @@
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
   object_class->constructor = gimp_container_tree_view_constructor;
+  object_class->finalize    = gimp_container_tree_view_finalize;
 
   widget_class->unmap       = gimp_container_tree_view_unmap;
   widget_class->popup_menu  = gimp_container_tree_view_popup_menu;
@@ -271,6 +273,32 @@
 }
 
 static void
+gimp_container_tree_view_finalize (GObject *object)
+{
+  GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (object);
+
+  if (tree_view->toggle_cells)
+    {
+      g_list_free (tree_view->toggle_cells);
+      tree_view->toggle_cells = NULL;
+    }
+
+  if (tree_view->renderer_cells)
+    {
+      g_list_free (tree_view->renderer_cells);
+      tree_view->renderer_cells = NULL;
+    }
+
+  if (tree_view->editable_cells)
+    {
+      g_list_free (tree_view->editable_cells);
+      tree_view->editable_cells = NULL;
+    }
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
 gimp_container_tree_view_unmap (GtkWidget *widget)
 {
   GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (widget);



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