[gimp] app: remove the docks manually in dispose() for the reason below



commit 79dbfb2b51c1ea08b797be442a86dcd6e1755037
Author: Michael Natterer <mitch gimp org>
Date:   Sat Jun 26 23:27:17 2010 +0200

    app: remove the docks manually in dispose() for the reason below

 app/widgets/gimpdockcolumns.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpdockcolumns.c b/app/widgets/gimpdockcolumns.c
index 3df842e..7115a4e 100644
--- a/app/widgets/gimpdockcolumns.c
+++ b/app/widgets/gimpdockcolumns.c
@@ -71,6 +71,7 @@ struct _GimpDockColumnsPrivate
 };
 
 
+static void      gimp_dock_columns_dispose           (GObject         *object);
 static void      gimp_dock_columns_set_property      (GObject         *object,
                                                       guint            property_id,
                                                       const GValue    *value,
@@ -103,6 +104,7 @@ gimp_dock_columns_class_init (GimpDockColumnsClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
+  object_class->dispose      = gimp_dock_columns_dispose;
   object_class->set_property = gimp_dock_columns_set_property;
   object_class->get_property = gimp_dock_columns_get_property;
 
@@ -168,6 +170,17 @@ gimp_dock_columns_init (GimpDockColumns *dock_columns)
 }
 
 static void
+gimp_dock_columns_dispose (GObject *object)
+{
+  GimpDockColumns *dock_columns = GIMP_DOCK_COLUMNS (object);
+
+  while (dock_columns->p->docks)
+    gimp_dock_columns_remove_dock (dock_columns, dock_columns->p->docks->data);
+
+  G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
 gimp_dock_columns_set_property (GObject      *object,
                                 guint         property_id,
                                 const GValue *value,



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