app: keep track of compatibility mode on an image.

If one explicitly enables the compatibility mode, one expects this to
be applied on following saves of the same image as well.
This commit is contained in:
Jehan 2015-09-01 15:17:44 +02:00
parent d1e72b2a01
commit bdece29d8c
3 changed files with 6 additions and 8 deletions

View File

@ -266,7 +266,8 @@ file_save_cmd_callback (GtkAction *action,
save_proc,
GIMP_RUN_WITH_LAST_VALS,
TRUE, FALSE, FALSE,
FALSE, TRUE);
gimp_image_get_xcf_compat_mode (image),
TRUE);
break;
}

View File

@ -754,17 +754,13 @@ file_save_dialog_save_image (GimpProgress *progress,
gimp_action_group_set_action_sensitive (list->data, "file-quit", FALSE);
}
if (xcf_compat)
gimp_image_set_xcf_compat_mode (image, TRUE);
gimp_image_set_xcf_compat_mode (image, xcf_compat);
status = file_save (gimp, image, progress, file,
save_proc, run_mode,
change_saved_state, export_backward, export_forward,
&error);
if (xcf_compat)
gimp_image_set_xcf_compat_mode (image, FALSE);
switch (status)
{
case GIMP_PDB_SUCCESS:

View File

@ -687,8 +687,9 @@ gimp_file_dialog_set_save_image (GimpFileDialog *dialog,
gtk_widget_hide (dialog->compat_toggle);
}
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->compat_toggle),
FALSE);
if (gtk_widget_get_sensitive (dialog->compat_toggle))
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->compat_toggle),
gimp_image_get_xcf_compat_mode (image));
if (ext_file)
{