From: <rl...@us...> - 2006-11-08 04:17:08
|
Revision: 17702 http://svn.sourceforge.net/gaim/?rev=17702&view=rev Author: rlaager Date: 2006-11-07 20:16:56 -0800 (Tue, 07 Nov 2006) Log Message: ----------- Casefold the alias before generating the collation key. This should retain the previous behavior (though maybe the corner case of two nicks that differ only by case will be non-deterministic) while still using strcmp() as documented. Modified Paths: -------------- trunk/gtk/gtkconv.c Modified: trunk/gtk/gtkconv.c =================================================================== --- trunk/gtk/gtkconv.c 2006-11-08 04:15:15 UTC (rev 17701) +++ trunk/gtk/gtkconv.c 2006-11-08 04:16:56 UTC (rev 17702) @@ -3401,7 +3401,7 @@ GtkTreeIter iter; gboolean is_me = FALSE; gboolean is_buddy; - gchar *alias_key, *name, *alias; + gchar *tmp, *alias_key, *name, *alias; int flags; alias = cb->alias; @@ -3425,7 +3425,9 @@ is_buddy = (gaim_find_buddy(conv->account, name) != NULL); - alias_key = g_utf8_collate_key(alias, strlen(alias)); + tmp = g_utf8_casefold(alias, -1); + alias_key = g_utf8_collate_key(tmp, -1); + g_free(tmp); if (is_me) { @@ -3802,6 +3804,7 @@ if (!strcmp(normalized_name, gaim_normalize(conv->account, name))) { const char *alias = name; + char *tmp; char *alias_key = NULL; GaimBuddy *buddy2; @@ -3812,7 +3815,9 @@ alias = gaim_buddy_get_contact_alias(buddy2); } - alias_key = g_utf8_collate_key(alias, strlen(alias)); + tmp = g_utf8_casefold(alias, -1); + alias_key = g_utf8_collate_key(tmp, -1); + g_free(tmp); gtk_list_store_set(GTK_LIST_STORE(model), &iter, CHAT_USERS_ALIAS_COLUMN, alias, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |