From 33573b466b4aeda9c2461e3d111085a5194d0ee6 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Wed, 6 Jan 2010 18:19:20 +0100 Subject: [PATCH] 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 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/gui/gui.c b/app/gui/gui.c index bcb5a5b8d0..d182c8f00e 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 ();