[gimp] app: remove the "confirm-on-close" preference



commit e2c8a60665499cc945838fbd5a99964b09ec8892
Author: Michael Natterer <mitch gimp org>
Date:   Mon May 7 14:02:36 2012 +0200

    app: remove the "confirm-on-close" preference
    
    the warning dialog cannot be disabled any longer now.

 app/config/gimpdisplayconfig.c       |   20 +++++++++-----------
 app/config/gimpdisplayconfig.h       |    1 -
 app/config/gimprc-blurbs.h           |    3 ---
 app/dialogs/preferences-dialog.c     |    7 -------
 app/display/gimpdisplayshell-close.c |    3 +--
 5 files changed, 10 insertions(+), 24 deletions(-)
---
diff --git a/app/config/gimpdisplayconfig.c b/app/config/gimpdisplayconfig.c
index 4d8be48..246dc39 100644
--- a/app/config/gimpdisplayconfig.c
+++ b/app/config/gimpdisplayconfig.c
@@ -60,7 +60,6 @@ enum
   PROP_SHOW_PAINT_TOOL_CURSOR,
   PROP_IMAGE_TITLE_FORMAT,
   PROP_IMAGE_STATUS_FORMAT,
-  PROP_CONFIRM_ON_CLOSE,
   PROP_MONITOR_XRESOLUTION,
   PROP_MONITOR_YRESOLUTION,
   PROP_MONITOR_RES_FROM_GDK,
@@ -77,6 +76,7 @@ enum
   PROP_USE_EVENT_HISTORY,
 
   /* ignored, only for backward compatibility: */
+  PROP_CONFIRM_ON_CLOSE,
   PROP_XOR_COLOR
 };
 
@@ -186,10 +186,6 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
                                    IMAGE_STATUS_FORMAT_BLURB,
                                    GIMP_CONFIG_DEFAULT_IMAGE_STATUS_FORMAT,
                                    GIMP_PARAM_STATIC_STRINGS);
-  GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_CONFIRM_ON_CLOSE,
-                                    "confirm-on-close", CONFIRM_ON_CLOSE_BLURB,
-                                    TRUE,
-                                    GIMP_PARAM_STATIC_STRINGS);
   GIMP_CONFIG_INSTALL_PROP_RESOLUTION (object_class, PROP_MONITOR_XRESOLUTION,
                                        "monitor-xresolution",
                                        MONITOR_XRESOLUTION_BLURB,
@@ -268,6 +264,10 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
                                     GIMP_PARAM_STATIC_STRINGS);
 
   /*  only for backward compatibility:  */
+  GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_CONFIRM_ON_CLOSE,
+                                    "confirm-on-close", NULL,
+                                    TRUE,
+                                    GIMP_PARAM_STATIC_STRINGS);
   GIMP_CONFIG_INSTALL_PROP_RGB (object_class, PROP_XOR_COLOR,
                                 "xor-color", NULL,
                                 FALSE, &color,
@@ -367,9 +367,6 @@ gimp_display_config_set_property (GObject      *object,
       g_free (display_config->image_status_format);
       display_config->image_status_format = g_value_dup_string (value);
       break;
-    case PROP_CONFIRM_ON_CLOSE:
-      display_config->confirm_on_close = g_value_get_boolean (value);
-      break;
     case PROP_MONITOR_XRESOLUTION:
       display_config->monitor_xres = g_value_get_double (value);
       break;
@@ -417,6 +414,8 @@ gimp_display_config_set_property (GObject      *object,
     case PROP_USE_EVENT_HISTORY:
       display_config->use_event_history = g_value_get_boolean (value);
       break;
+
+    case PROP_CONFIRM_ON_CLOSE:
     case PROP_XOR_COLOR:
       /* ignored */
       break;
@@ -482,9 +481,6 @@ gimp_display_config_get_property (GObject    *object,
     case PROP_IMAGE_STATUS_FORMAT:
       g_value_set_string (value, display_config->image_status_format);
       break;
-    case PROP_CONFIRM_ON_CLOSE:
-      g_value_set_boolean (value, display_config->confirm_on_close);
-      break;
     case PROP_MONITOR_XRESOLUTION:
       g_value_set_double (value, display_config->monitor_xres);
       break;
@@ -527,6 +523,8 @@ gimp_display_config_get_property (GObject    *object,
     case PROP_USE_EVENT_HISTORY:
       g_value_set_boolean (value, display_config->use_event_history);
       break;
+
+    case PROP_CONFIRM_ON_CLOSE:
     case PROP_XOR_COLOR:
       /* ignored */
       break;
diff --git a/app/config/gimpdisplayconfig.h b/app/config/gimpdisplayconfig.h
index 427e50e..2c6a7e5 100644
--- a/app/config/gimpdisplayconfig.h
+++ b/app/config/gimpdisplayconfig.h
@@ -56,7 +56,6 @@ struct _GimpDisplayConfig
   gboolean            show_paint_tool_cursor;
   gchar              *image_title_format;
   gchar              *image_status_format;
-  gboolean            confirm_on_close;
   gdouble             monitor_xres;
   gdouble             monitor_yres;
   gboolean            monitor_res_from_gdk;
diff --git a/app/config/gimprc-blurbs.h b/app/config/gimprc-blurbs.h
index d8f6e44..2af5a29 100644
--- a/app/config/gimprc-blurbs.h
+++ b/app/config/gimprc-blurbs.h
@@ -42,9 +42,6 @@ N_("Specifies how the area around the image should be drawn.")
 #define COLOR_PROFILE_POLICY_BLURB \
 N_("How to handle embedded color profiles when opening a file.")
 
-#define CONFIRM_ON_CLOSE_BLURB \
-N_("Ask for confirmation before closing an image without saving.")
-
 #define CURSOR_FORMAT_BLURB \
 N_("Sets the pixel format to use for mouse pointers.")
 
diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c
index 5a6e444..8cb7525 100644
--- a/app/dialogs/preferences-dialog.c
+++ b/app/dialogs/preferences-dialog.c
@@ -1560,13 +1560,6 @@ prefs_dialog_new (Gimp       *gimp,
                            _("Maximum _filesize for thumbnailing:"),
                            GTK_TABLE (table), 1, size_group);
 
-  /*  File Saving  */
-  vbox2 = prefs_frame_new (_("Saving Images"), GTK_CONTAINER (vbox), FALSE);
-
-  prefs_check_button_add (object, "confirm-on-close",
-                          _("Confirm closing of unsa_ved images"),
-                          GTK_BOX (vbox2));
-
   g_object_unref (size_group);
   size_group = NULL;
 
diff --git a/app/display/gimpdisplayshell-close.c b/app/display/gimpdisplayshell-close.c
index c90a662..b10de28 100644
--- a/app/display/gimpdisplayshell-close.c
+++ b/app/display/gimpdisplayshell-close.c
@@ -88,8 +88,7 @@ gimp_display_shell_close (GimpDisplayShell *shell,
   if (! kill_it                                 &&
       image                                     &&
       gimp_image_get_display_count (image) == 1 &&
-      gimp_image_is_dirty (image)               &&
-      shell->display->config->confirm_on_close)
+      gimp_image_is_dirty (image))
     {
       /*  If there's a save dialog active for this image, then raise it.
        *  (see bug #511965)



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