Mercurial > pidgin
changeset 13612:dd03aa8a28ad
[gaim-migrate @ 15998]
Use g_utf8_normalize() directly instead of calling gaim_normalize(). This makes it more clear what's happening, and also avoids a copy to a buffer.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 10 Apr 2006 20:51:51 +0000 |
parents | 7f91efd5af77 |
children | 723fd573111c |
files | src/gtkblist.c |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkblist.c Mon Apr 10 04:40:22 2006 +0000 +++ b/src/gtkblist.c Mon Apr 10 20:51:51 2006 +0000 @@ -3393,6 +3393,7 @@ _search_func(GtkTreeModel *model, gint column, const gchar *key, GtkTreeIter *iter, gpointer search_data) { gchar *enteredstring; + gchar *tmp; gchar *withmarkup; gchar *nomarkup; gchar *normalized; @@ -3404,15 +3405,20 @@ gtk_tree_model_get(model, iter, column, &withmarkup, -1); - enteredstring = g_utf8_casefold(gaim_normalize(NULL, key), -1); + tmp = g_utf8_normalize(key, -1, G_NORMALIZE_DEFAULT); + enteredstring = g_utf8_casefold(tmp, -1); + g_free(tmp); + nomarkup = gaim_markup_strip_html(withmarkup); - normalized = g_utf8_casefold(gaim_normalize(NULL, nomarkup), -1); + tmp = g_utf8_normalize(nomarkup, -1, G_NORMALIZE_DEFAULT); + g_free(nomarkup); + normalized = g_utf8_casefold(tmp, -1); + g_free(tmp); if (gaim_str_has_prefix(normalized, enteredstring)) { g_free(withmarkup); g_free(enteredstring); - g_free(nomarkup); g_free(normalized); return FALSE; } @@ -3461,7 +3467,6 @@ g_free(withmarkup); g_free(enteredstring); - g_free(nomarkup); g_free(normalized); return result;