Commit 21b43db6 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

renamed general::comment as general::description

renamed to be consistent with the xmp field names
parent 043d1176
......@@ -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);
......
......@@ -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;
}
......
......@@ -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) {
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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 },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment