[gimp] Enable some #if 0'ed code and use the just added API



commit ee2fdbcf8fb217438c9ebd97bd531cab49653121
Author: Michael Natterer <mitch gimp org>
Date:   Tue Sep 29 23:01:33 2009 +0200

    Enable some #if 0'ed code and use the just added API
    
    gimp_display_delete(): remove shells from image windows with more than
    one shell instead of destroying the window.

 app/display/gimpdisplay.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/app/display/gimpdisplay.c b/app/display/gimpdisplay.c
index b34dba5..2e09cb6 100644
--- a/app/display/gimpdisplay.c
+++ b/app/display/gimpdisplay.c
@@ -459,16 +459,20 @@ gimp_display_delete (GimpDisplay *display)
        */
       display->shell = NULL;
 
-      /* FIXME image window: enable this code for multiple shells */
-#if 0
-      if (window && gimp_image_window_get_n_displays (window) > 1)
+      if (window)
         {
-          gimp_image_window_remove_display (window, display);
+          if (gimp_image_window_get_n_shells (window) > 1)
+            {
+              gimp_image_window_remove_shell (window, shell);
+            }
+          else
+            {
+              gtk_widget_destroy (GTK_WIDGET (window));
+            }
         }
-      else if (window)
-#endif
+      else
         {
-          gtk_widget_destroy (GTK_WIDGET (window));
+          g_object_unref (shell);
         }
     }
 



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