[gthumb/ext] [gth-comment] ignore void values for the text fields



commit 2ba9119c5efc682eb11a2081fa267d93a1fe001d
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Jan 3 00:24:02 2010 +0100

    [gth-comment] ignore void values for the text fields

 extensions/comments/gth-comment.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/extensions/comments/gth-comment.c b/extensions/comments/gth-comment.c
index 26a5a59..e967c63 100644
--- a/extensions/comments/gth-comment.c
+++ b/extensions/comments/gth-comment.c
@@ -409,7 +409,7 @@ gth_comment_set_caption (GthComment  *comment,
 	g_free (comment->priv->caption);
 	comment->priv->caption = NULL;
 
-	if (value != NULL)
+	if ((value != NULL) && (strcmp (value, "") != 0))
 		comment->priv->caption = g_strdup (value);
 }
 
@@ -421,7 +421,7 @@ gth_comment_set_note (GthComment *comment,
 	g_free (comment->priv->note);
 	comment->priv->note = NULL;
 	
-	if (value != NULL)
+	if ((value != NULL) && (strcmp (value, "") != 0))
 		comment->priv->note = g_strdup (value);
 }
 
@@ -433,7 +433,7 @@ gth_comment_set_place (GthComment *comment,
 	g_free (comment->priv->place);
 	comment->priv->place = NULL;
 	
-	if (value != NULL)
+	if ((value != NULL) && (strcmp (value, "") != 0))
 		comment->priv->place = g_strdup (value);
 }
 



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