]> Pileus Git - ~andy/gtk/commitdiff
Manually pulling back a GtkTreeViewColumn fix from treeview-refactor-staging
authorTristan Van Berkom <tristan.van.berkom@gmail.com>
Thu, 2 Dec 2010 08:42:46 +0000 (17:42 +0900)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Thu, 2 Dec 2010 08:42:46 +0000 (17:42 +0900)
This fix has evolved in the staging branch since all column members are
on a private structure, but since it causes warnings when closing the
windows of the testcellarea test (because the combo-boxes use a treeviewcolumn)
I thought it nice for now to just manually include the fix.

The fix is just proper bookkeeping of delegate objects at dispose() time.

gtk/gtktreeviewcolumn.c

index 363082cfa4d486a08e35eb6b2efb1454abb87c3a..f4aa2657375150a8839d28953bdc3c60c9323a71 100644 (file)
@@ -396,17 +396,20 @@ gtk_tree_view_column_dispose (GObject *object)
   GtkTreeViewColumn *tree_column = (GtkTreeViewColumn *) object;
 
   if (tree_column->cell_area_context)
-    {
-      g_object_unref (tree_column->cell_area_context);
-
+    { 
       g_signal_handler_disconnect (tree_column->cell_area_context,
                                   tree_column->context_changed_signal);
+
+      g_object_unref (tree_column->cell_area_context);
+
+      tree_column->cell_area_context = NULL;
       tree_column->context_changed_signal = 0;
     }
 
   if (tree_column->cell_area)
     {
       g_object_unref (tree_column->cell_area);
+      tree_column->cell_area = NULL;
     }
 
   if (tree_column->child)