[gimp] app: Don't remove dock in destruction from dock column



commit ea666d178bbf67dc64b29bc74e937b374124eaec
Author: Martin Nordholts <martinn src gnome org>
Date:   Sun Mar 7 09:33:33 2010 +0100

    app: Don't remove dock in destruction from dock column
    
    Only remove a dock in the book-removed callback to dock columns if the
    dock has the dock column as parent. It won't during destruction for
    example. This fixes the test case
    /gimp-ui/restore-recently-closed-multi-column-dock.

 app/widgets/gimpdockcolumns.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimpdockcolumns.c b/app/widgets/gimpdockcolumns.c
index e4e9328..f442fdf 100644
--- a/app/widgets/gimpdockcolumns.c
+++ b/app/widgets/gimpdockcolumns.c
@@ -274,7 +274,8 @@ gimp_dock_columns_dock_book_removed (GimpDockColumns *dock_columns,
   g_return_if_fail (GIMP_IS_DOCK (dock));
 
   if (gimp_dock_get_dockbooks (dock) == NULL &&
-      ! GIMP_IS_TOOLBOX (dock))
+      ! GIMP_IS_TOOLBOX (dock) &&
+      gtk_widget_get_parent (GTK_WIDGET (dock)) == GTK_WIDGET (dock_columns))
     gimp_dock_columns_remove_dock (dock_columns, dock);
 }
 



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