[gthumb: 30/57] sync the comment using the formatted value
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 30/57] sync the comment using the formatted value
- Date: Sun, 20 Jun 2010 16:24:16 +0000 (UTC)
commit a33f160310a5dc47da83ffb51df6a45e8db7d415
Author: Paolo Bacchilega <paobac src gnome org>
Date: Tue Jun 15 13:20:35 2010 +0200
sync the comment using the formatted value
Use the formatted value to sync the comment with the
embedded metadata, insted of using the raw value.
This allows to remove the lang="x-default" prefix from the
text fields.
extensions/comments/main.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/extensions/comments/main.c b/extensions/comments/main.c
index 2d83a23..bc42a34 100644
--- a/extensions/comments/main.c
+++ b/extensions/comments/main.c
@@ -122,8 +122,8 @@ comments__read_metadata_ready_cb (GthFileData *file_data,
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) {
- gth_comment_set_note (comment, gth_metadata_get_raw (metadata));
+ if (g_strcmp0 (gth_metadata_get_formatted (metadata), text) != 0) {
+ gth_comment_set_note (comment, gth_metadata_get_formatted (metadata));
write_comment = TRUE;
}
}
@@ -131,8 +131,8 @@ comments__read_metadata_ready_cb (GthFileData *file_data,
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::title");
if (metadata != NULL) {
text = g_file_info_get_attribute_string (file_data->info, "comment::caption");
- if (g_strcmp0 (gth_metadata_get_raw (metadata), text) != 0) {
- gth_comment_set_caption (comment, gth_metadata_get_raw (metadata));
+ if (g_strcmp0 (gth_metadata_get_formatted (metadata), text) != 0) {
+ gth_comment_set_caption (comment, gth_metadata_get_formatted (metadata));
write_comment = TRUE;
}
}
@@ -140,8 +140,8 @@ comments__read_metadata_ready_cb (GthFileData *file_data,
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::location");
if (metadata != NULL) {
text = g_file_info_get_attribute_string (file_data->info, "comment::place");
- if (g_strcmp0 (gth_metadata_get_raw (metadata), text) != 0) {
- gth_comment_set_place (comment, gth_metadata_get_raw (metadata));
+ if (g_strcmp0 (gth_metadata_get_formatted (metadata), text) != 0) {
+ gth_comment_set_place (comment, gth_metadata_get_formatted (metadata));
write_comment = TRUE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]