[gimp] app: check the XCF compat mode is still possible before saving.



commit 55bdd4e81712c7ed872e175aebcf9587ce05d046
Author: Jehan <jehan girinstud io>
Date:   Tue Sep 1 16:02:25 2015 +0200

    app: check the XCF compat mode is still possible before saving.
    
    Even if you saved previously in compatibility mode, you may have used
    new features since, which would cancel the compat mode flag.

 app/actions/file-commands.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/app/actions/file-commands.c b/app/actions/file-commands.c
index 2608696..c313dac 100644
--- a/app/actions/file-commands.c
+++ b/app/actions/file-commands.c
@@ -261,12 +261,19 @@ file_save_cmd_callback (GtkAction *action,
 
           if (file && save_proc)
             {
+              gint rle_version;
+              gint zlib_version;
+
+              gimp_image_get_xcf_version (image, FALSE, &rle_version,  NULL);
+              gimp_image_get_xcf_version (image, TRUE,  &zlib_version, NULL);
+
               saved = file_save_dialog_save_image (GIMP_PROGRESS (display),
                                                    gimp, image, file,
                                                    save_proc,
                                                    GIMP_RUN_WITH_LAST_VALS,
                                                    TRUE, FALSE, FALSE,
-                                                   gimp_image_get_xcf_compat_mode (image),
+                                                   gimp_image_get_xcf_compat_mode (image) &&
+                                                   rle_version != zlib_version,
                                                    TRUE);
               break;
             }


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