[gthumb/gthumb-2-14] strip the tags when setting the list from a text value
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb/gthumb-2-14] strip the tags when setting the list from a text value
- Date: Tue, 6 Mar 2012 15:39:13 +0000 (UTC)
commit c64f4af146c99fbfca1637847815402ae2ca0d90
Author: Paolo Bacchilega <paobac src gnome org>
Date: Tue Mar 6 16:36:17 2012 +0100
strip the tags when setting the list from a text value
gthumb/gth-tags-entry.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gthumb/gth-tags-entry.c b/gthumb/gth-tags-entry.c
index 71ab4b6..74c606a 100644
--- a/gthumb/gth-tags-entry.c
+++ b/gthumb/gth-tags-entry.c
@@ -894,6 +894,7 @@ gth_tags_entry_set_text (GthTagsEntry *self,
const char *text)
{
char **tags;
+ int i;
if ((text == NULL) || (strcmp (text, "") == 0)) {
gth_tags_entry_set_tags (self, NULL);
@@ -901,6 +902,8 @@ gth_tags_entry_set_text (GthTagsEntry *self,
}
tags = g_strsplit (text, ",", -1);
+ for (i = 0; tags[i] != NULL; i++)
+ tags[i] = g_strstrip (tags[i]);
gth_tags_entry_set_tags (self, tags);
g_strfreev (tags);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]