[gthumb/gthumb-2-14] exiv2: preserve the Xmp lists read from the sidecars as well
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb/gthumb-2-14] exiv2: preserve the Xmp lists read from the sidecars as well
- Date: Sun, 29 Apr 2012 10:41:12 +0000 (UTC)
commit f654f2602719565ef05c8ade5a301ab227c792eb
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Apr 29 11:41:22 2012 +0200
exiv2: preserve the Xmp lists read from the sidecars as well
extensions/exiv2_tools/exiv2-utils.cpp | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/extensions/exiv2_tools/exiv2-utils.cpp b/extensions/exiv2_tools/exiv2-utils.cpp
index a270412..a0fc465 100644
--- a/extensions/exiv2_tools/exiv2-utils.cpp
+++ b/extensions/exiv2_tools/exiv2-utils.cpp
@@ -288,8 +288,8 @@ create_metadata (const char *key,
static void
-add_string_list_to_metadata (GthMetadata *metadata,
- const Exiv2::Value &value)
+add_string_list_to_metadata (GthMetadata *metadata,
+ const Exiv2::Metadatum &value)
{
GList *list = NULL;
GthStringList *string_list;
@@ -665,7 +665,7 @@ exiv2_read_metadata (Exiv2::Image::AutoPtr image,
if ((g_strcmp0 (md->typeName(), "XmpBag") == 0)
|| (g_strcmp0 (md->typeName(), "XmpSeq") == 0))
{
- add_string_list_to_metadata (metadata, md->value());
+ add_string_list_to_metadata (metadata, *md);
}
add_metadata_to_hash (table, metadata);
@@ -817,6 +817,13 @@ exiv2_read_sidecar (GFile *file,
raw_value.str().c_str(),
"Xmp::Sidecar",
md->typeName());
+
+ if ((g_strcmp0 (md->typeName(), "XmpBag") == 0)
+ || (g_strcmp0 (md->typeName(), "XmpSeq") == 0))
+ {
+ add_string_list_to_metadata (metadata, *md);
+ }
+
add_metadata_to_hash (table, metadata);
_g_object_unref (metadata);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]