[gthumb/ext] renamed general::comment as general::description



commit 21b43db6d985f3a512f360734afe0b25c21720de
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Dec 27 12:06:31 2009 +0100

    renamed general::comment as general::description
    
    renamed to be consistent with the xmp field names

 extensions/comments/gth-edit-comment-page.c        |    6 +++---
 .../comments/gth-metadata-provider-comment.c       |    8 ++++----
 extensions/comments/main.c                         |    2 +-
 extensions/exiv2/exiv2-utils.cpp                   |    4 ++--
 extensions/exiv2/gth-metadata-provider-exiv2.c     |    6 +++---
 gthumb/gth-file-properties.c                       |    2 +-
 gthumb/gth-main-default-metadata.c                 |    2 +-
 7 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/extensions/comments/gth-edit-comment-page.c b/extensions/comments/gth-edit-comment-page.c
index 7bd18ed..ba960fa 100644
--- a/extensions/comments/gth-edit-comment-page.c
+++ b/extensions/comments/gth-edit-comment-page.c
@@ -68,7 +68,7 @@ gth_edit_comment_page_real_set_file (GthEditMetadataPage *base,
 	self->priv->file_data = g_object_ref (file_data);
 
 	buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (GET_WIDGET ("note_text")));
-	metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::comment");
+	metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::description");
 	if (metadata != NULL) {
 		GtkTextIter iter;
 
@@ -136,11 +136,11 @@ gth_edit_comment_page_real_update_info (GthEditMetadataPage *base,
 	gtk_text_buffer_get_bounds (buffer, &start, &end);
 	text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
 	metadata = g_object_new (GTH_TYPE_METADATA,
-				 "id", "general::comment",
+				 "id", "general::description",
 				 "raw", text,
 				 "formatted", text,
 				 NULL);
-	g_file_info_set_attribute_object (self->priv->file_data->info, "general::comment", G_OBJECT (metadata));
+	g_file_info_set_attribute_object (self->priv->file_data->info, "general::description", G_OBJECT (metadata));
 	g_object_unref (metadata);
 	g_free (text);
 
diff --git a/extensions/comments/gth-metadata-provider-comment.c b/extensions/comments/gth-metadata-provider-comment.c
index aa0ca96..a2846c0 100644
--- a/extensions/comments/gth-metadata-provider-comment.c
+++ b/extensions/comments/gth-metadata-provider-comment.c
@@ -79,7 +79,7 @@ gth_metadata_provider_comment_read (GthMetadataProvider *self,
 	value = gth_comment_get_note (comment);
 	if (value != NULL) {
 		g_file_info_set_attribute_string (file_data->info, "comment::note", value);
-		set_attribute_from_string (file_data->info, "general::comment", value, NULL);
+		set_attribute_from_string (file_data->info, "general::description", value, NULL);
 	}
 
 	value = gth_comment_get_place (comment);
@@ -137,7 +137,7 @@ gth_metadata_provider_comment_write (GthMetadataProvider *self,
 
 	/* comment */
 
-	metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::comment");
+	metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::description");
 	if (metadata == NULL)
 		text = g_file_info_get_attribute_string (file_data->info, "comment::note");
 	else
@@ -216,8 +216,8 @@ gth_metadata_provider_constructor (GType                  type,
 	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
 	self = GTH_METADATA_PROVIDER (obj);
 
-	g_object_set (self, "readable-attributes", "comment::*,general::datetime,general::comment,general::location,general::tags", NULL);
-	g_object_set (self, "writable-attributes", "comment::*,general::datetime,general::comment,general::location,general::tags", NULL);
+	g_object_set (self, "readable-attributes", "comment::*,general::datetime,general::description,general::location,general::tags", NULL);
+	g_object_set (self, "writable-attributes", "comment::*,general::datetime,general::description,general::location,general::tags", NULL);
 
 	return obj;
 }
diff --git a/extensions/comments/main.c b/extensions/comments/main.c
index 1f80618..082f6bf 100644
--- a/extensions/comments/main.c
+++ b/extensions/comments/main.c
@@ -100,7 +100,7 @@ comments__read_metadata_ready_cb (GthFileData *file_data,
 
 	/* sync embedded data and .comment data if required */
 
-	metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::comment");
+	metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::description");
 	if (metadata != NULL) {
 		text = g_file_info_get_attribute_string (file_data->info, "comment::note");
 		if (g_strcmp0 (gth_metadata_get_raw (metadata), text) != 0) {
diff --git a/extensions/exiv2/exiv2-utils.cpp b/extensions/exiv2/exiv2-utils.cpp
index e77499f..a0151f0 100644
--- a/extensions/exiv2/exiv2-utils.cpp
+++ b/extensions/exiv2/exiv2-utils.cpp
@@ -129,7 +129,7 @@ const char *_ORIENTATION_TAG_NAMES[] = {
 	NULL
 };
 
-const char *_COMMENT_TAG_NAMES[] = {
+const char *_DESCRIPTION_TAG_NAMES[] = {
 	"Exif::Photo::UserComment",
 	"Exif::Image::ImageDescription",
 	"Xmp::dc::description",
@@ -315,7 +315,7 @@ static void
 set_attributes_from_tagsets (GFileInfo *info)
 {
 	set_attribute_from_tagset (info, "general::datetime", _DATE_TAG_NAMES);
-	set_attribute_from_tagset (info, "general::comment", _COMMENT_TAG_NAMES);
+	set_attribute_from_tagset (info, "general::description", _DESCRIPTION_TAG_NAMES);
 	set_attribute_from_tagset (info, "general::location", _LOCATION_TAG_NAMES);
 	set_string_list_attribute_from_tagset (info, "general::tags", _KEYWORDS_TAG_NAMES);
 	set_attribute_from_tagset (info, "Embedded::Photo::DateTimeOriginal", _ORIGINAL_DATE_TAG_NAMES);
diff --git a/extensions/exiv2/gth-metadata-provider-exiv2.c b/extensions/exiv2/gth-metadata-provider-exiv2.c
index 7515d6a..2e96201 100644
--- a/extensions/exiv2/gth-metadata-provider-exiv2.c
+++ b/extensions/exiv2/gth-metadata-provider-exiv2.c
@@ -93,7 +93,7 @@ gth_metadata_provider_exiv2_write (GthMetadataProvider *self,
 	if (! g_load_file_in_buffer (file_data->file, &buffer, &size, &error))
 		return;
 
-	metadata = g_file_info_get_attribute_object (file_data->info, "general::comment");
+	metadata = g_file_info_get_attribute_object (file_data->info, "general::description");
 	if (metadata != NULL) {
 		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);
@@ -188,8 +188,8 @@ gth_metadata_provider_constructor (GType                  type,
 	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
 	self = GTH_METADATA_PROVIDER (obj);
 
-	g_object_set (self, "readable-attributes", "Exif::*,Xmp::*,Iptc::*,Embedded::Image::*,Embedded::Photo::*,general::datetime,general::comment,general::location,general::tags", NULL);
-	g_object_set (self, "writable-attributes", "Exif::*,Xmp::*,Iptc::*,Embedded::Image::*,Embedded::Photo::*,general::datetime,general::comment,general::location,general::tags", NULL);
+	g_object_set (self, "readable-attributes", "Exif::*,Xmp::*,Iptc::*,Embedded::Image::*,Embedded::Photo::*,general::datetime,general::description,general::location,general::tags", NULL);
+	g_object_set (self, "writable-attributes", "Exif::*,Xmp::*,Iptc::*,Embedded::Image::*,Embedded::Photo::*,general::datetime,general::description,general::location,general::tags", NULL);
 
 	return obj;
 }
diff --git a/gthumb/gth-file-properties.c b/gthumb/gth-file-properties.c
index cb41fa7..05aea95 100644
--- a/gthumb/gth-file-properties.c
+++ b/gthumb/gth-file-properties.c
@@ -72,7 +72,7 @@ get_comment (GthFileData *file_data)
 
 	string = g_string_new (NULL);
 
-	value = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::comment");
+	value = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::description");
 	if (value != NULL) {
 		const char *formatted;
 
diff --git a/gthumb/gth-main-default-metadata.c b/gthumb/gth-main-default-metadata.c
index 9e0d344..58c161f 100644
--- a/gthumb/gth-main-default-metadata.c
+++ b/gthumb/gth-main-default-metadata.c
@@ -49,7 +49,7 @@ GthMetadataInfo file_metadata_info[] = {
 	{ "general::format", N_("Format"), "general", 12, GTH_METADATA_ALLOW_IN_PROPERTIES_VIEW },
 	{ "general::location", N_("Place"), "general", 14, GTH_METADATA_ALLOW_EVERYWHERE },
 	{ "general::datetime", N_("Date"), "general", 15, GTH_METADATA_ALLOW_EVERYWHERE },
-	{ "general::comment", N_("Comment"), "general", 16, GTH_METADATA_ALLOW_IN_PRINT },
+	{ "general::description", N_("Description"), "general", 16, GTH_METADATA_ALLOW_IN_PRINT },
 	{ "general::tags", N_("Tags"), "general", 17, GTH_METADATA_ALLOW_EVERYWHERE },
 	{ "general::rating", N_("Rating"), "general", 18, GTH_METADATA_ALLOW_EVERYWHERE },
 



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