gimp r26459 - in branches/soc-2008-tagging: . app/core app/widgets
- From: aurisj svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26459 - in branches/soc-2008-tagging: . app/core app/widgets
- Date: Sat, 9 Aug 2008 12:15:40 +0000 (UTC)
Author: aurisj
Date: Sat Aug 9 12:15:40 2008
New Revision: 26459
URL: http://svn.gnome.org/viewvc/gimp?rev=26459&view=rev
Log:
2008-08-09 Aurimas JuÅka <aurisj svn gnome org>
* app/core/gimptag.c
* app/widgets/gimptagentry.c: always normalize tag names.
Modified:
branches/soc-2008-tagging/ChangeLog
branches/soc-2008-tagging/app/core/gimptag.c
branches/soc-2008-tagging/app/widgets/gimptagentry.c
Modified: branches/soc-2008-tagging/app/core/gimptag.c
==============================================================================
--- branches/soc-2008-tagging/app/core/gimptag.c (original)
+++ branches/soc-2008-tagging/app/core/gimptag.c Sat Aug 9 12:15:40 2008
@@ -406,7 +406,12 @@
g_return_val_if_fail (string, NULL);
- tag = g_strdup (string);
+ tag = g_utf8_normalize (string, -1, G_NORMALIZE_ALL);
+ if (! tag)
+ {
+ return NULL;
+ }
+
tag = g_strstrip (tag);
if (! *tag)
{
Modified: branches/soc-2008-tagging/app/widgets/gimptagentry.c
==============================================================================
--- branches/soc-2008-tagging/app/widgets/gimptagentry.c (original)
+++ branches/soc-2008-tagging/app/widgets/gimptagentry.c Sat Aug 9 12:15:40 2008
@@ -892,7 +892,7 @@
static GList *
gimp_tag_entry_get_completion_candidates (GimpTagEntry *tag_entry,
gchar **used_tags,
- gchar *prefix)
+ gchar *src_prefix)
{
GList *candidates = NULL;
GList *all_tags;
@@ -901,9 +901,16 @@
const gchar *tag_name;
gint i;
gint length;
+ gchar *prefix;
- if (!prefix
- || strlen (prefix) < 1)
+ if (!src_prefix
+ || strlen (src_prefix) < 1)
+ {
+ return NULL;
+ }
+
+ prefix = g_utf8_normalize (src_prefix, -1, G_NORMALIZE_ALL);
+ if (! prefix)
{
return NULL;
}
@@ -934,6 +941,7 @@
tag_iterator = g_list_next (tag_iterator);
}
g_list_free (all_tags);
+ g_free (prefix);
return candidates;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]