changeset 18403:8ee1f173253c

merge of '414f0770611139752d484f4831cb59038456c9bf' and 'ac9248515df0eeec749075d5b6242b285cf57967'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 01 Jul 2007 07:15:16 +0000
parents 238086459dc4 (diff) bf026a5800db (current diff)
children 9a0f99ea664d
files pidgin/plugins/spellchk.c
diffstat 22 files changed, 103 insertions(+), 68 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/dnssrv.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/dnssrv.c	Sun Jul 01 07:15:16 2007 +0000
@@ -50,11 +50,11 @@
 	u_char buf[1024];
 } queryans;
 #else
-static DNS_STATUS WINAPI (*MyDnsQuery_UTF8) (
+static DNS_STATUS (WINAPI *MyDnsQuery_UTF8) (
 	PCSTR lpstrName, WORD wType, DWORD fOptions,
 	PIP4_ARRAY aipServers, PDNS_RECORD* ppQueryResultsSet,
 	PVOID* pReserved) = NULL;
-static void WINAPI (*MyDnsRecordListFree) (PDNS_RECORD pRecordList,
+static void (WINAPI *MyDnsRecordListFree) (PDNS_RECORD pRecordList,
 	DNS_FREE_TYPE FreeType) = NULL;
 #endif
 
--- a/libpurple/internal.h	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/internal.h	Sun Jul 01 07:15:16 2007 +0000
@@ -111,11 +111,16 @@
 # include <unistd.h>
 #endif
 
-#ifndef MAXPATHLEN
-# ifdef PATH_MAX
-#  define MAXPATHLEN PATH_MAX
-# else
-#  define MAXPATHLEN 1024
+/* MAXPATHLEN should only be used with readlink() on glib < 2.4.0.  For
+ * anything else, use g_file_read_link() or other dynamic functions.  This is
+ * important because Hurd has no hard limits on path length. */
+#if !GLIB_CHECK_VERSION(2,4,0)
+# ifndef MAXPATHLEN
+#  ifdef PATH_MAX
+#   define MAXPATHLEN PATH_MAX
+#  else
+#   define MAXPATHLEN 1024
+#  endif
 # endif
 #endif
 
--- a/libpurple/network.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/network.c	Sun Jul 01 07:15:16 2007 +0000
@@ -517,7 +517,7 @@
 	WSAQUERYSET qs;
 	time_t last_trigger = time(NULL);
 
-	int WSAAPI (*MyWSANSPIoctl) (
+	int (WSAAPI *MyWSANSPIoctl) (
 		HANDLE hLookup, DWORD dwControlCode, LPVOID lpvInBuffer,
 		DWORD cbInBuffer, LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 		LPDWORD lpcbBytesReturned, LPWSACOMPLETION lpCompletion) = NULL;
--- a/libpurple/plugins/filectl.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/plugins/filectl.c	Sun Jul 01 07:15:16 2007 +0000
@@ -56,7 +56,7 @@
 		purple_debug_misc("filectl", "read: %s\n", buffer);
 		command = getarg(buffer, 0, 0);
 
-		if (!strncasecmp(command, "login", 6)) {
+		if (!g_ascii_strncasecmp(command, "login", 6)) {
 			PurpleAccount *account;
 
 			arg1 = getarg(buffer, 1, 0);
@@ -69,7 +69,7 @@
 			free(arg1);
 			free(arg2);
 
-		} else if (!strncasecmp(command, "logout", 7)) {
+		} else if (!g_ascii_strncasecmp(command, "logout", 7)) {
 			PurpleAccount *account;
 
 			arg1 = getarg(buffer, 1, 1);
@@ -88,7 +88,7 @@
 
 /* purple_find_conversation() is gone in 2.0.0. */
 #if 0
-		} else if (!strncasecmp(command, "send", 4)) {
+		} else if (!g_ascii_strncasecmp(command, "send", 4)) {
 			PurpleConversation *conv;
 
 			arg1 = getarg(buffer, 1, 0);
@@ -107,21 +107,21 @@
 			free(arg2);
 #endif
 
-		} else if (!strncasecmp(command, "away", 4)) {
+		} else if (!g_ascii_strncasecmp(command, "away", 4)) {
 			arg1 = getarg(buffer, 1, 1);
 			/* serv_set_away_all(arg1); */
 			free(arg1);
 
-		} else if (!strncasecmp(command, "hide", 4)) {
+		} else if (!g_ascii_strncasecmp(command, "hide", 4)) {
 			purple_blist_set_visible(FALSE);
 
-		} else if (!strncasecmp(command, "unhide", 6)) {
+		} else if (!g_ascii_strncasecmp(command, "unhide", 6)) {
 			purple_blist_set_visible(TRUE);
 
-		} else if (!strncasecmp(command, "back", 4)) {
+		} else if (!g_ascii_strncasecmp(command, "back", 4)) {
 			/* do_im_back(); */
 
-		} else if (!strncasecmp(command, "quit", 4)) {
+		} else if (!g_ascii_strncasecmp(command, "quit", 4)) {
 			purple_core_quit();
 
 		}
--- a/libpurple/protocols/gg/lib/http.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/protocols/gg/lib/http.c	Sun Jul 01 07:15:16 2007 +0000
@@ -349,7 +349,7 @@
 			gg_debug(GG_DEBUG_MISC, "=> -----BEGIN-HTTP-HEADER-----\n%s\n=> -----END-HTTP-HEADER-----\n", h->header);
 
 			while (line) {
-				if (!strncasecmp(line, "Content-length: ", 16)) {
+				if (!g_ascii_strncasecmp(line, "Content-length: ", 16)) {
 					h->body_size = atoi(line + 16);
 				}
 				line = strchr(line, '\n');
--- a/libpurple/protocols/gg/lib/pubdir50.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/protocols/gg/lib/pubdir50.c	Sun Jul 01 07:15:16 2007 +0000
@@ -347,7 +347,7 @@
 
 		/* jeśli dostaliśmy namier na następne wyniki, to znaczy że
 		 * mamy koniec wyników i nie jest to kolejna osoba. */
-		if (!strcasecmp(field, "nextstart")) {
+		if (!g_ascii_strcasecmp(field, "nextstart")) {
 			res->next = atoi(value);
 			num--;
 		} else {
@@ -390,7 +390,7 @@
 	}
 
 	for (i = 0; i < res->entries_count; i++) {
-		if (res->entries[i].num == num && !strcasecmp(res->entries[i].field, field)) {
+		if (res->entries[i].num == num && !g_ascii_strcasecmp(res->entries[i].field, field)) {
 			value = res->entries[i].value;
 			break;
 		}
--- a/libpurple/protocols/msn/msn-utils.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/protocols/msn/msn-utils.c	Sun Jul 01 07:15:16 2007 +0000
@@ -296,7 +296,7 @@
 							char *attr_dir;
 							attributes = g_strndup(c, attr_len);
 							attr_dir = purple_markup_get_css_property(attributes, "direction");
-							if (attr_dir && (!strncasecmp(attr_dir, "RTL", 3)))
+							if (attr_dir && (!g_ascii_strncasecmp(attr_dir, "RTL", 3)))
 								direction = '1';
 							g_free(attr_dir);
 							g_free(attributes);
--- a/libpurple/protocols/oscar/odc.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/protocols/oscar/odc.c	Sun Jul 01 07:15:16 2007 +0000
@@ -314,7 +314,7 @@
 			tmp += size;
 
 			/* Skip past the closing </data> tag */
-			if (strncasecmp(tmp, "</data>", 7))
+			if (g_ascii_strncasecmp(tmp, "</data>", 7))
 			{
 				g_free(embedded_data);
 				break;
--- a/libpurple/protocols/silc/buddy.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/protocols/silc/buddy.c	Sun Jul 01 07:15:16 2007 +0000
@@ -1252,7 +1252,7 @@
 			SilcClientEntry entry;
 			silc_dlist_start(clients);
 			while ((entry = silc_dlist_get(clients))) {
-				if (!strncasecmp(b->name, entry->nickname,
+				if (!g_ascii_strncasecmp(b->name, entry->nickname,
 						 strlen(b->name))) {
 					client_entry = entry;
 					break;
--- a/libpurple/protocols/silc/util.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/protocols/silc/util.c	Sun Jul 01 07:15:16 2007 +0000
@@ -623,15 +623,15 @@
 	ct = strrchr(filename, '.');
 	if (!ct)
 		return NULL;
-	else if (!strcasecmp(".png", ct))
+	else if (!g_ascii_strcasecmp(".png", ct))
 		return strdup("image/png");
-	else if (!strcasecmp(".jpg", ct))
+	else if (!g_ascii_strcasecmp(".jpg", ct))
 		return strdup("image/jpeg");
-	else if (!strcasecmp(".jpeg", ct))
+	else if (!g_ascii_strcasecmp(".jpeg", ct))
 		return strdup("image/jpeg");
-	else if (!strcasecmp(".gif", ct))
+	else if (!g_ascii_strcasecmp(".gif", ct))
 		return strdup("image/gif");
-	else if (!strcasecmp(".tiff", ct))
+	else if (!g_ascii_strcasecmp(".tiff", ct))
 		return strdup("image/tiff");
 
 	return NULL;
--- a/libpurple/protocols/silc10/buddy.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/protocols/silc10/buddy.c	Sun Jul 01 07:15:16 2007 +0000
@@ -1246,7 +1246,7 @@
 			   buddy nickname. */
 			int i;
 			for (i = 0; i < clients_count; i++) {
-				if (!strncasecmp(b->name, clients[i]->nickname,
+				if (!g_ascii_strncasecmp(b->name, clients[i]->nickname,
 						 strlen(b->name))) {
 					clients[0] = clients[i];
 					break;
--- a/libpurple/protocols/simple/simple.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/protocols/simple/simple.c	Sun Jul 01 07:15:16 2007 +0000
@@ -337,7 +337,7 @@
 		return;
 	}
 
-	if(!g_strncasecmp(hdr, "NTLM", 4)) {
+	if(!g_ascii_strncasecmp(hdr, "NTLM", 4)) {
 		purple_debug_info("simple", "found NTLM\n");
 		auth->type = 2;
 		parts = g_strsplit(hdr+5, "\", ", 0);
--- a/libpurple/protocols/yahoo/yahoo_picture.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/protocols/yahoo/yahoo_picture.c	Sun Jul 01 07:15:16 2007 +0000
@@ -110,7 +110,7 @@
 	}
 
 	/* Yahoo IM 6 spits out 0.png as the URL if the buddy icon is not set */
-	if (who && got_icon_info && url && !strncasecmp(url, "http://", 7)) {
+	if (who && got_icon_info && url && !g_ascii_strncasecmp(url, "http://", 7)) {
 		/* TODO: make this work p2p, try p2p before the url */
 		PurpleUtilFetchUrlData *url_data;
 		struct yahoo_fetch_picture_data *data;
--- a/libpurple/protocols/zephyr/ZVariables.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/protocols/zephyr/ZVariables.c	Sun Jul 01 07:15:16 2007 +0000
@@ -186,7 +186,7 @@
 #define max(a,b) ((a > b) ? (a) : (b))
 #endif
 
-    if (strncasecmp(bfr, var, max(strlen(var),cp - bfr)))
+    if (g_strncasecmp(bfr, var, max(strlen(var), cp - bfr)))
 	return(0);			/* var is not the var in
 					   bfr ==> no match */
 
--- a/libpurple/util.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/util.c	Sun Jul 01 07:15:16 2007 +0000
@@ -1730,7 +1730,7 @@
 			if (cdata_close_tag)
 			{
 				/* Note: Don't even assume any other tag is a tag in CDATA */
-				if (strncasecmp(str2 + i, cdata_close_tag,
+				if (g_ascii_strncasecmp(str2 + i, cdata_close_tag,
 						strlen(cdata_close_tag)) == 0)
 				{
 					i += strlen(cdata_close_tag) - 1;
@@ -1738,12 +1738,12 @@
 				}
 				continue;
 			}
-			else if (strncasecmp(str2 + i, "<td", 3) == 0 && closing_td_p)
+			else if (g_ascii_strncasecmp(str2 + i, "<td", 3) == 0 && closing_td_p)
 			{
 				str2[j++] = '\t';
 				visible = TRUE;
 			}
-			else if (strncasecmp(str2 + i, "</td>", 5) == 0)
+			else if (g_ascii_strncasecmp(str2 + i, "</td>", 5) == 0)
 			{
 				closing_td_p = TRUE;
 				visible = FALSE;
@@ -1771,7 +1771,7 @@
 
 				/* If we've got an <a> tag with an href, save the address
 				 * to print later. */
-				if (strncasecmp(str2 + i, "<a", 2) == 0 &&
+				if (g_ascii_strncasecmp(str2 + i, "<a", 2) == 0 &&
 				    g_ascii_isspace(str2[i+2]))
 				{
 					int st; /* start of href, inclusive [ */
@@ -1780,7 +1780,7 @@
 					/* Find start of href */
 					for (st = i + 3; st < k; st++)
 					{
-						if (strncasecmp(str2+st, "href=", 5) == 0)
+						if (g_ascii_strncasecmp(str2+st, "href=", 5) == 0)
 						{
 							st += 5;
 							if (str2[st] == '"' || str2[st] == '\'')
@@ -1812,7 +1812,7 @@
 
 				/* Replace </a> with an ascii representation of the
 				 * address the link was pointing to. */
-				else if (href != NULL && strncasecmp(str2 + i, "</a>", 4) == 0)
+				else if (href != NULL && g_ascii_strncasecmp(str2 + i, "</a>", 4) == 0)
 				{
 
 					size_t hrlen = strlen(href);
@@ -1834,29 +1834,29 @@
 				}
 
 				/* Check for tags which should be mapped to newline */
-				else if (strncasecmp(str2 + i, "<p>", 3) == 0
-				 || strncasecmp(str2 + i, "<tr", 3) == 0
-				 || strncasecmp(str2 + i, "<br", 3) == 0
-				 || strncasecmp(str2 + i, "<hr", 3) == 0
-				 || strncasecmp(str2 + i, "<li", 3) == 0
-				 || strncasecmp(str2 + i, "<div", 4) == 0
-				 || strncasecmp(str2 + i, "</table>", 8) == 0)
+				else if (g_ascii_strncasecmp(str2 + i, "<p>", 3) == 0
+				 || g_ascii_strncasecmp(str2 + i, "<tr", 3) == 0
+				 || g_ascii_strncasecmp(str2 + i, "<br", 3) == 0
+				 || g_ascii_strncasecmp(str2 + i, "<hr", 3) == 0
+				 || g_ascii_strncasecmp(str2 + i, "<li", 3) == 0
+				 || g_ascii_strncasecmp(str2 + i, "<div", 4) == 0
+				 || g_ascii_strncasecmp(str2 + i, "</table>", 8) == 0)
 				{
 					str2[j++] = '\n';
 				}
 				/* Check for tags which begin CDATA and need to be closed */
 #if 0 /* FIXME.. option is end tag optional, we can't handle this right now */
-				else if (strncasecmp(str2 + i, "<option", 7) == 0)
+				else if (g_ascii_strncasecmp(str2 + i, "<option", 7) == 0)
 				{
 					/* FIXME: We should not do this if the OPTION is SELECT'd */
 					cdata_close_tag = "</option>";
 				}
 #endif
-				else if (strncasecmp(str2 + i, "<script", 7) == 0)
+				else if (g_ascii_strncasecmp(str2 + i, "<script", 7) == 0)
 				{
 					cdata_close_tag = "</script>";
 				}
-				else if (strncasecmp(str2 + i, "<style", 6) == 0)
+				else if (g_ascii_strncasecmp(str2 + i, "<style", 6) == 0)
 				{
 					cdata_close_tag = "</style>";
 				}
@@ -3079,7 +3079,7 @@
 	i = 0; /* position in the source string */
 	j = 0; /* number of occurrences of "delimiter" */
 	while (string[i] != '\0') {
-		if (!strncasecmp(&string[i], delimiter, length_del)) {
+		if (!g_ascii_strncasecmp(&string[i], delimiter, length_del)) {
 			i += length_del;
 			j += length_rep;
 		} else {
@@ -3093,7 +3093,7 @@
 	i = 0; /* position in the source string */
 	j = 0; /* position in the destination string */
 	while (string[i] != '\0') {
-		if (!strncasecmp(&string[i], delimiter, length_del)) {
+		if (!g_ascii_strncasecmp(&string[i], delimiter, length_del)) {
 			strncpy(&ret[j], replacement, length_rep);
 			i += length_del;
 			j += length_rep;
--- a/libpurple/win32/libc_interface.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/win32/libc_interface.c	Sun Jul 01 07:15:16 2007 +0000
@@ -413,8 +413,8 @@
 		/* newname exists */
 		if(g_stat(newname, &newstat) == 0) {
 			/* oldname is a dir */
-			if(_S_ISDIR(oldstat.st_mode)) {
-				if(!_S_ISDIR(newstat.st_mode)) {
+			if(S_ISDIR(oldstat.st_mode)) {
+				if(!S_ISDIR(newstat.st_mode)) {
 					return g_rename(oldname, newname);
 				}
 				/* newname is a dir */
@@ -430,7 +430,7 @@
 			/* oldname is not a dir */
 			else {
 				/* newname is a dir */
-				if(_S_ISDIR(newstat.st_mode)) {
+				if(S_ISDIR(newstat.st_mode)) {
 					errno = EISDIR;
 					return -1;
 				}
--- a/libpurple/win32/libc_interface.h	Sun Jul 01 04:03:37 2007 +0000
+++ b/libpurple/win32/libc_interface.h	Sun Jul 01 07:15:16 2007 +0000
@@ -29,6 +29,16 @@
 #include "libc_internal.h"
 #include <glib.h>
 
+#ifdef _MSC_VER
+#define S_IRUSR S_IREAD
+#define S_IWUSR S_IWRITE
+#define S_IXUSR S_IEXEC
+
+#define S_ISDIR(m)	 (((m)&S_IFDIR)==S_IFDIR)
+
+#define F_OK 0
+#endif
+
 /* sys/socket.h */
 #define socket( namespace, style, protocol ) \
 wpurple_socket( namespace, style, protocol )
@@ -36,11 +46,11 @@
 #define connect( socket, addr, length ) \
 wpurple_connect( socket, addr, length )
 
-#define getsockopt( args... ) \
-wpurple_getsockopt( args )
+#define getsockopt( socket, level, optname, optval, optlenptr ) \
+wpurple_getsockopt( socket, level, optname, optval, optlenptr )
 
-#define setsockopt( args... ) \
-wpurple_setsockopt( args )
+#define setsockopt( socket, level, optname, optval, optlen ) \
+wpurple_setsockopt( socket, level, optname, optval, optlen )
 
 #define getsockname( socket, addr, lenptr ) \
 wpurple_getsockname( socket, addr, lenptr )
--- a/pidgin/gtkblist.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/pidgin/gtkblist.c	Sun Jul 01 07:15:16 2007 +0000
@@ -2873,7 +2873,11 @@
 	{ N_("/_Help"), NULL, NULL, 0, "<Branch>", NULL },
 	{ N_("/Help/Online _Help"), "F1", gtk_blist_show_onlinehelp_cb, 0, "<StockItem>", GTK_STOCK_HELP },
 	{ N_("/Help/_Debug Window"), NULL, toggle_debug, 0, "<Item>", NULL },
+#if GTK_CHECK_VERSION(2,6,0)	
+	{ N_("/Help/_About"), NULL, pidgin_dialogs_about, 0,  "<StockItem>", GTK_STOCK_ABOUT },
+#else
 	{ N_("/Help/_About"), NULL, pidgin_dialogs_about, 0,  "<Item>", NULL },
+#endif
 };
 
 /*********************************************************
--- a/pidgin/gtkimhtml.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/pidgin/gtkimhtml.c	Sun Jul 01 07:15:16 2007 +0000
@@ -2162,7 +2162,7 @@
 	gint i;
 
 	for(i=0; i<accepted_protocols_size; i++){
-		if( strncasecmp(text, accepted_protocols[i], strlen(accepted_protocols[i])) == 0  ){
+		if( g_ascii_strncasecmp(text, accepted_protocols[i], strlen(accepted_protocols[i])) == 0  ){
 			return strlen(accepted_protocols[i]);
 		}
 	}
@@ -2735,7 +2735,7 @@
 						/* NEW_BIT (NEW_TEXT_BIT); */
 
 						/* Bi-Directional text support */
-						if (direction && (!strncasecmp(direction, "RTL", 3))) {
+						if (direction && (!g_ascii_strncasecmp(direction, "RTL", 3))) {
 							rtl_direction = TRUE;
 							/* insert RLE character to set direction */
 							ws[wpos++]  = 0xE2;
@@ -2747,7 +2747,7 @@
 						}
 						g_free(direction);
 
-						if (alignment && (!strncasecmp(alignment, "RIGHT", 5))) {
+						if (alignment && (!g_ascii_strncasecmp(alignment, "RIGHT", 5))) {
 							align_right = TRUE;
 							align_line = gtk_text_iter_get_line(iter);
 						}
--- a/pidgin/gtkimhtmltoolbar.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/pidgin/gtkimhtmltoolbar.c	Sun Jul 01 07:15:16 2007 +0000
@@ -37,6 +37,8 @@
 #include "gtkthemes.h"
 #include "gtkutils.h"
 
+#include <gdk/gdkkeysyms.h>
+
 static GtkHBoxClass *parent_class = NULL;
 
 static void toggle_button_set_active_block(GtkToggleButton *button,
@@ -629,7 +631,6 @@
 	return ls;
 }
 
-
 static gboolean
 smiley_is_unique(GSList *list, GtkIMHtmlSmiley *smiley)
 {
@@ -642,6 +643,18 @@
 	return TRUE;
 }
 
+static gboolean
+smiley_dialog_input_cb(GtkWidget *dialog, GdkEvent *event, GtkIMHtmlToolbar *toolbar)
+{
+	if ((event->type == GDK_KEY_PRESS && event->key.keyval == GDK_Escape) ||
+	    (event->type == GDK_BUTTON_PRESS && event->button.button == 1))
+	{
+		close_smiley_dialog(NULL, NULL, toolbar);
+		return TRUE;
+	}
+
+	return FALSE;
+}
 
 static void
 insert_smiley_cb(GtkWidget *smiley, GtkIMHtmlToolbar *toolbar)
@@ -720,11 +733,16 @@
 			free(it_tmp);
 		}
 		gtk_box_pack_start(GTK_BOX(smiley_table), line, FALSE, TRUE, 0);
+
+		gtk_widget_add_events(dialog, GDK_KEY_PRESS_MASK);
 	}
 	else {
 		smiley_table = gtk_label_new(_("This theme has no available smileys."));
+		gtk_widget_add_events(dialog, GDK_KEY_PRESS_MASK | GDK_BUTTON_PRESS_MASK);
+		g_signal_connect(G_OBJECT(dialog), "button-press-event", (GCallback)smiley_dialog_input_cb, toolbar);
 	}
 
+	g_signal_connect(G_OBJECT(dialog), "key-press-event", (GCallback)smiley_dialog_input_cb, toolbar);
 	gtk_container_add(GTK_CONTAINER(dialog), smiley_table);
 
 	gtk_widget_show(smiley_table);
--- a/pidgin/gtkprefs.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/pidgin/gtkprefs.c	Sun Jul 01 07:15:16 2007 +0000
@@ -381,7 +381,8 @@
 	themename = g_value_get_string(&val);
 	purple_prefs_set_string(PIDGIN_PREFS_ROOT "/smileys/theme", themename);
 
-	gtk_widget_set_sensitive(remove_button, strcmp(themename, "none"));
+	gtk_widget_set_sensitive(remove_button, (strcmp(themename, "none") &&
+	                                         strcmp(themename, _("Default"))));
 	g_value_unset (&val);
 
 	/* current_smiley_theme is set in callback for the above pref change */
--- a/pidgin/plugins/spellchk.c	Sun Jul 01 04:03:37 2007 +0000
+++ b/pidgin/plugins/spellchk.c	Sun Jul 01 07:15:16 2007 +0000
@@ -45,9 +45,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#ifndef _WIN32
-#include <strings.h>
-#endif
 #include <sys/types.h>
 #include <sys/stat.h>
 
@@ -1787,19 +1784,19 @@
 
 	while (buf_get_line(ibuf, &buf, &pnt, size)) {
 		if (*buf != '#') {
-			if (!strncasecmp(buf, "BAD ", 4))
+			if (!g_ascii_strncasecmp(buf, "BAD ", 4))
 			{
 				strncpy(bad, buf + 4, 81);
 			}
-			else if(!strncasecmp(buf, "CASE ", 5))
+			else if(!g_ascii_strncasecmp(buf, "CASE ", 5))
 			{
 				case_sensitive = *(buf+5) == '0' ? FALSE : TRUE;
 			}
-			else if(!strncasecmp(buf, "COMPLETE ", 9))
+			else if(!g_ascii_strncasecmp(buf, "COMPLETE ", 9))
 			{
 				complete = *(buf+9) == '0' ? FALSE : TRUE;
 			}
-			else if (!strncasecmp(buf, "GOOD ", 5))
+			else if (!g_ascii_strncasecmp(buf, "GOOD ", 5))
 			{
 				strncpy(good, buf + 5, 255);