[gimp] app: XCF version 6 should not block compatibility mode.



commit d444804e761bb22c3825532ba682d810418e95f2
Author: Jehan <jehan girinstud io>
Date:   Tue Dec 8 20:50:34 2015 +0100

    app: XCF version 6 should not block compatibility mode.
    
    Metadata presence implies XCF version 6 or higher. Yet metadata are
    stored in parasites which are perfecly supported in older GIMP versions
    and are passed along through saving.
    Therefore there is no need to keep XCF 6. We just add a warning telling
    that metadata won't be visible in older GIMP when saving a file with
    metadata and compatibility mode.

 app/core/gimpimage.c         |    6 +++---
 app/widgets/gimpsavedialog.c |   11 +++++++++++
 2 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 0b335f4..b117af1 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -2321,9 +2321,9 @@ gimp_image_get_xcf_version (GimpImage    *image,
 
   g_list_free (layers);
 
-  /* need version 6 for new metadata */
-  if (gimp_image_get_metadata (image))
-    version = MAX (6, version);
+  /* version 6 for new metadata has been dropped since they are
+   * saved through parasites, which is compatible with older versions.
+   */
 
   /* need version 7 for high bit depth images */
   if (gimp_image_get_precision (image) != GIMP_PRECISION_U8_GAMMA)
diff --git a/app/widgets/gimpsavedialog.c b/app/widgets/gimpsavedialog.c
index a5cc198..3a6e2fe 100644
--- a/app/widgets/gimpsavedialog.c
+++ b/app/widgets/gimpsavedialog.c
@@ -32,6 +32,7 @@
 
 #include "core/gimp.h"
 #include "core/gimpimage.h"
+#include "core/gimpimage-metadata.h"
 
 #include "file/file-utils.h"
 #include "file/gimp-file.h"
@@ -280,6 +281,16 @@ gimp_save_dialog_set_image (GimpSaveDialog *dialog,
       tooltip = g_strdup_printf (_("Disables compression to make the XCF "
                                    "file readable by %s and later."),
                                  version_string);
+      if (gimp_image_get_metadata (image))
+        {
+          gchar *temp_tooltip;
+
+          temp_tooltip = g_strconcat (tooltip, "\n",
+                                      _("Metadata won't be visible in GIMP "
+                                        "older than version 2.10."), NULL);
+          g_free (tooltip);
+          tooltip = temp_tooltip;
+        }
     }
 
   gimp_help_set_help_data (dialog->compat_toggle, tooltip, NULL);


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