[gimp] Default XMP_TYPE_LANG_ALT to "x-default" according to spec.



commit a4ccfcee72e13228ced79185d1116c846df63892
Author: Roman Joost <roman bromeco de>
Date:   Sat May 15 18:56:36 2010 +1000

    Default XMP_TYPE_LANG_ALT to "x-default" according to spec.
    
    To prevent a crash of the meta-data plug-in during export, the encoding
    process now falls back to x-default for XMP_TYPE_LANG_ALT properties.

 plug-ins/metadata/xmp-encode.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/plug-ins/metadata/xmp-encode.c b/plug-ins/metadata/xmp-encode.c
index 7d85171..bf6e375 100644
--- a/plug-ins/metadata/xmp-encode.c
+++ b/plug-ins/metadata/xmp-encode.c
@@ -153,13 +153,10 @@ gen_property (GString            *buffer,
     case XMP_TYPE_LANG_ALT:
       g_string_append_printf (buffer, "  <%s:%s>\n   <rdf:Alt>\n",
                               schema->prefix, property->name);
-      for (i = 0; value_array[i] != NULL; i += 2)
-        {
-          gen_element (buffer, 4,
-                       "rdf", "li", value_array[i + 1],
-                       "xml:lang", value_array[i],
-                       NULL);
-        }
+      gen_element (buffer, 4,
+                   "rdf", "li", value_array[0],
+                   "xml:lang", "x-default",
+                   NULL);
       g_string_append_printf (buffer, "   </rdf:Alt>\n  </%s:%s>\n",
                               schema->prefix, property->name);
       break;



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