app: remove the "confirm-on-close" preference

the warning dialog cannot be disabled any longer now.
This commit is contained in:
Michael Natterer
2012-05-07 14:02:36 +02:00
parent 6c3372cefb
commit e2c8a60665
5 changed files with 10 additions and 24 deletions

View File

@ -60,7 +60,6 @@ enum
PROP_SHOW_PAINT_TOOL_CURSOR, PROP_SHOW_PAINT_TOOL_CURSOR,
PROP_IMAGE_TITLE_FORMAT, PROP_IMAGE_TITLE_FORMAT,
PROP_IMAGE_STATUS_FORMAT, PROP_IMAGE_STATUS_FORMAT,
PROP_CONFIRM_ON_CLOSE,
PROP_MONITOR_XRESOLUTION, PROP_MONITOR_XRESOLUTION,
PROP_MONITOR_YRESOLUTION, PROP_MONITOR_YRESOLUTION,
PROP_MONITOR_RES_FROM_GDK, PROP_MONITOR_RES_FROM_GDK,
@ -77,6 +76,7 @@ enum
PROP_USE_EVENT_HISTORY, PROP_USE_EVENT_HISTORY,
/* ignored, only for backward compatibility: */ /* ignored, only for backward compatibility: */
PROP_CONFIRM_ON_CLOSE,
PROP_XOR_COLOR PROP_XOR_COLOR
}; };
@ -186,10 +186,6 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
IMAGE_STATUS_FORMAT_BLURB, IMAGE_STATUS_FORMAT_BLURB,
GIMP_CONFIG_DEFAULT_IMAGE_STATUS_FORMAT, GIMP_CONFIG_DEFAULT_IMAGE_STATUS_FORMAT,
GIMP_PARAM_STATIC_STRINGS); 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, GIMP_CONFIG_INSTALL_PROP_RESOLUTION (object_class, PROP_MONITOR_XRESOLUTION,
"monitor-xresolution", "monitor-xresolution",
MONITOR_XRESOLUTION_BLURB, MONITOR_XRESOLUTION_BLURB,
@ -268,6 +264,10 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS); GIMP_PARAM_STATIC_STRINGS);
/* only for backward compatibility: */ /* 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, GIMP_CONFIG_INSTALL_PROP_RGB (object_class, PROP_XOR_COLOR,
"xor-color", NULL, "xor-color", NULL,
FALSE, &color, FALSE, &color,
@ -367,9 +367,6 @@ gimp_display_config_set_property (GObject *object,
g_free (display_config->image_status_format); g_free (display_config->image_status_format);
display_config->image_status_format = g_value_dup_string (value); display_config->image_status_format = g_value_dup_string (value);
break; break;
case PROP_CONFIRM_ON_CLOSE:
display_config->confirm_on_close = g_value_get_boolean (value);
break;
case PROP_MONITOR_XRESOLUTION: case PROP_MONITOR_XRESOLUTION:
display_config->monitor_xres = g_value_get_double (value); display_config->monitor_xres = g_value_get_double (value);
break; break;
@ -417,6 +414,8 @@ gimp_display_config_set_property (GObject *object,
case PROP_USE_EVENT_HISTORY: case PROP_USE_EVENT_HISTORY:
display_config->use_event_history = g_value_get_boolean (value); display_config->use_event_history = g_value_get_boolean (value);
break; break;
case PROP_CONFIRM_ON_CLOSE:
case PROP_XOR_COLOR: case PROP_XOR_COLOR:
/* ignored */ /* ignored */
break; break;
@ -482,9 +481,6 @@ gimp_display_config_get_property (GObject *object,
case PROP_IMAGE_STATUS_FORMAT: case PROP_IMAGE_STATUS_FORMAT:
g_value_set_string (value, display_config->image_status_format); g_value_set_string (value, display_config->image_status_format);
break; break;
case PROP_CONFIRM_ON_CLOSE:
g_value_set_boolean (value, display_config->confirm_on_close);
break;
case PROP_MONITOR_XRESOLUTION: case PROP_MONITOR_XRESOLUTION:
g_value_set_double (value, display_config->monitor_xres); g_value_set_double (value, display_config->monitor_xres);
break; break;
@ -527,6 +523,8 @@ gimp_display_config_get_property (GObject *object,
case PROP_USE_EVENT_HISTORY: case PROP_USE_EVENT_HISTORY:
g_value_set_boolean (value, display_config->use_event_history); g_value_set_boolean (value, display_config->use_event_history);
break; break;
case PROP_CONFIRM_ON_CLOSE:
case PROP_XOR_COLOR: case PROP_XOR_COLOR:
/* ignored */ /* ignored */
break; break;

View File

@ -56,7 +56,6 @@ struct _GimpDisplayConfig
gboolean show_paint_tool_cursor; gboolean show_paint_tool_cursor;
gchar *image_title_format; gchar *image_title_format;
gchar *image_status_format; gchar *image_status_format;
gboolean confirm_on_close;
gdouble monitor_xres; gdouble monitor_xres;
gdouble monitor_yres; gdouble monitor_yres;
gboolean monitor_res_from_gdk; gboolean monitor_res_from_gdk;

View File

@ -42,9 +42,6 @@ N_("Specifies how the area around the image should be drawn.")
#define COLOR_PROFILE_POLICY_BLURB \ #define COLOR_PROFILE_POLICY_BLURB \
N_("How to handle embedded color profiles when opening a file.") 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 \ #define CURSOR_FORMAT_BLURB \
N_("Sets the pixel format to use for mouse pointers.") N_("Sets the pixel format to use for mouse pointers.")

View File

@ -1560,13 +1560,6 @@ prefs_dialog_new (Gimp *gimp,
_("Maximum _filesize for thumbnailing:"), _("Maximum _filesize for thumbnailing:"),
GTK_TABLE (table), 1, size_group); 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); g_object_unref (size_group);
size_group = NULL; size_group = NULL;

View File

@ -88,8 +88,7 @@ gimp_display_shell_close (GimpDisplayShell *shell,
if (! kill_it && if (! kill_it &&
image && image &&
gimp_image_get_display_count (image) == 1 && gimp_image_get_display_count (image) == 1 &&
gimp_image_is_dirty (image) && gimp_image_is_dirty (image))
shell->display->config->confirm_on_close)
{ {
/* If there's a save dialog active for this image, then raise it. /* If there's a save dialog active for this image, then raise it.
* (see bug #511965) * (see bug #511965)