[gthumb] implemented the "ask whether to save" option



commit 111f654b607d1b350aba09b0b8542c71296abe48
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Tue Jun 22 16:55:53 2010 +0200

    implemented the "ask whether to save" option

 gthumb/gth-browser.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index f610fb0..56cc5dd 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -2044,10 +2044,13 @@ _gth_browser_close (GthWindow *window)
 		return;
 	}
 
-	if (gth_browser_get_file_modified (browser))
+	if (eel_gconf_get_boolean (PREF_MSG_SAVE_MODIFIED_IMAGE, DEFAULT_MSG_SAVE_MODIFIED_IMAGE)
+	    && gth_browser_get_file_modified (browser))
+	{
 		_gth_browser_ask_whether_to_save (browser,
 						  close__file_saved_cb,
 						  NULL);
+	}
 	else
 		_gth_browser_real_close (browser);
 }
@@ -2153,10 +2156,13 @@ _gth_browser_set_current_page (GthWindow *window,
 {
 	GthBrowser *browser = GTH_BROWSER (window);
 
-	if (gth_browser_get_file_modified (browser))
+	if (eel_gconf_get_boolean (PREF_MSG_SAVE_MODIFIED_IMAGE, DEFAULT_MSG_SAVE_MODIFIED_IMAGE)
+	    && gth_browser_get_file_modified (browser))
+	{
 		_gth_browser_ask_whether_to_save (browser,
 						  set_current_page__file_saved_cb,
 						  GINT_TO_POINTER (page));
+	}
 	else
 		_gth_browser_real_set_current_page (window, page);
 }
@@ -5012,7 +5018,9 @@ load_file_delayed_cb (gpointer user_data)
 		browser->priv->load_file_timeout = 0;
 	}
 
-	if (gth_browser_get_file_modified (browser)) {
+	if (eel_gconf_get_boolean (PREF_MSG_SAVE_MODIFIED_IMAGE, DEFAULT_MSG_SAVE_MODIFIED_IMAGE)
+	    && gth_browser_get_file_modified (browser))
+	{
 		load_file_data_ref (data);
 		_gth_browser_ask_whether_to_save (browser,
 						  load_file__previuos_file_saved_cb,



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