diff src/dialogs.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 5939d3d13ab3
children f98467b35b95
line wrap: on
line diff
--- a/src/dialogs.c	Sat Mar 15 22:22:39 2003 +0000
+++ b/src/dialogs.c	Sun Mar 16 00:01:49 2003 +0000
@@ -163,7 +163,7 @@
 			continue;
 		if (!who)
 			continue;
-		if (!g_strcasecmp(normalize(who), d->who))
+		if (!gaim_utf8_strcasecmp(normalize(who), d->who))
 			return d;
 	}
 	return NULL;
@@ -271,11 +271,11 @@
 		gtk_toggle_button_set_active(
 			GTK_TOGGLE_BUTTON(gtkconv->toolbar.font), FALSE);
 		gtkconv->dialogs.font = NULL;
-	} else if (!g_strcasecmp(object_data, "smiley dialog")) {
+	} else if (!g_ascii_strcasecmp(object_data, "smiley dialog")) {
 		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtkconv->toolbar.smiley),
 									FALSE);
 		gtkconv->dialogs.smiley = NULL;
-	} else if (!g_strcasecmp(object_data, "log dialog")) {
+	} else if (!g_ascii_strcasecmp(object_data, "log dialog")) {
 		gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtkconv->toolbar.log),
 									   FALSE);
 		gtkconv->dialogs.log = NULL;
@@ -566,7 +566,7 @@
 	if (resp == GTK_RESPONSE_OK) {
 		who = g_strdup(normalize(gtk_entry_get_text(GTK_ENTRY(info->entry))));
 
-		if (!g_strcasecmp(who, "")) {
+		if (!g_ascii_strcasecmp(who, "")) {
 			g_free(who);
 			return;
 		}
@@ -1844,7 +1844,7 @@
 	new1 = gtk_entry_get_text(GTK_ENTRY(b->new1));
 	new2 = gtk_entry_get_text(GTK_ENTRY(b->new2));
 
-	if (g_strcasecmp(new1, new2)) {
+	if (g_utf8_collate(new1, new2)) {
 		do_error_dialog(_("New Passwords Do Not Match"), NULL, GAIM_ERROR);
 		return;
 	}
@@ -3902,7 +3902,7 @@
 		if (new_name && (strlen(new_name) != 0) && strcmp(new_name, g->name)) {
 			char *prevname;
 	
-			if ((orig = gaim_find_group(new_name)) != NULL && g_strcasecmp(new_name, g->name)) {
+			if ((orig = gaim_find_group(new_name)) != NULL && gaim_utf8_strcasecmp(new_name, g->name)) {
 				gaim_blist_rename_group(orig, g->name);
 				accts = gaim_group_get_accounts(g);
 				while(accts) {
@@ -4225,8 +4225,8 @@
 /* this causes clipping on lots of buttons with long text */
 /*  gtk_widget_set_size_request(button, 75, 30);*/
 	gtk_widget_show(button);
-	gdk_pixmap_unref(pm);
-	gdk_bitmap_unref(mask);
+	g_object_unref(G_OBJECT(pm));
+	g_object_unref(G_OBJECT(mask));
 
 	return button;
 }
@@ -4261,8 +4261,8 @@
 
 		gtk_widget_show(pixmap);
 
-		gdk_pixmap_unref(pm);
-		gdk_bitmap_unref(mask);
+		g_object_unref(G_OBJECT(pm));
+		g_object_unref(G_OBJECT(mask));
 	}
 
 	if (dispstyle == 2 || dispstyle == 1) {