[gimp/metadata-browser: 27/44] Changed the serialisation handler for XMP_TYPE_TEXT_SEQ.
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser: 27/44] Changed the serialisation handler for XMP_TYPE_TEXT_SEQ.
- Date: Wed, 12 Sep 2012 23:09:02 +0000 (UTC)
commit feef9957aabcf790d99a902e8f02e8f11750fe65
Author: Roman Joost <roman bromeco de>
Date: Wed Sep 28 19:44:56 2011 +1000
Changed the serialisation handler for XMP_TYPE_TEXT_SEQ.
This handler now correctly serialises data set in the entry widgets.
plug-ins/metadata/xmp-encode.c | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/plug-ins/metadata/xmp-encode.c b/plug-ins/metadata/xmp-encode.c
index 4000c10..fd6adcb 100644
--- a/plug-ins/metadata/xmp-encode.c
+++ b/plug-ins/metadata/xmp-encode.c
@@ -110,6 +110,7 @@ gen_property (GString *buffer,
{
gint i;
const gchar *ns_prefix;
+ gchar **updated_values = NULL;
switch (property->type)
{
@@ -147,12 +148,20 @@ gen_property (GString *buffer,
case XMP_TYPE_RATIONAL_SEQ:
g_string_append_printf (buffer, " <%s:%s>\n <rdf:Seq>\n",
schema->prefix, property->name);
- for (i = 0; value_array[i] != NULL; i++)
- {
- gen_element (buffer, 4,
- "rdf", "li", value_array[i],
- NULL);
- }
+
+ if (value != NULL)
+ updated_values = g_strsplit (value, ";", 0);
+ else
+ {
+ updated_values = (gchar **) value_array;
+ }
+
+ for (i = 0; updated_values[i] != NULL; i++)
+ {
+ gen_element (buffer, 4,
+ "rdf", "li", updated_values[i],
+ NULL);
+ }
g_string_append_printf (buffer, " </rdf:Seq>\n </%s:%s>\n",
schema->prefix, property->name);
break;
@@ -247,6 +256,9 @@ gen_property (GString *buffer,
g_printerr ("Unknown property type for %s", property->name);
break;
}
+
+ g_strfreev (updated_values);
+
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]