app: do not request xcf compat mode when compat_toggle not sensitive.

In some cases, on could end up with photographs with metadata as XCF
version 6, which is useless since this is not compatible with GIMP 2.8
either.
This commit is contained in:
Jehan
2015-12-08 20:10:45 +01:00
parent 0e460fee65
commit 01bdb712f9

View File

@ -178,8 +178,18 @@ file_save_dialog_response (GtkWidget *dialog,
break; break;
case CHECK_URI_OK: case CHECK_URI_OK:
{
gboolean xcf_compat = FALSE;
gimp_file_dialog_set_sensitive (file_dialog, FALSE); gimp_file_dialog_set_sensitive (file_dialog, FALSE);
if (GIMP_IS_SAVE_DIALOG (dialog))
{
GimpSaveDialog* save_dialog = GIMP_SAVE_DIALOG (dialog);
xcf_compat = save_dialog->compat &&
gtk_widget_get_sensitive (save_dialog->compat_toggle);
}
if (file_save_dialog_save_image (GIMP_PROGRESS (dialog), if (file_save_dialog_save_image (GIMP_PROGRESS (dialog),
gimp, gimp,
file_dialog->image, file_dialog->image,
@ -190,8 +200,7 @@ file_save_dialog_response (GtkWidget *dialog,
! GIMP_SAVE_DIALOG (dialog)->save_a_copy, ! GIMP_SAVE_DIALOG (dialog)->save_a_copy,
FALSE, FALSE,
GIMP_IS_EXPORT_DIALOG (dialog), GIMP_IS_EXPORT_DIALOG (dialog),
GIMP_IS_SAVE_DIALOG (dialog) && xcf_compat,
GIMP_SAVE_DIALOG (dialog)->compat,
FALSE)) FALSE))
{ {
/* Save was successful, now store the URI in a couple of /* Save was successful, now store the URI in a couple of
@ -240,6 +249,7 @@ file_save_dialog_response (GtkWidget *dialog,
g_free (basename); g_free (basename);
gimp_file_dialog_set_sensitive (file_dialog, TRUE); gimp_file_dialog_set_sensitive (file_dialog, TRUE);
}
break; break;
case CHECK_URI_SWITCH_DIALOGS: case CHECK_URI_SWITCH_DIALOGS: