[gimp] app: keep track of compatibility mode on an image.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: keep track of compatibility mode on an image.
- Date: Tue, 1 Sep 2015 13:21:18 +0000 (UTC)
commit bdece29d8cc028b07680c0777301cb134c7d8fa6
Author: Jehan <jehan girinstud io>
Date: Tue Sep 1 15:17:44 2015 +0200
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.
app/actions/file-commands.c | 3 ++-
app/dialogs/file-save-dialog.c | 6 +-----
app/widgets/gimpfiledialog.c | 5 +++--
3 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/app/actions/file-commands.c b/app/actions/file-commands.c
index 3cae699..2608696 100644
--- a/app/actions/file-commands.c
+++ b/app/actions/file-commands.c
@@ -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;
}
diff --git a/app/dialogs/file-save-dialog.c b/app/dialogs/file-save-dialog.c
index c75b549..e922d44 100644
--- a/app/dialogs/file-save-dialog.c
+++ b/app/dialogs/file-save-dialog.c
@@ -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:
diff --git a/app/widgets/gimpfiledialog.c b/app/widgets/gimpfiledialog.c
index 3718f45..a1e8c5f 100644
--- a/app/widgets/gimpfiledialog.c
+++ b/app/widgets/gimpfiledialog.c
@@ -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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]