diff plugins/notify.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 2427d847e39c
children 00b6af528964
line wrap: on
line diff
--- a/plugins/notify.c	Sat Mar 15 22:22:39 2003 +0000
+++ b/plugins/notify.c	Sun Mar 16 00:01:49 2003 +0000
@@ -296,7 +296,7 @@
 		g_snprintf(buf, sizeof(buf), "[%d] %s", number, win->title);
 	} else if (!c) {
 		g_snprintf(buf, sizeof(buf), "[1] %s", win->title);
-	} else if (!g_strncasecmp(buf, "[", 1)) {
+	} else if (buf[0]== '[' ) {
 		g_snprintf(buf, sizeof(buf), "[%d] %s", c+1, &win->title[3+length]);
 	}
 	gtk_window_set_title(win, buf);
@@ -308,7 +308,7 @@
 	int length;
 
 	strncpy(buf, win->title, sizeof(buf));
-	if (!g_strncasecmp(buf, "[", 1)) {
+	if (buf[0] == '[') {
 		Number = counter(buf, &length);
 		g_snprintf(buf, sizeof(buf), "%s", &win->title[3+length]);
 		gtk_window_set_title(win, buf);
@@ -322,7 +322,7 @@
 	GtkWindow *win = GTK_WINDOW(widget);
 
 	strncpy(buf, win->title, sizeof(buf));
-	if (g_strncasecmp(buf, "\"", 1)) {
+	if (buf[0] != '\"') {
 		g_snprintf(buf, sizeof(buf), "\"%s\"", win->title);
 		gtk_window_set_title(win, buf);
 	}
@@ -333,7 +333,7 @@
 	GtkWindow *win = GTK_WINDOW(widget);
 
 	strncpy(buf, win->title, sizeof(buf));
-	if (!g_strncasecmp(buf, "\"", 1)) {
+	if (buf[0] == '\"') {
 		g_snprintf(buf, strlen(buf) - 1, "%s", &win->title[1]);
 		gtk_window_set_title(win, buf);
 		return TRUE;