[gimp] app: Only kill living dock windows when switching to s-w-m



commit b1b560b0c4f7cf8a47db184f0d7174e1897376db
Author: Martin Nordholts <martinn src gnome org>
Date:   Sun Dec 6 09:50:02 2009 +0100

    app: Only kill living dock windows when switching to s-w-m
    
    Only kill living dock windows when switching to single-window
    mode. When we remove the last dock in a non-toolbox dock window, it
    will commit suicide.

 app/gui/gimpuiconfigurer.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/app/gui/gimpuiconfigurer.c b/app/gui/gimpuiconfigurer.c
index 4ce2308..e9f90cd 100644
--- a/app/gui/gimpuiconfigurer.c
+++ b/app/gui/gimpuiconfigurer.c
@@ -186,10 +186,15 @@ gimp_ui_configurer_move_docks_to_columns (GimpUIConfigurer  *ui_configurer,
         }
       g_list_free (docks);
 
-      /* Kill the dock window, we don't need it any longer */
-      gimp_dialog_factory_remove_dialog (dialog_factory,
-                                         GTK_WIDGET (dock_window));
-      gtk_widget_destroy (GTK_WIDGET (dock_window));
+      /* Kill the window if removing the dock didn't destroy it
+       * already. This will be the case forthe toolbox dock window
+       */
+      if (GTK_IS_WIDGET (dock_window))
+        {
+          gimp_dialog_factory_remove_dialog (dialog_factory,
+                                             GTK_WIDGET (dock_window));
+          gtk_widget_destroy (GTK_WIDGET (dock_window));
+        }
     }
 }
 



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