diff src/list.c @ 4793:677d3cb193a1

[gaim-migrate @ 5113] this removes all the remaining deprecated glib, gdk, gdk-pixbuf, and gtk function calls. Hopefully I didn't break anything. Most of this is due to the deprecation of g_strcasecmp and g_strncasecmp. Two functions I never thought would be deprecated, but apparently they're no good at comparing utf8 text. g_ascii_str{,n}casecmp is OK when you're sure that it's ASCII. Otherwise, we're supposed to use g_utf8_collate(), except that it is case sensitive. Since glib doesn't currently have a case-insensitive one, I wrote one. If you need to compare utf8 text, you can use gaim_utf8_strcasecmp(). I have to go do dishes now. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 16 Mar 2003 00:01:49 +0000
parents 1e28e7d802a1
children 46fb754a3c10
line wrap: on
line diff
--- a/src/list.c	Sat Mar 15 22:22:39 2003 +0000
+++ b/src/list.c	Sun Mar 16 00:01:49 2003 +0000
@@ -377,7 +377,7 @@
 	while (group) {
 		buddy = group->child;
 		while (buddy) {
-			if (!g_strcasecmp(normalize(((struct buddy*)buddy)->name), norm_name) && account == ((struct buddy*)buddy)->account) {
+			if (!gaim_utf8_strcasecmp(normalize(((struct buddy*)buddy)->name), norm_name) && account == ((struct buddy*)buddy)->account) {
 				g_free(norm_name);
 				return (struct buddy*)buddy;
 			}
@@ -684,14 +684,17 @@
 {
 	gchar **split;
 	gchar *good;
+	gchar *ret;
 
 	split = g_strsplit(name, G_DIR_SEPARATOR_S, -1);
 	good = g_strjoinv(NULL, split);
 	g_strfreev(split);
 
-	g_strup(good);
+	ret = g_utf8_strup(good, -1);
 
-	return good;
+	g_free(good);
+
+	return ret;
 }
 
 static gboolean gaim_blist_read(const char *filename);
@@ -1232,7 +1235,7 @@
 	GSList *d = account->permit;
 	char *n = g_strdup(normalize(who));
 	while(d) {
-		if(!g_strcasecmp(n, normalize(d->data)))
+		if(!gaim_utf8_strcasecmp(n, normalize(d->data)))
 			break;
 		d = d->next;
 	}
@@ -1249,7 +1252,7 @@
 	GSList *d = account->permit;
 	char *n = g_strdup(normalize(who));
 	while(d) {
-		if(!g_strcasecmp(n, normalize(d->data)))
+		if(!gaim_utf8_strcasecmp(n, normalize(d->data)))
 			break;
 		d = d->next;
 	}
@@ -1266,7 +1269,7 @@
 	GSList *d = account->deny;
 	char *n = g_strdup(normalize(who));
 	while(d) {
-		if(!g_strcasecmp(n, normalize(d->data)))
+		if(!gaim_utf8_strcasecmp(n, normalize(d->data)))
 			break;
 		d = d->next;
 	}
@@ -1283,7 +1286,7 @@
 	GSList *d = account->deny;
 	char *n = g_strdup(normalize(who));
 	while(d) {
-		if(!g_strcasecmp(n, normalize(d->data)))
+		if(!gaim_utf8_strcasecmp(n, normalize(d->data)))
 			break;
 		d = d->next;
 	}