[gimp/metadata-browser] Serialize XMP_TYPE_TEXT values correctly.
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] Serialize XMP_TYPE_TEXT values correctly.
- Date: Sat, 1 Oct 2011 04:27:47 +0000 (UTC)
commit 3a359c82a10ae45930e53f2daaef702fe750d634
Author: Roman Joost <roman bromeco de>
Date: Thu Sep 29 13:53:49 2011 +1000
Serialize XMP_TYPE_TEXT values correctly.
The description writer is a XMP_TYPE_TEXT property, which should be
serialized correctly._
plug-ins/metadata/tests/files/test.xmp | 4 ++++
.../metadata/tests/test-xmp-model-functional.c | 7 ++++---
plug-ins/metadata/xmp-encode.c | 4 +++-
3 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/metadata/tests/files/test.xmp b/plug-ins/metadata/tests/files/test.xmp
index 7ff6369..b61eb38 100644
--- a/plug-ins/metadata/tests/files/test.xmp
+++ b/plug-ins/metadata/tests/files/test.xmp
@@ -21,6 +21,10 @@
</dc:description>
</rdf:Description>
+ <rdf:Description rdf:about=""
+ xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
+ <photoshop:CaptionWriter>Description Writer</photoshop:CaptionWriter>
+ </rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end='r'?>
diff --git a/plug-ins/metadata/tests/test-xmp-model-functional.c b/plug-ins/metadata/tests/test-xmp-model-functional.c
index e24f862..74d0fad 100644
--- a/plug-ins/metadata/tests/test-xmp-model-functional.c
+++ b/plug-ins/metadata/tests/test-xmp-model-functional.c
@@ -49,9 +49,10 @@ typedef struct
static TestDataEntry propertiestotest[] =
{
- { "dc", "title", 1 },
- { "dc", "creator", 0 },
- { "dc", "description", 1 },
+ { XMP_PREFIX_DUBLIN_CORE, "title", 1 },
+ { XMP_PREFIX_DUBLIN_CORE, "creator", 0 },
+ { XMP_PREFIX_DUBLIN_CORE, "description", 1 },
+ { XMP_PREFIX_PHOTOSHOP, "CaptionWriter", 0 },
{ NULL, NULL, 0 }
};
TestDataEntry * const import_exportdata = propertiestotest;
diff --git a/plug-ins/metadata/xmp-encode.c b/plug-ins/metadata/xmp-encode.c
index a1b6039..0ea95e7 100644
--- a/plug-ins/metadata/xmp-encode.c
+++ b/plug-ins/metadata/xmp-encode.c
@@ -116,7 +116,9 @@ gen_property (GString *buffer,
case XMP_TYPE_TEXT:
case XMP_TYPE_RATIONAL:
gen_element (buffer, 2,
- schema->prefix, property->name, value_array[0],
+ schema->prefix,
+ property->name,
+ (value != NULL) ? value : value_array[0],
NULL);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]