[gthumb] comments: use only the general:: metadata when writing
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] comments: use only the general:: metadata when writing
- Date: Tue, 28 Dec 2010 17:23:55 +0000 (UTC)
commit 84e1cac4c6c2a8580c55a11437f73be87eca2100
Author: Paolo Bacchilega <paobac src gnome org>
Date: Tue Dec 28 16:43:07 2010 +0100
comments: use only the general:: metadata when writing
.../comments/gth-metadata-provider-comment.c | 22 ++++++-------------
1 files changed, 7 insertions(+), 15 deletions(-)
---
diff --git a/extensions/comments/gth-metadata-provider-comment.c b/extensions/comments/gth-metadata-provider-comment.c
index 39938f1..ea082ec 100644
--- a/extensions/comments/gth-metadata-provider-comment.c
+++ b/extensions/comments/gth-metadata-provider-comment.c
@@ -150,47 +150,39 @@ gth_metadata_provider_comment_write (GthMetadataProvider *self,
/* caption */
+ text = NULL;
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");
- else
+ if (metadata != NULL)
text = gth_metadata_get_raw (metadata);
gth_comment_set_caption (comment, text);
/* comment */
+ text = NULL;
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
+ if (metadata != NULL)
text = gth_metadata_get_raw (metadata);
gth_comment_set_note (comment, text);
/* location */
+ text = NULL;
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");
- else
+ if (metadata != NULL)
text = gth_metadata_get_raw (metadata);
gth_comment_set_place (comment, text);
/* time */
+ text = NULL;
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::datetime");
- if (metadata == NULL)
- metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "comment::time");
if (metadata != NULL)
text = gth_metadata_get_raw (metadata);
- else
- text = NULL;
gth_comment_set_time_from_exif_format (comment, text);
/* keywords */
categories = (GthStringList *) g_file_info_get_attribute_object (file_data->info, "general::tags");
- if (categories == NULL)
- categories = (GthStringList *) g_file_info_get_attribute_object (file_data->info, "comment::categories");
if (categories != NULL) {
GList *list;
GList *scan;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]