applied changes from 32f31e981f0618a4167aa98bcc22c2dab13d1550 release-2.2.3

Fri, 09 Nov 2007 08:48:40 +0000

author
John Bailey <rekkanoryo@rekkanoryo.org>
date
Fri, 09 Nov 2007 08:48:40 +0000
branch
release-2.2.3
changeset 20289
5c844288fbec
parent 20288
5ca925a094e2
child 20290
7d7f544c5387

applied changes from 32f31e981f0618a4167aa98bcc22c2dab13d1550
through a9f75de97d6cdf8fe8bf091b95def6c648aac82f

applied changes from a9f75de97d6cdf8fe8bf091b95def6c648aac82f
through 7c9f2e0cc4967a3eaade95d32f164349b6d1aa03

applied changes from a9f75de97d6cdf8fe8bf091b95def6c648aac82f
through fc4350a15fdd1f51b4496568afaa83355e18b714

applied changes from fc4350a15fdd1f51b4496568afaa83355e18b714
through 18ccd2ba2c1c9b7fa3dfedf72b48b3bd01c3a7c4

applied changes from a9f75de97d6cdf8fe8bf091b95def6c648aac82f
through 20236f54c97e87512b7eb716559a4bd86b73f833

applied changes from 868a040ee69c6e45b9132e7254a3f523e55385b2
through 0e154355bb3e8bdaeb793b142075b60671b37a48

applied changes from 329395b9793793f35bcf231033c1eb942513ab01
through 9d8120be512c235d76a8f6fee60cae024da8772e

Makefile.mingw file | annotate | diff | comparison | revisions
config.h.mingw file | annotate | diff | comparison | revisions
libpurple/connection.c file | annotate | diff | comparison | revisions
libpurple/dbus-analyze-functions.py file | annotate | diff | comparison | revisions
libpurple/example/nullclient.c file | annotate | diff | comparison | revisions
libpurple/protocols/bonjour/Makefile.mingw file | annotate | diff | comparison | revisions
libpurple/protocols/gg/gg-utils.c file | annotate | diff | comparison | revisions
libpurple/protocols/gg/gg-utils.h file | annotate | diff | comparison | revisions
libpurple/protocols/gg/gg.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/Makefile.mingw file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/buddy.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/jabber.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/libxmpp.c file | annotate | diff | comparison | revisions
libpurple/protocols/silc/chat.c file | annotate | diff | comparison | revisions
libpurple/protocols/silc/ops.c file | annotate | diff | comparison | revisions
libpurple/protocols/silc/pk.c file | annotate | diff | comparison | revisions
libpurple/protocols/silc/silc.c file | annotate | diff | comparison | revisions
libpurple/protocols/silc/silcpurple.h file | annotate | diff | comparison | revisions
libpurple/protocols/silc/util.c file | annotate | diff | comparison | revisions
libpurple/protocols/silc/wb.c file | annotate | diff | comparison | revisions
libpurple/protocols/silc10/wb.c file | annotate | diff | comparison | revisions
libpurple/prpl.h file | annotate | diff | comparison | revisions
libpurple/win32/global.mak file | annotate | diff | comparison | revisions
libpurple/win32/targets.mak file | annotate | diff | comparison | revisions
pidgin/gtkaccount.c file | annotate | diff | comparison | revisions
pidgin/gtkblist.c file | annotate | diff | comparison | revisions
pidgin/gtkconv.c file | annotate | diff | comparison | revisions
pidgin/gtkconv.h file | annotate | diff | comparison | revisions
pidgin/gtkdialogs.c file | annotate | diff | comparison | revisions
pidgin/gtkimhtml.c file | annotate | diff | comparison | revisions
pidgin/gtkimhtml.h file | annotate | diff | comparison | revisions
pidgin/gtkpluginpref.c file | annotate | diff | comparison | revisions
pidgin/gtkpounce.c file | annotate | diff | comparison | revisions
pidgin/gtkprefs.c file | annotate | diff | comparison | revisions
pidgin/gtkrequest.c file | annotate | diff | comparison | revisions
pidgin/gtksavedstatuses.c file | annotate | diff | comparison | revisions
pidgin/gtksession.c file | annotate | diff | comparison | revisions
pidgin/gtksound.c file | annotate | diff | comparison | revisions
pidgin/gtkstatusbox.c file | annotate | diff | comparison | revisions
pidgin/gtkutils.c file | annotate | diff | comparison | revisions
pidgin/plugins/contact_priority.c file | annotate | diff | comparison | revisions
pidgin/plugins/pidginrc.c file | annotate | diff | comparison | revisions
pidgin/plugins/spellchk.c file | annotate | diff | comparison | revisions
pidgin/plugins/xmppconsole.c file | annotate | diff | comparison | revisions
pidgin/win32/nsis/pidgin-installer.nsi file | annotate | diff | comparison | revisions
--- a/Makefile.mingw	Fri Nov 09 08:39:14 2007 +0000
+++ b/Makefile.mingw	Fri Nov 09 08:48:40 2007 +0000
@@ -42,19 +42,30 @@
 # Any *.dll or *.exe files included in win32-install-dir that we don't compile
 # should be included in this list so they don't get stripped
 EXTERNAL_DLLS = \
+	comerr32.dll \
 	freebl3.dll \
+	gssapi32.dll \
+	k5sprt32.dll \
+	krb5_32.dll \
 	libgtkspell.dll \
 	libmeanwhile-1.dll \
+	libsasl.dll \
 	libxml2.dll \
 	nspr4.dll \
 	nss3.dll \
 	nssckbi.dll \
 	plc4.dll \
 	plds4.dll \
+	saslANONYMOUS.dll \
+	saslCRAMMD5.dll \
+	saslDIGESTMD5.dll \
+	saslGSSAPI.dll \
+	saslLOGIN.dll \
+	saslPLAIN.dll \
 	silc.dll \
 	silcclient.dll \
+	smime3.dll \
 	softokn3.dll \
-	smime3.dll \
 	ssl3.dll
 
 #build an expression for `find` to use to ignore the above files
--- a/config.h.mingw	Fri Nov 09 08:39:14 2007 +0000
+++ b/config.h.mingw	Fri Nov 09 08:48:40 2007 +0000
@@ -377,7 +377,8 @@
 /* #define USE_SM 1 */
 
 /* Version number of package */
-/* #define VERSION "2.0.0dev" */
+#define VERSION "@VERSION@"
+#define DISPLAY_VERSION "@VERSION@"
 
 /* Define to 1 if your processor stores words with the most significant byte
    first (like Motorola and SPARC, unlike Intel and VAX). */
--- a/libpurple/connection.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/connection.c	Fri Nov 09 08:48:40 2007 +0000
@@ -432,7 +432,7 @@
 {
 	g_return_val_if_fail(gc != NULL, NULL);
 
-	return gc->password;
+	return gc->password ? gc->password : gc->account->password;
 }
 
 const char *
--- a/libpurple/dbus-analyze-functions.py	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/dbus-analyze-functions.py	Fri Nov 09 08:48:40 2007 +0000
@@ -75,7 +75,11 @@
 ]
 
 pointer = "#pointer#"
-myexception = "My Exception"
+
+class MyException(Exception):
+    pass
+
+myexception = MyException()
 
 def ctopascal(name):
     newname = ""
@@ -520,7 +524,7 @@
 
             try:
                 self.processfunction(functiontext, paramtexts)
-            except myexception:
+            except MyException:
                 sys.stderr.write(myline + "\n")
             except:
                 sys.stderr.write(myline + "\n")
--- a/libpurple/example/nullclient.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/example/nullclient.c	Fri Nov 09 08:48:40 2007 +0000
@@ -269,6 +269,13 @@
 	PurpleAccount *account;
 	PurpleSavedStatus *status;
 
+	/* libpurple's built-in DNS resolution forks processes to perform
+	 * blocking lookups without blocking the main process.  It does not
+	 * handle SIGCHLD itself, so if the UI does not you quickly get an army
+	 * of zombie subprocesses marching around.
+	 */
+	signal(SIGCHLD, SIG_IGN);
+
 	init_libpurple();
 
 	printf("libpurple initialized.\n");
--- a/libpurple/protocols/bonjour/Makefile.mingw	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/bonjour/Makefile.mingw	Fri Nov 09 08:48:40 2007 +0000
@@ -29,7 +29,7 @@
 			-I$(GTK_TOP)/include \
 			-I$(GTK_TOP)/include/glib-2.0 \
 			-I$(GTK_TOP)/lib/glib-2.0/include \
-			-I$(BONJOUR_TOP)/include \
+			-I$(BONJOUR_TOP)/Include \
 			-I$(LIBXML2_TOP)/include \
 			-I$(PURPLE_TOP) \
 			-I$(PURPLE_TOP)/win32 \
--- a/libpurple/protocols/gg/gg-utils.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/gg/gg-utils.c	Fri Nov 09 08:48:40 2007 +0000
@@ -112,5 +112,36 @@
 }
 /* }}} */
 
+void ggp_status_fake_to_self(PurpleAccount *account)
+{
+	PurplePresence *presence;
+	PurpleStatus *status;
+	const char *status_id;
+	const char *msg;
+
+	if (! purple_find_buddy(account, purple_account_get_username(account)))
+		return;
+
+	presence = purple_account_get_presence(account);
+	status = purple_presence_get_active_status(presence);
+	msg = purple_status_get_attr_string(status, "message");
+	if (msg && !*msg)
+		msg = NULL;
+
+	status_id = purple_status_get_id(status);
+	if (strcmp(status_id, "invisible") == 0) {
+		status_id = "offline";
+	}
+
+	if (msg) {
+		if (strlen(msg) > GG_STATUS_DESCR_MAXSIZE) {
+			msg = purple_markup_slice(msg, 0, GG_STATUS_DESCR_MAXSIZE);
+		}
+	}
+	purple_prpl_got_user_status(account, purple_account_get_username(account),
+				    status_id,
+				    msg ? "message" : NULL, msg, NULL);
+}
+
 
 /* vim: set ts=8 sts=0 sw=8 noet: */
--- a/libpurple/protocols/gg/gg-utils.h	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/gg/gg-utils.h	Fri Nov 09 08:48:40 2007 +0000
@@ -92,6 +92,15 @@
 char *
 ggp_buddy_get_name(PurpleConnection *gc, const uin_t uin);
 
+/**
+ * Manages the display of account's status in the buddylist.
+ *
+ * @param account Current account.
+ */
+void
+ggp_status_fake_to_self(PurpleAccount *account);
+
+
 #endif /* _PURPLE_GG_UTILS_H */
 
 /* vim: set ts=8 sts=0 sw=8 noet: */
--- a/libpurple/protocols/gg/gg.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/gg/gg.c	Fri Nov 09 08:48:40 2007 +0000
@@ -828,6 +828,7 @@
 {
 	GGPInfo *info = gc->proto_data;
 	PurpleRequestField *field;
+	/* TODO: sel may be null. */
 	GList *sel;
 
 	field = purple_request_fields_get_field(fields, "name");
@@ -1868,15 +1869,24 @@
 		gg_change_status_descr(info->session, new_status_descr, new_msg);
 		g_free(new_msg);
 	}
+
+	ggp_status_fake_to_self(account);
+
 }
 /* }}} */
 
 /* static void ggp_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) {{{ */
 static void ggp_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
 {
+	PurpleAccount *account;
 	GGPInfo *info = gc->proto_data;
 
 	gg_add_notify(info->session, ggp_str_to_uin(buddy->name));
+
+	account = purple_connection_get_account(gc);
+	if (strcmp(purple_account_get_username(account), buddy->name) == 0) {
+		ggp_status_fake_to_self(account);
+	}
 }
 /* }}} */
 
--- a/libpurple/protocols/jabber/Makefile.mingw	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/jabber/Makefile.mingw	Fri Nov 09 08:48:40 2007 +0000
@@ -88,6 +88,21 @@
 INCLUDE_PATHS += -I$(CYRUS_SASL_TOP)/include
 LIB_PATHS += -L$(CYRUS_SASL_TOP)/lib
 LIBS += -llibsasl
+CYRUS_SASL_DLLS = \
+			$(CYRUS_SASL_TOP)/bin/comerr32.dll \
+			$(CYRUS_SASL_TOP)/bin/gssapi32.dll \
+			$(CYRUS_SASL_TOP)/bin/k5sprt32.dll \
+			$(CYRUS_SASL_TOP)/bin/krb5_32.dll \
+			$(CYRUS_SASL_TOP)/bin/libsasl.dll
+
+CYRUS_SASL_PLUGINS = \
+			$(CYRUS_SASL_TOP)/bin/sasl2/saslANONYMOUS.dll \
+			$(CYRUS_SASL_TOP)/bin/sasl2/saslCRAMMD5.dll \
+			$(CYRUS_SASL_TOP)/bin/sasl2/saslDIGESTMD5.dll \
+			$(CYRUS_SASL_TOP)/bin/sasl2/saslGSSAPI.dll \
+			$(CYRUS_SASL_TOP)/bin/sasl2/saslLOGIN.dll \
+			$(CYRUS_SASL_TOP)/bin/sasl2/saslPLAIN.dll
+
 endif
 
 include $(PIDGIN_COMMON_RULES)
@@ -102,6 +117,11 @@
 install: all $(DLL_INSTALL_DIR)
 	cp $(XMPP_TARGET).dll $(DLL_INSTALL_DIR)
 	cp $(TARGET).dll $(PURPLE_INSTALL_DIR)
+ifeq ($(CYRUS_SASL), 1)
+	mkdir -p $(PURPLE_INSTALL_DIR)/sasl2
+	cp $(CYRUS_SASL_DLLS) $(PURPLE_INSTALL_DIR)
+	cp $(CYRUS_SASL_PLUGINS) $(PURPLE_INSTALL_DIR)/sasl2
+endif
 
 $(OBJECTS): $(PURPLE_CONFIG_H)
 
--- a/libpurple/protocols/jabber/buddy.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Fri Nov 09 08:48:40 2007 +0000
@@ -2252,6 +2252,16 @@
 	xmlnode *query;
 	JabberIq *iq;
 	char *dir_server = data;
+	const char *type;
+
+	/* if they've cancelled the search, we're
+	 * just going to get an error if we send
+	 * a cancel, so skip it */
+	type = xmlnode_get_attrib(result, "type");
+	if(type && !strcmp(type, "cancel")) {
+		g_free(dir_server);
+		return;
+	}
 
 	iq = jabber_iq_new_query(js, JABBER_IQ_SET, "jabber:iq:search");
 	query = xmlnode_get_child(iq->node, "query");
--- a/libpurple/protocols/jabber/jabber.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Fri Nov 09 08:48:40 2007 +0000
@@ -1664,6 +1664,8 @@
 	if(type && !strcmp(type, "result")) {
 		purple_notify_info(js->gc, _("Password Changed"), _("Password Changed"),
 				_("Your password has been changed."));
+
+		purple_account_set_password(js->gc->account, (char *)data);
 	} else {
 		char *msg = jabber_parse_error(js, packet);
 
@@ -1671,6 +1673,8 @@
 				_("Error changing password"), msg);
 		g_free(msg);
 	}
+
+	g_free(data);
 }
 
 static void jabber_password_change_cb(JabberStream *js,
@@ -1699,11 +1703,9 @@
 	y = xmlnode_new_child(query, "password");
 	xmlnode_insert_data(y, p1, -1);
 
-	jabber_iq_set_callback(iq, jabber_password_change_result_cb, NULL);
+	jabber_iq_set_callback(iq, jabber_password_change_result_cb, g_strdup(p1));
 
 	jabber_iq_send(iq);
-
-	purple_account_set_password(js->gc->account, p1);
 }
 
 static void jabber_password_change(PurplePluginAction *action)
--- a/libpurple/protocols/jabber/libxmpp.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/jabber/libxmpp.c	Fri Nov 09 08:48:40 2007 +0000
@@ -193,6 +193,9 @@
 init_plugin(PurplePlugin *plugin)
 {
 #ifdef HAVE_CYRUS_SASL
+#ifdef _WIN32
+	gchar *sasldir;
+#endif
 	int ret;
 #endif
 	PurpleAccountUserSplit *split;
@@ -237,6 +240,11 @@
 	
 	/* XXX - If any other plugin wants SASL this won't be good ... */
 #ifdef HAVE_CYRUS_SASL
+#ifdef _WIN32
+	sasldir = g_build_filename(wpurple_install_dir(), "sasl2", NULL);
+	sasl_set_path(SASL_PATH_TYPE_PLUGIN, sasldir);
+	g_free(sasldir);
+#endif
 	if ((ret = sasl_client_init(NULL)) != SASL_OK) {
 		purple_debug_error("xmpp", "Error (%d) initializing SASL.\n", ret);
 	}
--- a/libpurple/protocols/silc/chat.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/silc/chat.c	Fri Nov 09 08:48:40 2007 +0000
@@ -160,15 +160,17 @@
 		unsigned char *pk;
 		SilcUInt32 pk_len;
 		pk = silc_pkcs_public_key_encode(channel->founder_key, &pk_len);
-		fingerprint = silc_hash_fingerprint(NULL, pk, pk_len);
-		babbleprint = silc_hash_babbleprint(NULL, pk, pk_len);
+		if (pk) {
+			fingerprint = silc_hash_fingerprint(NULL, pk, pk_len);
+			babbleprint = silc_hash_babbleprint(NULL, pk, pk_len);
 
-		g_string_append_printf(s, _("<br><b>Founder Key Fingerprint:</b><br>%s"), fingerprint);
-		g_string_append_printf(s, _("<br><b>Founder Key Babbleprint:</b><br>%s"), babbleprint);
+			g_string_append_printf(s, _("<br><b>Founder Key Fingerprint:</b><br>%s"), fingerprint);
+			g_string_append_printf(s, _("<br><b>Founder Key Babbleprint:</b><br>%s"), babbleprint);
 
-		silc_free(fingerprint);
-		silc_free(babbleprint);
-		silc_free(pk);
+			silc_free(fingerprint);
+			silc_free(babbleprint);
+			silc_free(pk);
+		}
 	}
 
 	buf = g_string_free(s, FALSE);
@@ -460,6 +462,8 @@
 	silc_dlist_start(channel_pubkeys);
 	while ((public_key = silc_dlist_get(channel_pubkeys))) {
 		pk = silc_pkcs_public_key_encode(public_key, &pk_len);
+		if (!pk)
+			continue;
 		fingerprint = silc_hash_fingerprint(NULL, pk + 4, pk_len - 4);
 		babbleprint = silc_hash_babbleprint(NULL, pk + 4, pk_len - 4);
 
@@ -1013,9 +1017,6 @@
 	SilcClient client = sg->client;
 	SilcClientConnection conn = sg->conn;
 	const char *channel, *passphrase, *parentch;
-#if 0
-	PurpleChat *chat;
-#endif
 
 	if (!conn)
 		return;
@@ -1071,22 +1072,6 @@
 		return;
 	}
 
-#if 0
-	/* If the channel is not on buddy list, automatically add it there. */
-	chat = purple_blist_find_chat(sg->account, channel);
-	if (!chat) {
-		data = g_hash_table_new_full(g_str_hash, g_str_equal,
-					     g_free, g_free);
-		g_hash_table_replace(data, g_strdup("channel"),
-				     g_strdup(channel));
-		if (passphrase)
-		  g_hash_table_replace(data, g_strdup("passphrase"),
-				       g_strdup(passphrase));
-		chat = purple_chat_new(sg->account, NULL, data);
-		purple_blist_add_chat(chat, NULL, NULL);
-	}
-#endif
-
 	/* XXX We should have other properties here as well:
 	   1. whether to try to authenticate to the channel
 	     1a. with default key,
@@ -1320,7 +1305,7 @@
 				ret =
 			 	silc_client_send_channel_message(client, conn,
 								 channel, key,
-								 flags, NULL,
+								 flags, sg->sha1hash,
 								 buf->data,
 								 silc_buffer_len(buf));
 			silc_mime_partial_free(list);
@@ -1334,7 +1319,8 @@
 
 	/* Send channel message */
 	ret = silc_client_send_channel_message(client, conn, channel, key,
-					       flags, NULL, (unsigned char *)msg2,
+					       flags, sg->sha1hash,
+					       (unsigned char *)msg2,
 					       strlen(msg2));
 	if (ret) {
 		serv_got_chat_in(gc, id, purple_connection_get_display_name(gc), 0, msg,
--- a/libpurple/protocols/silc/ops.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/silc/ops.c	Fri Nov 09 08:48:40 2007 +0000
@@ -1274,13 +1274,15 @@
 				unsigned char *pk;
 				SilcUInt32 pk_len;
 				pk = silc_pkcs_public_key_encode(client_entry->public_key, &pk_len);
-				fingerprint = silc_hash_fingerprint(NULL, pk, pk_len);
-				babbleprint = silc_hash_babbleprint(NULL, pk, pk_len);
-				purple_notify_user_info_add_pair(user_info, _("Public Key Fingerprint"), fingerprint);
-				purple_notify_user_info_add_pair(user_info, _("Public Key Babbleprint"), babbleprint);
-				silc_free(fingerprint);
-				silc_free(babbleprint);
-				silc_free(pk);
+				if (pk) {
+					fingerprint = silc_hash_fingerprint(NULL, pk, pk_len);
+					babbleprint = silc_hash_babbleprint(NULL, pk, pk_len);
+					purple_notify_user_info_add_pair(user_info, _("Public Key Fingerprint"), fingerprint);
+					purple_notify_user_info_add_pair(user_info, _("Public Key Babbleprint"), babbleprint);
+					silc_free(fingerprint);
+					silc_free(babbleprint);
+					silc_free(pk);
+				}
 			}
 
 #if 0 /* XXX for now, let's not show attrs here */
@@ -1346,13 +1348,15 @@
 				unsigned char *pk;
 				SilcUInt32 pk_len;
 				pk = silc_pkcs_public_key_encode(client_entry->public_key, &pk_len);
-				fingerprint = silc_hash_fingerprint(NULL, pk, pk_len);
-				babbleprint = silc_hash_babbleprint(NULL, pk, pk_len);
-				purple_notify_user_info_add_pair(user_info, _("Public Key Fingerprint"), fingerprint);
-				purple_notify_user_info_add_pair(user_info, _("Public Key Babbleprint"), babbleprint);
-				silc_free(fingerprint);
-				silc_free(babbleprint);
-				silc_free(pk);
+				if (pk) {
+					fingerprint = silc_hash_fingerprint(NULL, pk, pk_len);
+					babbleprint = silc_hash_babbleprint(NULL, pk, pk_len);
+					purple_notify_user_info_add_pair(user_info, _("Public Key Fingerprint"), fingerprint);
+					purple_notify_user_info_add_pair(user_info, _("Public Key Babbleprint"), babbleprint);
+					silc_free(fingerprint);
+					silc_free(babbleprint);
+					silc_free(pk);
+				}
 			}
 
 			purple_notify_userinfo(gc, nickname, user_info, NULL, NULL);
--- a/libpurple/protocols/silc/pk.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/silc/pk.c	Fri Nov 09 08:48:40 2007 +0000
@@ -158,6 +158,11 @@
 				    NULL, &hostname, &ip, &port);
 
 	pk = silc_pkcs_public_key_encode(public_key, &pk_len);
+	if (!pk) {
+		if (completion)
+			completion(FALSE, context);
+		return;
+	}
 
 	if (conn_type == SILC_CONN_SERVER ||
 	    conn_type == SILC_CONN_ROUTER) {
--- a/libpurple/protocols/silc/silc.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/silc/silc.c	Fri Nov 09 08:48:40 2007 +0000
@@ -128,6 +128,7 @@
 			 NULL, 0);
 }
 
+#if __SILC_TOOLKIT_VERSION < SILC_VERSION(1,1,1)
 static gboolean
 silcpurple_scheduler(gpointer *context)
 {
@@ -135,6 +136,105 @@
 	silc_client_run_one(client);
 	return TRUE;
 }
+#else
+typedef struct {
+  SilcPurple sg;
+  SilcUInt32 fd;
+  guint tag;
+} *SilcPurpleTask;
+
+/* A timeout occurred.  Call SILC scheduler. */
+
+static gboolean
+silcpurple_scheduler_timeout(gpointer context)
+{
+	SilcPurpleTask task = (SilcPurpleTask)context;
+	silc_client_run_one(task->sg->client);
+	silc_dlist_del(task->sg->tasks, task);
+	silc_free(task);
+	return FALSE;
+}
+
+/* An fd task event occurred.  Call SILC scheduler. */
+
+static void
+silcpurple_scheduler_fd(gpointer data, gint fd, PurpleInputCondition cond)
+{
+	SilcClient client = (SilcClient)data;
+	silc_client_run_one(client);
+}
+
+/* SILC Scheduler notify callback.  This is called whenever task is added to
+   or deleted from SILC scheduler.  It's also called when fd task events
+   change.  Here we add same tasks to glib's main loop. */
+
+static void
+silcpurple_scheduler(SilcSchedule schedule,
+		     SilcBool added, SilcTask task,
+		     SilcBool fd_task, SilcUInt32 fd,
+		     SilcTaskEvent event,
+		     long seconds, long useconds,
+		     void *context)
+{
+	SilcClient client = (SilcClient)context;
+	PurpleConnection *gc = client->application;
+	SilcPurple sg = gc->proto_data;
+	SilcPurpleTask ptask = NULL;
+
+	if (added) {
+	  if (fd_task) {
+	    /* Add fd or change fd events */
+	    PurpleInputCondition e = 0;
+
+	    silc_dlist_start(sg->tasks);
+	    while ((ptask = silc_dlist_get(sg->tasks)))
+	      if (ptask->fd == fd) {
+		purple_input_remove(ptask->tag);
+		break;
+	      }
+
+	    if (event & SILC_TASK_READ)
+	      e |= PURPLE_INPUT_READ;
+	    if (event & SILC_TASK_WRITE)
+	      e |= PURPLE_INPUT_WRITE;
+
+	    if (e) {
+	      if (!ptask) {
+		ptask = silc_calloc(1, sizeof(*ptask));
+		ptask->fd = fd;
+		silc_dlist_add(sg->tasks, ptask);
+	      }
+	      ptask->tag = purple_input_add(fd, e, silcpurple_scheduler_fd,
+					    client);
+	    } else if (ptask) {
+	      silc_dlist_del(sg->tasks, ptask);
+	      silc_free(ptask);
+	    }
+	  } else {
+	    /* Add timeout */
+	    ptask = silc_calloc(1, sizeof(*ptask));
+	    ptask->sg = sg;
+	    ptask->tag = purple_timeout_add((seconds * 1000) +
+					    (useconds / 1000),
+					    silcpurple_scheduler_timeout,
+					    ptask);
+	    silc_dlist_add(sg->tasks, ptask);
+	  }
+	} else {
+	  if (fd_task) {
+	    /* Remove fd */
+	    silc_dlist_start(sg->tasks);
+	    while ((ptask = silc_dlist_get(sg->tasks)))
+	      if (ptask->fd == fd) {
+		purple_input_remove(ptask->tag);
+		silc_dlist_del(sg->tasks, ptask);
+		silc_free(ptask);
+		break;
+	      }
+	  }
+	}
+}
+#endif /* __SILC_TOOLKIT_VERSION */
 
 static void
 silcpurple_connect_cb(SilcClient client, SilcClientConnection conn,
@@ -316,6 +416,8 @@
 		return;
 	}
 
+	silc_hash_alloc("sha1", &sg->sha1hash);
+
 	/* Wrap socket to TCP stream */
 	silc_socket_tcp_stream_create(source, TRUE, FALSE,
 				      sg->client->schedule,
@@ -324,21 +426,11 @@
 
 static void silcpurple_running(SilcClient client, void *context)
 {
-	PurpleAccount *account = context;
-	PurpleConnection *gc = account->gc;
-	SilcPurple sg;
+	SilcPurple sg = context;
+	PurpleConnection *gc = sg->gc;
+	PurpleAccount *account = purple_connection_get_account(gc);
 	char pkd[256], prd[256];
 
-	sg = silc_calloc(1, sizeof(*sg));
-	if (!sg)
-		return;
-	memset(sg, 0, sizeof(*sg));
-	sg->client = client;
-	sg->gc = gc;
-	sg->account = account;
-	sg->scheduler = SILC_PTR_TO_32(gc->proto_data);
-	gc->proto_data = sg;
-
 	/* Progress */
 	purple_connection_update_progress(gc, _("Connecting to SILC Server"), 1, 5);
 
@@ -375,10 +467,10 @@
 {
 	SilcClient client;
 	PurpleConnection *gc;
+	SilcPurple sg;
 	SilcClientParams params;
 	const char *cipher, *hmac;
 	char *username, *hostname, *realname, **up;
-	guint scheduler;
 	int i;
 
 	gc = account->gc;
@@ -431,11 +523,21 @@
 			break;
 		}
 
+	sg = silc_calloc(1, sizeof(*sg));
+	if (!sg)
+		return;
+	sg->client = client;
+	sg->gc = gc;
+	sg->account = account;
+	gc->proto_data = sg;
+
 	/* Init SILC client */
 	if (!silc_client_init(client, username, hostname, realname,
-			      silcpurple_running, account)) {
+			      silcpurple_running, sg)) {
 		gc->wants_to_die = TRUE;
 		purple_connection_error(gc, _("Cannot initialize SILC protocol"));
+		gc->proto_data = NULL;
+		silc_free(sg);
 		return;
 	}
 
@@ -443,20 +545,32 @@
 	if (!silcpurple_check_silc_dir(gc)) {
 		gc->wants_to_die = TRUE;
 		purple_connection_error(gc, _("Error loading SILC key pair"));
+		gc->proto_data = NULL;
+		silc_free(sg);
 		return;
 	}
 
+#if __SILC_TOOLKIT_VERSION < SILC_VERSION(1,1,1)
 	/* Schedule SILC using Glib's event loop */
-	scheduler = purple_timeout_add(300, (GSourceFunc)silcpurple_scheduler, client);
-	gc->proto_data = SILC_32_TO_PTR(scheduler);
+	sg->scheduler = purple_timeout_add(300, (GSourceFunc)silcpurple_scheduler, client);
+#else
+	/* Run SILC scheduler */
+	sg->tasks = silc_dlist_init();
+	silc_schedule_set_notify(client->schedule, silcpurple_scheduler,
+				 client);
+	silc_client_run_one(client);
+#endif /* __SILC_TOOLKIT_VERSION */
 }
 
 static int
 silcpurple_close_final(gpointer *context)
 {
 	SilcPurple sg = (SilcPurple)context;
+
 	silc_client_stop(sg->client, NULL, NULL);
 	silc_client_free(sg->client);
+	if (sg->sha1hash)
+		silc_hash_free(sg->sha1hash);
 	if (sg->mimeass)
 		silc_mime_assembler_free(sg->mimeass);
 	silc_free(sg);
@@ -467,16 +581,33 @@
 silcpurple_close(PurpleConnection *gc)
 {
 	SilcPurple sg = gc->proto_data;
+#if __SILC_TOOLKIT_VERSION >= SILC_VERSION(1,1,1)
+	SilcPurpleTask task;
+#endif /* __SILC_TOOLKIT_VERSION */
 
 	g_return_if_fail(sg != NULL);
 
 	/* Send QUIT */
 	silc_client_command_call(sg->client, sg->conn, NULL,
-				 "QUIT", "Download Pidgin: " PURPLE_WEBSITE, NULL);
+				 "QUIT", "Download Pidgin: " PURPLE_WEBSITE,
+				 NULL);
 
 	if (sg->conn)
 		silc_client_close_connection(sg->client, sg->conn);
 
+#if __SILC_TOOLKIT_VERSION >= SILC_VERSION(1,1,1)
+	if (sg->conn)
+	  silc_client_run_one(sg->client);
+	silc_schedule_set_notify(sg->client->schedule, NULL, NULL);
+
+	silc_dlist_start(sg->tasks);
+	while ((task = silc_dlist_get(sg->tasks))) {
+	  purple_input_remove(task->tag);
+	  silc_free(task);
+	}
+	silc_dlist_uninit(sg->tasks);
+#endif /* __SILC_TOOLKIT_VERSION */
+
 	purple_timeout_remove(sg->scheduler);
 	purple_timeout_add(1, (GSourceFunc)silcpurple_close_final, sg);
 }
@@ -1155,7 +1286,7 @@
 			silc_dlist_start(list);
 			while ((buf = silc_dlist_get(list)) != SILC_LIST_END)
 				silc_client_send_private_message(client, conn,
-								 client_entry, im->flags, NULL,
+								 client_entry, im->flags, sg->sha1hash,
 								 buf->data,
 								 silc_buffer_len(buf));
 			silc_mime_partial_free(list);
@@ -1167,7 +1298,7 @@
 
 	/* Send the message */
 	silc_client_send_private_message(client, conn, client_entry, im->flags,
-					 NULL, (unsigned char *)im->message, im->message_len);
+					 sg->sha1hash, (unsigned char *)im->message, im->message_len);
 	purple_conv_im_write(PURPLE_CONV_IM(convo), conn->local_entry->nickname,
 			     im->message, 0, time(NULL));
 	goto out;
@@ -1259,7 +1390,7 @@
 			while ((buf = silc_dlist_get(list)) != SILC_LIST_END)
 				ret =
 			 	silc_client_send_private_message(client, conn,
-								 client_entry, mflags, NULL,
+								 client_entry, mflags, sg->sha1hash,
 								 buf->data,
 								 silc_buffer_len(buf));
 			silc_mime_partial_free(list);
@@ -1271,7 +1402,7 @@
 
 	/* Send private message directly */
 	ret = silc_client_send_private_message(client, conn, client_entry,
-					       mflags, NULL,
+					       mflags, sg->sha1hash,
 					       (unsigned char *)msg,
 					       strlen(msg));
 
--- a/libpurple/protocols/silc/silcpurple.h	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/silc/silcpurple.h	Fri Nov 09 08:48:40 2007 +0000
@@ -35,6 +35,9 @@
 #include "server.h"
 #include "util.h"
 
+#undef SILC_VERSION
+#define SILC_VERSION(a, b, c) (((a) << 24) + ((b) << 16) + ((c) << 8))
+
 /* Default public and private key file names */
 #define SILCPURPLE_PUBLIC_KEY_NAME "public_key.pub"
 #define SILCPURPLE_PRIVATE_KEY_NAME "private_key.prv"
@@ -68,7 +71,9 @@
 	SilcClientConnection conn;
 	SilcPublicKey public_key;
 	SilcPrivateKey private_key;
+	SilcHash sha1hash;
 
+	SilcDList tasks;
 	guint scheduler;
 	PurpleConnection *gc;
 	PurpleAccount *account;
--- a/libpurple/protocols/silc/util.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/silc/util.c	Fri Nov 09 08:48:40 2007 +0000
@@ -347,8 +347,12 @@
 	key_len = silc_pkcs_public_key_get_len(public_key);
 
 	pk = silc_pkcs_public_key_encode(public_key, &pk_len);
+	if (!pk)
+	  return;
 	fingerprint = silc_hash_fingerprint(NULL, pk, pk_len);
 	babbleprint = silc_hash_babbleprint(NULL, pk, pk_len);
+	if (!fingerprint || !babbleprint)
+	  return;
 
 	s = g_string_new("");
 	if (ident->realname)
--- a/libpurple/protocols/silc/wb.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/silc/wb.c	Fri Nov 09 08:48:40 2007 +0000
@@ -254,10 +254,10 @@
 
 static void
 silcpurple_wb_request(SilcClient client, const unsigned char *message,
-		    SilcUInt32 message_len, SilcClientEntry sender,
-		    SilcChannelEntry channel)
+		      SilcUInt32 message_len, SilcClientEntry sender,
+		      SilcChannelEntry channel)
 {
-	char tmp[128];
+	char tmp[256];
 	SilcPurpleWbRequest req;
 	PurpleConnection *gc;
 	SilcPurple sg;
@@ -274,20 +274,24 @@
 		else
 			wb = silcpurple_wb_init_ch(sg, channel);
 
-		silcpurple_wb_parse(wb->proto_data, wb, (unsigned char *)message,
-				  message_len);
+		silcpurple_wb_parse(wb->proto_data, wb,
+				    (unsigned char *)message,
+				    message_len);
 		return;
 	}
 
+	/* Close any previous unaccepted requests */
+	purple_request_close_with_handle(sender);
+
 	if (!channel) {
 		g_snprintf(tmp, sizeof(tmp),
-			_("%s sent message to whiteboard. Would you like "
-			  "to open the whiteboard?"), sender->nickname);
+			   _("%s sent message to whiteboard. Would you like "
+			     "to open the whiteboard?"), sender->nickname);
 	} else {
 		g_snprintf(tmp, sizeof(tmp),
-			_("%s sent message to whiteboard on %s channel. "
-			  "Would you like to open the whiteboard?"),
-			sender->nickname, channel->channel_name);
+			   _("%s sent message to whiteboard on %s channel. "
+			     "Would you like to open the whiteboard?"),
+			   sender->nickname, channel->channel_name);
 	}
 
 	req = silc_calloc(1, sizeof(*req));
@@ -299,10 +303,10 @@
 	req->channel = channel;
 	req->sg = sg;
 
-	purple_request_action(gc, _("Whiteboard"), tmp, NULL, 1,
-				sg->account, sender->nickname, NULL, req, 2,
-			    _("Yes"), G_CALLBACK(silcpurple_wb_request_cb),
-			    _("No"), G_CALLBACK(silcpurple_wb_request_cb));
+	purple_request_action(sender, _("Whiteboard"), tmp, NULL, 1,
+			      sg->account, sender->nickname, NULL, req, 2,
+			      _("Yes"), G_CALLBACK(silcpurple_wb_request_cb),
+			      _("No"), G_CALLBACK(silcpurple_wb_request_cb));
 }
 
 /* Process incoming whiteboard message */
--- a/libpurple/protocols/silc10/wb.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/protocols/silc10/wb.c	Fri Nov 09 08:48:40 2007 +0000
@@ -279,6 +279,9 @@
 		return;
 	}
 
+	/* Close any previous unaccepted requests */
+	purple_request_close_with_handle(sender);
+
 	if (!channel) {
 		g_snprintf(tmp, sizeof(tmp),
 			_("%s sent message to whiteboard. Would you like "
@@ -299,7 +302,7 @@
 	req->channel = channel;
 	req->sg = sg;
 
-	purple_request_action(gc, _("Whiteboard"), tmp, NULL, 1,
+	purple_request_action(sender, _("Whiteboard"), tmp, NULL, 1,
 				sg->account, sender->nickname, NULL, req, 2,
 			    _("Yes"), G_CALLBACK(silcpurple_wb_request_cb),
 			    _("No"), G_CALLBACK(silcpurple_wb_request_cb));
--- a/libpurple/prpl.h	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/prpl.h	Fri Nov 09 08:48:40 2007 +0000
@@ -323,6 +323,15 @@
 
 	void (*remove_group)(PurpleConnection *gc, PurpleGroup *group);
 
+	/** Gets the real name of a participant in a chat.  For example, on
+	 *  XMPP this turns a chat room nick <tt>foo</tt> into
+	 *  <tt>room@server/foo</tt>
+	 *  @param gc  the connection on which the room is.
+	 *  @param id  the ID of the chat room.
+	 *  @param who the nickname of the chat participant.
+	 *  @return    the real name of the participant.  This string must be
+	 *             freed by the caller.
+	 */
 	char *(*get_cb_real_name)(PurpleConnection *gc, int id, const char *who);
 
 	void (*set_chat_topic)(PurpleConnection *gc, int id, const char *topic);
--- a/libpurple/win32/global.mak	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/win32/global.mak	Fri Nov 09 08:48:40 2007 +0000
@@ -71,9 +71,7 @@
 )
 PURPLE_VERSION := $(PIDGIN_VERSION)
 
-DEFINES += 	-DVERSION=\"$(PIDGIN_VERSION)\" \
-		-DDISPLAY_VERSION=\"$(PIDGIN_VERSION)\" \
-		-DHAVE_CONFIG_H
+DEFINES += -DHAVE_CONFIG_H
 
 # Use -g flag when building debug version of Pidgin (including plugins).
 # Use -fnative-struct instead of -mms-bitfields when using mingw 1.1
--- a/libpurple/win32/targets.mak	Fri Nov 09 08:39:14 2007 +0000
+++ b/libpurple/win32/targets.mak	Fri Nov 09 08:48:40 2007 +0000
@@ -5,15 +5,15 @@
 # files for better handling of cross directory dependencies
 #
 
-$(PIDGIN_CONFIG_H): $(PIDGIN_TREE_TOP)/config.h.mingw
-	cp $(PIDGIN_TREE_TOP)/config.h.mingw $(PIDGIN_CONFIG_H)
+$(PIDGIN_CONFIG_H): $(PIDGIN_CONFIG_H).mingw $(PIDGIN_TREE_TOP)/configure.ac
+	sed -e 's/@VERSION@/$(PIDGIN_VERSION)/' $@.mingw > $@
 
 $(PURPLE_VERSION_H): $(PURPLE_VERSION_H).in $(PIDGIN_TREE_TOP)/configure.ac
-	cp $(PURPLE_VERSION_H).in $(PURPLE_VERSION_H)
+	cp $@.in $@
 	awk 'BEGIN {FS="[\\(\\)\\[\\]]"} \
-	  /^m4_define..purple_major_version/ {system("sed -i -e s/@PURPLE_MAJOR_VERSION@/"$$5"/ $(PURPLE_VERSION_H)");} \
-	  /^m4_define..purple_minor_version/ {system("sed -i -e s/@PURPLE_MINOR_VERSION@/"$$5"/ $(PURPLE_VERSION_H)");} \
-	  /^m4_define..purple_micro_version/ {system("sed -i -e s/@PURPLE_MICRO_VERSION@/"$$5"/ $(PURPLE_VERSION_H)"); exit}' $(PIDGIN_TREE_TOP)/configure.ac
+	  /^m4_define..purple_major_version/ {system("sed -i -e s/@PURPLE_MAJOR_VERSION@/"$$5"/ $@");} \
+	  /^m4_define..purple_minor_version/ {system("sed -i -e s/@PURPLE_MINOR_VERSION@/"$$5"/ $@");} \
+	  /^m4_define..purple_micro_version/ {system("sed -i -e s/@PURPLE_MICRO_VERSION@/"$$5"/ $@"); exit}' $(PIDGIN_TREE_TOP)/configure.ac
 
 $(PURPLE_DLL) $(PURPLE_DLL).a: $(PURPLE_VERSION_H)
 	$(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE) libpurple.dll
@@ -30,9 +30,6 @@
 $(PIDGIN_EXE):
 	$(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE) pidgin.exe
 
-$(PIDGIN_PORTABLE_EXE):
-	$(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE) pidgin-portable.exe
-
 # Installation Directories
 $(PIDGIN_INSTALL_DIR):
 	mkdir -p $(PIDGIN_INSTALL_DIR)
--- a/pidgin/gtkaccount.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtkaccount.c	Fri Nov 09 08:48:40 2007 +0000
@@ -212,6 +212,9 @@
 		                        purple_imgstore_get_size(dialog->icon_img), NULL);
 		gdk_pixbuf_loader_close(loader, NULL);
 		pixbuf = gdk_pixbuf_loader_get_pixbuf(loader);
+		if (pixbuf)
+			g_object_ref(pixbuf);
+		g_object_unref(loader);
 	}
 
 	if (pixbuf && dialog->prpl_info &&
@@ -1129,6 +1132,7 @@
 	g_list_free(dialog->user_split_entries);
 	g_list_free(dialog->protocol_opt_entries);
 	g_free(dialog->protocol_id);
+	g_object_unref(dialog->sg);
 
 	purple_imgstore_unref(dialog->icon_img);
 
@@ -2055,8 +2059,9 @@
 
 		if (buddyicon_pixbuf != NULL) {
 			buddyicon = gdk_pixbuf_scale_simple(buddyicon_pixbuf, 22, 22, GDK_INTERP_HYPER);
-			g_object_unref(G_OBJECT(buddyicon_pixbuf));
 		}
+
+		g_object_unref(loader);
 	}
 
 	gtk_list_store_set(store, iter,
--- a/pidgin/gtkblist.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtkblist.c	Fri Nov 09 08:48:40 2007 +0000
@@ -109,7 +109,7 @@
 static GtkWidget *accountmenu = NULL;
 
 static guint visibility_manager_count = 0;
-static gboolean gtk_blist_obscured = FALSE;
+static GdkVisibilityState gtk_blist_visibility = GDK_VISIBILITY_UNOBSCURED;
 static gboolean editing_blist = FALSE;
 
 static GList *pidgin_blist_sort_methods = NULL;
@@ -162,11 +162,14 @@
  ***************************************************/
 static gboolean gtk_blist_visibility_cb(GtkWidget *w, GdkEventVisibility *event, gpointer data)
 {
-	if (event->state == GDK_VISIBILITY_FULLY_OBSCURED)
-		gtk_blist_obscured = TRUE;
-	else if (gtk_blist_obscured) {
-			gtk_blist_obscured = FALSE;
-			pidgin_blist_refresh_timer(purple_get_blist());
+	GdkVisibilityState old_state = gtk_blist_visibility;
+	gtk_blist_visibility = event->state;
+
+	if (gtk_blist_visibility == GDK_VISIBILITY_FULLY_OBSCURED &&
+		old_state != GDK_VISIBILITY_FULLY_OBSCURED) {
+
+		/* no longer fully obscured */
+		pidgin_blist_refresh_timer(purple_get_blist());
 	}
 
 	/* continue to handle event normally */
@@ -3561,7 +3564,8 @@
 {
 	PurpleBlistNode *gnode, *cnode;
 
-	if (gtk_blist_obscured || !GTK_WIDGET_VISIBLE(gtkblist->window))
+	if (gtk_blist_visibility == GDK_VISIBILITY_FULLY_OBSCURED
+			|| !GTK_WIDGET_VISIBLE(gtkblist->window)) 
 		return TRUE;
 
 	for(gnode = list->root; gnode; gnode = gnode->next) {
@@ -5991,7 +5995,8 @@
 {
 	if (gtkblist && gtkblist->window) {
 		if (GTK_WIDGET_VISIBLE(gtkblist->window)) {
-			purple_blist_set_visible(PIDGIN_WINDOW_ICONIFIED(gtkblist->window) || gtk_blist_obscured);
+			purple_blist_set_visible(PIDGIN_WINDOW_ICONIFIED(gtkblist->window) ||
+					gtk_blist_visibility != GDK_VISIBILITY_UNOBSCURED);
 		} else {
 			purple_blist_set_visible(TRUE);
 		}
--- a/pidgin/gtkconv.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtkconv.c	Fri Nov 09 08:48:40 2007 +0000
@@ -4972,7 +4972,6 @@
 	gtkconv->send_history = g_list_append(NULL, NULL);
 
 	/* Setup some initial variables. */
-	gtkconv->sg       = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
 	gtkconv->tooltips = gtk_tooltips_new();
 	gtkconv->unseen_state = PIDGIN_UNSEEN_NONE;
 	gtkconv->unseen_count = 0;
--- a/pidgin/gtkconv.h	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtkconv.h	Fri Nov 09 08:48:40 2007 +0000
@@ -142,7 +142,12 @@
 	GtkWidget *tab_label;
 	GtkWidget *menu_icon;
 	GtkWidget *menu_label;
+#ifndef PIDGIN_DISABLE_DEPRECATED
+	/** @deprecated */
 	GtkSizeGroup *sg;
+#else
+	gpointer depr1;
+#endif
 
 	GtkWidget *lower_hbox;
 
--- a/pidgin/gtkdialogs.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtkdialogs.c	Fri Nov 09 08:48:40 2007 +0000
@@ -71,6 +71,7 @@
 static struct developer developers[] = {
 	{"Sean Egan",					N_("lead developer"), "sean.egan@gmail.com"},
 	{"Daniel 'datallah' Atallah",	N_("developer"), NULL},
+	{"John 'rekkanoryo' Bailey",	N_("developer"), NULL},
 	{"Ethan 'Paco-Paco' Blanton",	N_("developer"), NULL},
 	{"Thomas Butter",				N_("developer"), NULL},
 	{"Ka-Hing Cheung",				N_("developer"), NULL},
@@ -95,7 +96,6 @@
 
 /* Order: Alphabetical by Last Name */
 static struct developer patch_writers[] = {
-	{"John 'rekkanoryo' Bailey",	NULL,	NULL},
 	{"Dennis 'EvilDennisR' Ristuccia",	N_("Senior Contributor/QA"),	NULL},
 	{"Peter 'Fmoo' Ruibal",		NULL,	NULL},
 	{"Gabriel 'Nix' Schulhof", 	NULL, 	NULL},
@@ -147,7 +147,7 @@
 	{N_("Danish"),              "da", "Morten Brix Pedersen", "morten@wtf.dk"},
 	{N_("Danish"),              "da", "Peter Bach", "bach.peter@gmail.com"},
 	{N_("German"),              "de", "Björn Voigt", "bjoern@cs.tu-berlin.de"},
-	{N_("German"),              "de", "Jochen Kemnade", "kemnade@gmail.com"},
+	{N_("German"),              "de", "Jochen Kemnade", "jochenkemnade@web.de"},
 	{N_("Dzongkha"),            "dz", "Norbu", "nor_den@hotmail.com"},
 	{N_("Dzongkha"),            "dz", "Jurmey Rabgay", "jur_gay@yahoo.com"},
 	{N_("Dzongkha"),            "dz", "Wangmo Sherpa", "rinwanshe@yahoo.com"},
--- a/pidgin/gtkimhtml.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtkimhtml.c	Fri Nov 09 08:48:40 2007 +0000
@@ -204,8 +204,6 @@
 	html = g_strjoinv("\n", split);
 	g_strfreev(split);
 
-	html = g_strstrip(html);
-
 #if 0 /* Debugging for Windows clipboard */
 	purple_debug_info("imhtml clipboard", "HTML fragment: '%s'\n", html);
 #endif
--- a/pidgin/gtkimhtml.h	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtkimhtml.h	Fri Nov 09 08:48:40 2007 +0000
@@ -1,6 +1,7 @@
 /**
  * @file gtkimhtml.h GTK+ IM/HTML rendering component
  * @ingroup pidgin
+ * @see @ref gtkimhtml-signals
  */
 
 /* Pidgin is the legal property of its developers, whose names are too numerous
@@ -127,8 +128,15 @@
 		GtkTextTag *link;
 	} edit;
 
+#ifndef PIDGIN_DISABLE_DEPRECATED
+	/** @deprecated */
 	char *clipboard_text_string;
+	/** @deprecated */
 	char *clipboard_html_string;
+#else
+	char *depr1;
+	char *depr2;
+#endif
 
 	GSList *im_images;
 	GtkIMHtmlFuncs *funcs;
@@ -440,6 +448,8 @@
  * @param id       The id to associate with the image.
  *
  * @return A new IM/HTML Scalable object with an image.
+ *
+ * @since 2.1.0
  */
 /*
  * TODO: All this animation code could be combined much better with
@@ -836,6 +846,8 @@
  *
  * @param imhtml  The GTK+ IM/HTML.
  * @param flags   The connection flag which describes the allowed types of formatting.
+ *
+ * @since 2.1.0
  */
 void gtk_imhtml_setup_entry(GtkIMHtml *imhtml, PurpleConnectionFlags flags);
 
--- a/pidgin/gtkpluginpref.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtkpluginpref.c	Fri Nov 09 08:48:40 2007 +0000
@@ -255,5 +255,7 @@
 		}
 	}
 
+	g_object_unref(sg);
+
 	return ret;
 }
--- a/pidgin/gtkpounce.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtkpounce.c	Fri Nov 09 08:48:40 2007 +0000
@@ -685,6 +685,8 @@
 	gtk_widget_set_sensitive(dialog->play_sound_browse, FALSE);
 	gtk_widget_set_sensitive(dialog->play_sound_test,   FALSE);
 
+	g_object_unref(sg);
+
 	sg = gtk_size_group_new(GTK_SIZE_GROUP_VERTICAL);
 	gtk_size_group_add_widget(sg, dialog->open_win);
 	gtk_size_group_add_widget(sg, dialog->popup);
@@ -697,6 +699,9 @@
 	gtk_size_group_add_widget(sg, dialog->play_sound_browse);
 	gtk_size_group_add_widget(sg, dialog->play_sound_test);
 
+	g_object_unref(sg);
+	sg = NULL;
+
 	gtk_table_attach(GTK_TABLE(table), dialog->open_win,         0, 1, 0, 1,
 					 GTK_FILL, 0, 0, 0);
 	gtk_table_attach(GTK_TABLE(table), dialog->popup,            0, 1, 1, 2,
--- a/pidgin/gtkprefs.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtkprefs.c	Fri Nov 09 08:48:40 2007 +0000
@@ -956,6 +956,7 @@
 	g_list_free(names);
 
 	gtk_widget_show_all(ret);
+	g_object_unref(sg);
 	return ret;
 }
 
@@ -1111,12 +1112,38 @@
 		purple_prefs_set_string("/purple/proxy/password", gtk_entry_get_text(entry));
 }
 
+static void
+proxy_button_clicked_cb(GtkWidget *button, gpointer null)
+{
+	GError *err = NULL;
+
+	if (g_spawn_command_line_async ("gnome-network-preferences", &err))
+		return;
+
+	purple_notify_error(NULL, NULL, _("Cannot start proxy configuration program."), err->message);
+	g_error_free(err);
+}
+
+static void
+browser_button_clicked_cb(GtkWidget *button, gpointer null)
+{
+	GError *err = NULL;
+
+	if (g_spawn_command_line_async ("gnome-default-applications-properties", &err))
+		return;
+
+	purple_notify_error(NULL, NULL, _("Cannot start browser configuration program."), err->message);
+	g_error_free(err);
+}
+
 static GtkWidget *
 network_page()
 {
 	GtkWidget *ret;
 	GtkWidget *vbox, *hbox, *entry;
 	GtkWidget *table, *label, *auto_ip_checkbox, *ports_checkbox, *spin_button;
+	GtkWidget *proxy_warning = NULL, *browser_warning = NULL;
+	GtkWidget *proxy_button = NULL, *browser_button = NULL;
 	GtkSizeGroup *sg;
 	PurpleProxyInfo *proxy_info = NULL;
 
@@ -1179,6 +1206,8 @@
 	g_signal_connect(G_OBJECT(auto_ip_checkbox), "clicked",
 					 G_CALLBACK(pidgin_toggle_sensitive), table);
 
+	g_object_unref(sg);
+
 	vbox = pidgin_make_frame (ret, _("Ports"));
 	sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
 
@@ -1199,9 +1228,49 @@
 	g_signal_connect(G_OBJECT(ports_checkbox), "clicked",
 					 G_CALLBACK(pidgin_toggle_sensitive), spin_button);
 
-	if (!purple_running_gnome()) {
+	if (purple_running_gnome()) {
+		vbox = pidgin_make_frame(ret, _("Proxy Server &amp; Browser"));
+		prefs_proxy_frame = gtk_vbox_new(FALSE, 0);
+
+		proxy_warning = hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+		gtk_container_add(GTK_CONTAINER(vbox), hbox);
+
+		label = gtk_label_new(NULL);
+		gtk_label_set_markup(GTK_LABEL(label),
+		                     _("<b>Proxy configuration program was not found.</b>"));
+		gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+
+		browser_warning = hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+		gtk_container_add(GTK_CONTAINER(vbox), hbox);
+
+		label = gtk_label_new(NULL);
+		gtk_label_set_markup(GTK_LABEL(label),
+		                     _("<b>Browser configuration program was not found.</b>"));
+		gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+
+		hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+		gtk_container_add(GTK_CONTAINER(vbox), hbox);
+		label = gtk_label_new(_("Proxy & Browser preferences are configured\n"
+		                        "in GNOME Preferences"));
+		gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+		gtk_widget_show(label);
+
+		hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+		gtk_container_add(GTK_CONTAINER(vbox), hbox);
+		proxy_button = gtk_button_new_with_mnemonic(_("Configure _Proxy"));
+		g_signal_connect(G_OBJECT(proxy_button), "clicked",
+		                 G_CALLBACK(proxy_button_clicked_cb), NULL);
+		gtk_box_pack_start(GTK_BOX(hbox), proxy_button, FALSE, FALSE, 0);
+		gtk_widget_show(proxy_button);
+		browser_button = gtk_button_new_with_mnemonic(_("Configure _Browser"));
+		g_signal_connect(G_OBJECT(browser_button), "clicked",
+		                 G_CALLBACK(browser_button_clicked_cb), NULL);
+		gtk_box_pack_start(GTK_BOX(hbox), browser_button, FALSE, FALSE, 0);
+		gtk_widget_show(browser_button);
+	} else {
 		vbox = pidgin_make_frame(ret, _("Proxy Server"));
 		prefs_proxy_frame = gtk_vbox_new(FALSE, 0);
+
 		pidgin_prefs_dropdown(vbox, _("Proxy _type:"), PURPLE_PREF_STRING,
 					"/purple/proxy/type",
 					_("No proxy"), "none",
@@ -1298,11 +1367,34 @@
 	}
 
 	gtk_widget_show_all(ret);
+	g_object_unref(sg);
 	/* Only hide table if not running gnome otherwise we hide the IP address table! */
 	if (!purple_running_gnome() && (proxy_info == NULL ||
 	    purple_proxy_info_get_type(proxy_info) == PURPLE_PROXY_NONE ||
-	    purple_proxy_info_get_type(proxy_info) == PURPLE_PROXY_USE_ENVVAR))
+	    purple_proxy_info_get_type(proxy_info) == PURPLE_PROXY_USE_ENVVAR)) {
 		gtk_widget_hide(table);
+	} else if (purple_running_gnome()) {
+		gchar *path;
+		path = g_find_program_in_path("gnome-network-preferences");
+		if (path != NULL) {
+			gtk_widget_set_sensitive(proxy_button, TRUE);
+			gtk_widget_hide(proxy_warning);
+			g_free(path);
+		} else {
+			gtk_widget_set_sensitive(proxy_button, FALSE);
+			gtk_widget_show(proxy_warning);
+		}
+		path = g_find_program_in_path("gnome-default-applications-properties");
+		if (path != NULL) {
+			gtk_widget_set_sensitive(browser_button, TRUE);
+			gtk_widget_hide(browser_warning);
+			g_free(path);
+		} else {
+			gtk_widget_set_sensitive(browser_button, FALSE);
+			gtk_widget_show(browser_warning);
+		}
+	}
+
 	return ret;
 }
 
@@ -1449,6 +1541,7 @@
 	pidgin_set_accessible_label (entry, label);
 
 	gtk_widget_show_all(ret);
+	g_object_unref(sg);
 	return ret;
 }
 #endif /*_WIN32*/
@@ -1555,18 +1648,22 @@
 test_sound(GtkWidget *button, gpointer i_am_NULL)
 {
 	char *pref;
-	gboolean temp_value;
+	gboolean temp_enabled;
+	gboolean temp_mute;
 
 	pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/enabled/%s",
 			pidgin_sound_get_event_option(sound_row_sel));
 
-	temp_value = purple_prefs_get_bool(pref);
-
-	if (!temp_value) purple_prefs_set_bool(pref, TRUE);
+	temp_enabled = purple_prefs_get_bool(pref);
+	temp_mute = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/sound/mute");
+
+	if (!temp_enabled) purple_prefs_set_bool(pref, TRUE);
+	if (temp_mute) purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/sound/mute", FALSE);
 
 	purple_sound_play_event(sound_row_sel, NULL);
 
-	if (!temp_value) purple_prefs_set_bool(pref, FALSE);
+	if (!temp_enabled) purple_prefs_set_bool(pref, FALSE);
+	if (temp_mute) purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/sound/mute", TRUE);
 
 	g_free(pref);
 }
@@ -1886,6 +1983,7 @@
 	gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
 
 	gtk_widget_show_all(ret);
+	g_object_unref(sg);
 
 	return ret;
 }
@@ -2011,6 +2109,7 @@
 	}
 
 	gtk_widget_show_all(ret);
+	g_object_unref(sg);
 
 	return ret;
 }
--- a/pidgin/gtkrequest.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtkrequest.c	Fri Nov 09 08:48:40 2007 +0000
@@ -931,7 +931,7 @@
 			purple_request_field_image_get_scale_y(field) * gdk_pixbuf_get_height(buf),
 			GDK_INTERP_BILINEAR);
 	widget = gtk_image_new_from_pixbuf(scale);
-	g_object_unref(G_OBJECT(buf));
+	g_object_unref(G_OBJECT(loader));
 	g_object_unref(G_OBJECT(scale));
 
 	return widget;
--- a/pidgin/gtksavedstatuses.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtksavedstatuses.c	Fri Nov 09 08:48:40 2007 +0000
@@ -1292,6 +1292,7 @@
 					 G_CALLBACK(status_editor_ok_cb), dialog);
 
 	gtk_widget_show_all(win);
+	g_object_unref(sg);
 }
 
 
@@ -1621,6 +1622,7 @@
 	}
 
 	gtk_widget_show_all(win);
+	g_object_unref(sg);
 }
 
 
--- a/pidgin/gtksession.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtksession.c	Fri Nov 09 08:48:40 2007 +0000
@@ -81,7 +81,7 @@
 
 	if (opening) {
 		purple_debug(PURPLE_DEBUG_INFO, "Session Management",
-				   "Handling new ICE connection... ");
+				   "Handling new ICE connection... \n");
 
 		/* ensure ICE connection is not passed to child processes */
 		fcntl(IceConnectionNumber(connection), F_SETFD, FD_CLOEXEC);
@@ -95,7 +95,7 @@
 		*watch_data = conninfo;
 	} else {
 		purple_debug(PURPLE_DEBUG_INFO, "Session Management",
-				   "Handling closed ICE connection... ");
+				   "Handling closed ICE connection... \n");
 
 		/* get the input ID back and stop watching it */
 		conninfo = (struct ice_connection_info*) *watch_data;
--- a/pidgin/gtksound.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtksound.c	Fri Nov 09 08:48:40 2007 +0000
@@ -51,8 +51,6 @@
 	char *def;
 };
 
-#define PLAY_SOUND_TIMEOUT 15000
-
 static guint mute_login_sounds_timeout = 0;
 static gboolean mute_login_sounds = FALSE;
 
@@ -482,11 +480,11 @@
 	}
 
 	play = gst_element_factory_make("playbin", "play");
-	
+
 	if (play == NULL) {
 		return;
 	}
-	
+
 	uri = g_strdup_printf("file://%s", filename);
 
 	g_object_set(G_OBJECT(play), "uri", uri,
--- a/pidgin/gtkstatusbox.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtkstatusbox.c	Fri Nov 09 08:48:40 2007 +0000
@@ -2162,6 +2162,9 @@
 		                        purple_imgstore_get_size(status_box->buddy_icon_img), NULL);
 		gdk_pixbuf_loader_close(loader, NULL);
 		status_box->buddy_icon = gdk_pixbuf_loader_get_pixbuf(loader);
+		if (status_box->buddy_icon)
+			g_object_ref(status_box->buddy_icon);
+		g_object_unref(loader);
 	}
 
 	if (status_box->buddy_icon == NULL)
--- a/pidgin/gtkutils.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/gtkutils.c	Fri Nov 09 08:48:40 2007 +0000
@@ -2992,6 +2992,8 @@
 	}
 	va_end(args);
 
+	g_object_unref(sg);
+
 	return vbox;
 }
 
--- a/pidgin/plugins/contact_priority.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/plugins/contact_priority.c	Fri Nov 09 08:48:40 2007 +0000
@@ -157,6 +157,7 @@
 	gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0);
 
 	gtk_widget_show_all(ret);
+	g_object_unref(sg);
 
 	return ret;
 }
--- a/pidgin/plugins/pidginrc.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/plugins/pidginrc.c	Fri Nov 09 08:48:40 2007 +0000
@@ -515,6 +515,11 @@
 	                 G_CALLBACK(purplerc_reread), NULL);
 
 	gtk_widget_show_all(ret);
+
+	g_object_unref(labelsg);
+	g_object_unref(widgetsg);
+	g_object_unref(buttonsg);
+
 	return ret;
 }
 
--- a/pidgin/plugins/spellchk.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/plugins/spellchk.c	Fri Nov 09 08:48:40 2007 +0000
@@ -2341,6 +2341,8 @@
 #endif
 
 	gtk_widget_show_all(ret);
+	g_object_unref(sg);
+	g_object_unref(sg2);
 	return ret;
 }
 
--- a/pidgin/plugins/xmppconsole.c	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/plugins/xmppconsole.c	Fri Nov 09 08:48:40 2007 +0000
@@ -325,8 +325,9 @@
 	gtk_text_buffer_get_iter_at_offset(buffer, &iter, strstr(stanza, "</iq>") - stanza);
 	gtk_text_buffer_place_cursor(buffer, &iter);
 	g_free(stanza);
-       
+
 	gtk_widget_destroy(dialog);
+	g_object_unref(sg);
 
 }
 
@@ -483,6 +484,7 @@
 	g_free(stanza);
 
 	gtk_widget_destroy(dialog);
+	g_object_unref(sg);
 }
 
 static void message_clicked_cb(GtkWidget *w, gpointer nul)
@@ -619,6 +621,7 @@
 	g_free(stanza);
 
 	gtk_widget_destroy(dialog);
+	g_object_unref(sg);
 }
 
 static void
--- a/pidgin/win32/nsis/pidgin-installer.nsi	Fri Nov 09 08:39:14 2007 +0000
+++ b/pidgin/win32/nsis/pidgin-installer.nsi	Fri Nov 09 08:48:40 2007 +0000
@@ -698,6 +698,7 @@
 
     Delete "$INSTDIR\ca-certs\Equifax_Secure_CA.pem"
     Delete "$INSTDIR\ca-certs\GTE_CyberTrust_Global_Root.pem"
+    Delete "$INSTDIR\ca-certs\Microsoft_Secure_Server_Authority.pem"
     Delete "$INSTDIR\ca-certs\Verisign_Class3_Extended_Validation_CA.pem"
     Delete "$INSTDIR\ca-certs\Verisign_Class3_Primary_CA.pem"
     Delete "$INSTDIR\ca-certs\Verisign_RSA_Secure_Server_CA.pem"
@@ -750,6 +751,7 @@
     Delete "$INSTDIR\plugins\win2ktrans.dll"
     Delete "$INSTDIR\plugins\winprefs.dll"
     RMDir "$INSTDIR\plugins"
+    RMDir /r "$INSTDIR\sasl2"
     Delete "$INSTDIR\sounds\purple\alert.wav"
     Delete "$INSTDIR\sounds\purple\login.wav"
     Delete "$INSTDIR\sounds\purple\logout.wav"
@@ -757,23 +759,28 @@
     Delete "$INSTDIR\sounds\purple\send.wav"
     RMDir "$INSTDIR\sounds\purple"
     RMDir "$INSTDIR\sounds"
+    Delete "$INSTDIR\comerr32.dll"
     Delete "$INSTDIR\freebl3.dll"
+    Delete "$INSTDIR\gssapi32.dll"
     Delete "$INSTDIR\idletrack.dll"
+    Delete "$INSTDIR\k5sprt32.dll"
+    Delete "$INSTDIR\krb5_32.dll"
     Delete "$INSTDIR\libgtkspell.dll"
     Delete "$INSTDIR\libjabber.dll"
+    Delete "$INSTDIR\libmeanwhile-1.dll"
     Delete "$INSTDIR\liboscar.dll"
     Delete "$INSTDIR\libpurple.dll"
-    Delete "$INSTDIR\libmeanwhile-1.dll"
+    Delete "$INSTDIR\libsasl.dll"
+    Delete "$INSTDIR\libsilc-1-1-2.dll"
+    Delete "$INSTDIR\libsilcclient-1-1-2.dll"
     Delete "$INSTDIR\libxml2.dll"
     Delete "$INSTDIR\nspr4.dll"
     Delete "$INSTDIR\nss3.dll"
     Delete "$INSTDIR\nssckbi.dll"
+    Delete "$INSTDIR\pidgin.dll"
     Delete "$INSTDIR\pidgin.exe"
-    Delete "$INSTDIR\pidgin.dll"
     Delete "$INSTDIR\plc4.dll"
     Delete "$INSTDIR\plds4.dll"
-    Delete "$INSTDIR\libsilc-1-1-2.dll"
-    Delete "$INSTDIR\libsilcclient-1-1-2.dll"
     Delete "$INSTDIR\smime3.dll"
     Delete "$INSTDIR\softokn3.dll"
     Delete "$INSTDIR\ssl3.dll"

mercurial