[gthumb] Fixed comment lost when upgrading from 2.10 to 2.11
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] Fixed comment lost when upgrading from 2.10 to 2.11
- Date: Mon, 16 Aug 2010 11:01:49 +0000 (UTC)
commit b80580d3341d2b050bf59fdc42973ed28e93bc54
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Aug 16 10:36:43 2010 +0200
Fixed comment lost when upgrading from 2.10 to 2.11
When reading the embedded comment give priority to Iptc::caption
and Xmp::dc::description as in 2.10 they were used to save the
description.
When writing the embedded data save the title in Iptc::headline and
the comment in Iptc::caption.
[bug #626893]
extensions/exiv2_tools/exiv2-utils.cpp | 10 +++++-----
.../exiv2_tools/gth-metadata-provider-exiv2.c | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/extensions/exiv2_tools/exiv2-utils.cpp b/extensions/exiv2_tools/exiv2-utils.cpp
index ad19347..38d031c 100644
--- a/extensions/exiv2_tools/exiv2-utils.cpp
+++ b/extensions/exiv2_tools/exiv2-utils.cpp
@@ -140,12 +140,12 @@ const char *_ORIENTATION_TAG_NAMES[] = {
};
const char *_DESCRIPTION_TAG_NAMES[] = {
+ "Iptc::Application2::Caption",
+ "Xmp::dc::description",
"Exif::Photo::UserComment",
"Exif::Image::ImageDescription",
- "Xmp::dc::description",
"Xmp::tiff::ImageDescription",
"Iptc::Application2::Headline",
- "Iptc::Application2::Caption",
NULL
};
@@ -363,8 +363,8 @@ set_attributes_from_tagsets (GFileInfo *info)
set_attribute_from_tagset (info, "general::description", _DESCRIPTION_TAG_NAMES);
set_attribute_from_tagset (info, "general::title", _TITLE_TAG_NAMES);
- /* if iptc::caption and iptc::headline are different use iptc::caption
- * to set general::title, if not alreay set. */
+ /* if iptc::caption and iptc::headline are different use iptc::headline
+ * to set general::title, if not already set. */
if (g_file_info_get_attribute_object (info, "general::title") == NULL) {
GObject *iptc_caption;
@@ -378,7 +378,7 @@ set_attributes_from_tagsets (GFileInfo *info)
&& (g_strcmp0 (gth_metadata_get_raw (GTH_METADATA (iptc_caption)),
gth_metadata_get_raw (GTH_METADATA (iptc_headline))) != 0))
{
- set_attribute_from_metadata (info, "general::title", iptc_caption);
+ set_attribute_from_metadata (info, "general::title", iptc_headline);
}
}
diff --git a/extensions/exiv2_tools/gth-metadata-provider-exiv2.c b/extensions/exiv2_tools/gth-metadata-provider-exiv2.c
index d8b048e..fd9de33 100644
--- a/extensions/exiv2_tools/gth-metadata-provider-exiv2.c
+++ b/extensions/exiv2_tools/gth-metadata-provider-exiv2.c
@@ -137,7 +137,7 @@ gth_metadata_provider_exiv2_write (GthMetadataProvider *self,
const char *tags_to_remove[] = {
"Exif::Image::ImageDescription",
"Xmp::tiff::ImageDescription",
- "Iptc::Application2::Caption",
+ "Iptc::Application2::Headline",
NULL
};
int i;
@@ -147,13 +147,13 @@ gth_metadata_provider_exiv2_write (GthMetadataProvider *self,
g_file_info_set_attribute_object (file_data->info, "Exif::Photo::UserComment", metadata);
g_file_info_set_attribute_object (file_data->info, "Xmp::dc::description", metadata);
- g_file_info_set_attribute_object (file_data->info, "Iptc::Application2::Headline", metadata);
+ g_file_info_set_attribute_object (file_data->info, "Iptc::Application2::Caption", metadata);
}
metadata = g_file_info_get_attribute_object (file_data->info, "general::title");
if (metadata != NULL) {
g_file_info_set_attribute_object (file_data->info, "Xmp::dc::title", metadata);
- g_file_info_set_attribute_object (file_data->info, "Iptc::Application2::Caption", metadata);
+ g_file_info_set_attribute_object (file_data->info, "Iptc::Application2::Headline", metadata);
}
metadata = g_file_info_get_attribute_object (file_data->info, "general::location");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]