[gimp] app: Check for dirty images before forcing single-window mode



commit 33573b466b4aeda9c2461e3d111085a5194d0ee6
Author: Martin Nordholts <martinn src gnome org>
Date:   Wed Jan 6 18:19:20 2010 +0100

    app: Check for dirty images before forcing single-window mode
    
    Check for dirty images before forcing single-window mode since it is
    annoying to have the UI split up and _then_ being asked about unsaved
    images. The user might even click 'Cancel' in which case the UI will
    have been switched to multi-window mode.

 app/gui/gui.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/app/gui/gui.c b/app/gui/gui.c
index bcb5a5b..d182c8f 100644
--- a/app/gui/gui.c
+++ b/app/gui/gui.c
@@ -562,13 +562,6 @@ gui_exit_callback (Gimp     *gimp,
   if (gimp->be_verbose)
     g_print ("EXIT: %s\n", G_STRFUNC);
 
-  /* Since single-window mode is not session managed yet, force
-   * disabling of the mode before exit to prevent loss of dockables
-   */
-  g_object_set (gui_config,
-                "single-window-mode", FALSE,
-                NULL);
-
   if (! force && gimp_displays_dirty (gimp))
     {
       gimp_dialog_factory_dialog_raise (global_dialog_factory,
@@ -578,6 +571,15 @@ gui_exit_callback (Gimp     *gimp,
       return TRUE; /* stop exit for now */
     }
 
+  /* Since single-window mode is not session managed yet, force
+   * disabling of the mode before exit to prevent loss of
+   * dockables. Make sure to do this _after_ we have asked about
+   * saving unsaved images.
+   */
+  g_object_set (gui_config,
+                "single-window-mode", FALSE,
+                NULL);
+
   gimp->message_handler = GIMP_CONSOLE;
 
   gui_unique_exit ();



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