[gthumb/gthumb-2-12] comments: use only the general:: metadata when writing



commit f407bda38aeda7f5e9c0eb9db8df6ffb8e7d39eb
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]