changeset 10904:e0cf11160c97

[gaim-migrate @ 12632] Patch #1195915 from Jean-Yves Lefort - fix case insensitive sorting of the chat user list on platforms where g_utf8_collate doesn't result in casefolding. I also made the tab-complete list of possible matches sorted, this was suggested in #gaim a while ago (when the user list mis-sorting was originally mentioned), but I totally forgot to do either of these until now. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 07 May 2005 13:40:30 +0000
parents c153119be7d0
children d41e285af79e
files src/gtkconv.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Sat May 07 13:08:21 2005 +0000
+++ b/src/gtkconv.c	Sat May 07 13:40:30 2005 +0000
@@ -3447,7 +3447,8 @@
 			g_free(tmp);
 		}
 
-		matches = g_list_append(matches, name);
+		matches = g_list_insert_sorted(matches, name,
+		                               (GCompareFunc)gaim_utf8_strcasecmp);
 	}
 
 	g_free(nick_partial);
@@ -3747,7 +3748,7 @@
 		/* sort more important users first */
 		ret = (f1 > f2) ? -1 : 1;
 	} else {
-		ret = g_utf8_collate(user1, user2);
+		ret = gaim_utf8_strcasecmp(user1, user2);
 	}
 
 	g_free(user1);