changeset 31142:c180ff59632d

propagate from branch 'im.pidgin.pidgin' (head 302c560990dbae6b00f9ca0ef36b3c160b190bdb) to branch 'im.pidgin.cpw.qulogic.msnp16' (head 4c936b26a062645f781814962f80d6ddd0939675)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 19 Feb 2010 07:07:53 +0000
parents fa8a25b46252 (diff) c5a7516418c7 (current diff)
children 1c16aa0a59f8
files
diffstat 14 files changed, 57 insertions(+), 53 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/Makefile.mingw	Thu Feb 18 16:59:04 2010 +0000
+++ b/libpurple/Makefile.mingw	Fri Feb 19 07:07:53 2010 +0000
@@ -8,7 +8,7 @@
 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
 
 TARGET = libpurple
-NEEDED_DLLS = $(LIBXML2_TOP)/bin/libxml2.dll
+NEEDED_DLLS = $(LIBXML2_TOP)/bin/libxml2-2.dll
 
 ##
 ## INCLUDE PATHS
@@ -20,7 +20,7 @@
 			-I$(GTK_TOP)/include \
 			-I$(GTK_TOP)/include/glib-2.0 \
 			-I$(GTK_TOP)/lib/glib-2.0/include \
-			-I$(LIBXML2_TOP)/include
+			-I$(LIBXML2_TOP)/include/libxml2
 
 LIB_PATHS +=		-L$(GTK_TOP)/lib \
 			-L$(LIBXML2_TOP)/lib
@@ -48,13 +48,8 @@
 			idle.c \
 			imgstore.c \
 			log.c \
-			media/backend-fs2.c \
-			media/backend-iface.c \
-			media/candidate.c \
-			media/codec.c \
-			media/enum-types.c \
-			media/media.c \
 			mediamanager.c \
+			media.c \
 			mime.c \
 			nat-pmp.c \
 			network.c \
--- a/libpurple/account.c	Thu Feb 18 16:59:04 2010 +0000
+++ b/libpurple/account.c	Fri Feb 19 07:07:53 2010 +0000
@@ -2744,11 +2744,12 @@
 	char *who;
 
 	g_return_val_if_fail(name != NULL, NULL);
+	g_return_val_if_fail(protocol_id != NULL, NULL);
 
 	for (l = purple_accounts_get_all(); l != NULL; l = l->next) {
 		account = (PurpleAccount *)l->data;
-		if (protocol_id && !purple_strequal(account->protocol_id, protocol_id))
-		  continue;
+		if (!purple_strequal(account->protocol_id, protocol_id))
+			continue;
 
 		who = g_strdup(purple_normalize(account, name));
 		if (purple_strequal(purple_normalize(account, purple_account_get_username(account)), who)) {
--- a/libpurple/plugins/perl/scripts/signals-test.pl	Thu Feb 18 16:59:04 2010 +0000
+++ b/libpurple/plugins/perl/scripts/signals-test.pl	Fri Feb 19 07:07:53 2010 +0000
@@ -44,6 +44,11 @@
 	Purple::Debug::misc("signals test in perl", "$data (" . $account->get_username() . ", $sender, $message, $flags)\n");
 }
 
+sub timeout_cb
+{
+	Purple::Debug::misc("signals test in perl", "timeout elapsed\n");
+}
+
 sub plugin_load
 {
 	my $plugin = shift;
@@ -71,6 +76,9 @@
 					\&conv_received_msg, "received im message");
 	Purple::Signal::connect($conv, "received-chat-msg", $plugin,
 					\&conv_received_msg, "received chat message");
+
+
+	Purple::timeout_add($plugin, 10, \&timeout_cb);
 }
 
 sub plugin_unload
--- a/libpurple/protocols/bonjour/Makefile.mingw	Thu Feb 18 16:59:04 2010 +0000
+++ b/libpurple/protocols/bonjour/Makefile.mingw	Fri Feb 19 07:07:53 2010 +0000
@@ -30,7 +30,7 @@
 			-I$(GTK_TOP)/include/glib-2.0 \
 			-I$(GTK_TOP)/lib/glib-2.0/include \
 			-I$(BONJOUR_TOP)/Include \
-			-I$(LIBXML2_TOP)/include \
+			-I$(LIBXML2_TOP)/include/libxml2 \
 			-I$(PURPLE_TOP) \
 			-I$(PURPLE_TOP)/win32 \
 			-I$(PIDGIN_TREE_TOP)
--- a/libpurple/protocols/jabber/Makefile.mingw	Thu Feb 18 16:59:04 2010 +0000
+++ b/libpurple/protocols/jabber/Makefile.mingw	Fri Feb 19 07:07:53 2010 +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$(LIBXML2_TOP)/include \
+			-I$(LIBXML2_TOP)/include/libxml2 \
 			-I$(PURPLE_TOP) \
 			-I$(PURPLE_TOP)/win32 \
 			-I$(PIDGIN_TREE_TOP)
--- a/libpurple/protocols/oscar/clientlogin.c	Thu Feb 18 16:59:04 2010 +0000
+++ b/libpurple/protocols/oscar/clientlogin.c	Fri Feb 19 07:07:53 2010 +0000
@@ -43,7 +43,7 @@
 #include "core.h"
 
 #define URL_CLIENT_LOGIN "https://api.screenname.aol.com/auth/clientLogin"
-#define URL_START_OSCAR_SESSION "http://api.oscar.aol.com/aim/startOSCARSession"
+#define URL_START_OSCAR_SESSION "https://api.oscar.aol.com/aim/startOSCARSession"
 
 /*
  * Using clientLogin requires a developer ID.  This key is for libpurple.
@@ -177,10 +177,23 @@
 	code = atoi(tmp);
 	if (code != 200)
 	{
+		xmlnode *status_detail_node;
+		guint status_detail = 0;
+
+		status_detail_node = xmlnode_get_child(response_node,
+		                                       "statusDetailCode");
+		if (status_detail_node) {
+			gchar *data = xmlnode_get_data(status_detail_node);
+			if (data) {
+				status_detail = atoi(data);
+				g_free(data);
+			}
+		}
+
 		purple_debug_error("oscar", "startOSCARSession response statusCode "
 				"was %s: %s\n", tmp, response);
 
-		if (code == 401 || code == 607)
+		if ((code == 401 && status_detail != 1014) || code == 607)
 			purple_connection_error_reason(gc,
 					PURPLE_CONNECTION_ERROR_OTHER_ERROR,
 					_("You have been connecting and disconnecting too "
@@ -293,7 +306,11 @@
 static void send_start_oscar_session(OscarData *od, const char *token, const char *session_key, time_t hosttime)
 {
 	char *query_string, *signature, *url;
-	gboolean use_tls = purple_account_get_bool(purple_connection_get_account(od->gc), "use_ssl", OSCAR_DEFAULT_USE_SSL);
+	PurpleAccount *account;
+	gboolean use_tls;
+
+	account = purple_connection_get_account(od->gc);
+	use_tls = purple_account_get_bool(account, "use_ssl", OSCAR_DEFAULT_USE_SSL);
 
 	/*
 	 * Construct the GET parameters.  0x00000611 is the distid given to
@@ -317,7 +334,8 @@
 	g_free(signature);
 
 	/* Make the request */
-	od->url_data = purple_util_fetch_url(url, TRUE, NULL, FALSE,
+	od->url_data = purple_util_fetch_url_request_len_with_account(account,
+			url, TRUE, NULL, FALSE, NULL, FALSE, -1,
 			start_oscar_session_cb, od);
 	g_free(url);
 }
@@ -573,8 +591,9 @@
 	g_string_free(body, TRUE);
 
 	/* Send the POST request  */
-	od->url_data = purple_util_fetch_url_request(URL_CLIENT_LOGIN,
-			TRUE, NULL, FALSE, request->str, FALSE,
+	od->url_data = purple_util_fetch_url_request_len_with_account(
+			purple_connection_get_account(gc), URL_CLIENT_LOGIN,
+			TRUE, NULL, FALSE, request->str, FALSE, -1,
 			client_login_cb, od);
 	g_string_free(request, TRUE);
 }
--- a/libpurple/win32/global.mak	Thu Feb 18 16:59:04 2010 +0000
+++ b/libpurple/win32/global.mak	Fri Feb 19 07:07:53 2010 +0000
@@ -12,10 +12,10 @@
 WIN32_DEV_TOP ?= $(PIDGIN_TREE_TOP)/../win32-dev
 ASPELL_TOP ?= $(WIN32_DEV_TOP)/aspell-dev-0-50-3-3
 GTKSPELL_TOP ?= $(WIN32_DEV_TOP)/gtkspell-2.0.11-daa1
-GTK_TOP ?= $(WIN32_DEV_TOP)/gtk_2_0
+GTK_TOP ?= $(WIN32_DEV_TOP)/gtk_2_0-2.14
 GTK_BIN ?= $(GTK_TOP)/bin
 BONJOUR_TOP ?= $(WIN32_DEV_TOP)/Bonjour_SDK
-LIBXML2_TOP ?= $(WIN32_DEV_TOP)/libxml2-2.6.30
+LIBXML2_TOP ?= $(WIN32_DEV_TOP)/libxml2-2.7.3
 MEANWHILE_TOP ?= $(WIN32_DEV_TOP)/meanwhile-1.0.2_daa2
 NSPR_TOP ?= $(WIN32_DEV_TOP)/nspr-4.6.4
 NSS_TOP ?= $(WIN32_DEV_TOP)/nss-3.11.4
--- a/libpurple/win32/libc_interface.c	Thu Feb 18 16:59:04 2010 +0000
+++ b/libpurple/win32/libc_interface.c	Fri Feb 19 07:07:53 2010 +0000
@@ -33,6 +33,7 @@
 #include "libc_internal.h"
 #include <glib/gstdio.h>
 
+/** This is redefined here because we can't include internal.h */
 #ifdef ENABLE_NLS
 #  include <locale.h>
 #  include <libintl.h>
@@ -1047,29 +1048,12 @@
 	return "";
 }
 
+int wpurple_g_access (const gchar *filename, int mode);
 /**
- * g_access:
- * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
- * @mode: as in access()
- *
- * A wrapper for the POSIX access() function. This function is used to
- * test a pathname for one or several of read, write or execute
- * permissions, or just existence. On Windows, the underlying access()
- * function in the C library only checks the READONLY attribute, and
- * does not look at the ACL at all. Software that needs to handle file
- * permissions on Windows more exactly should use the Win32 API.
- *
- * See the C library manual for more details about access().
- *
- * Returns: zero if the pathname refers to an existing file system
- * object that has all the tested permissions, or -1 otherwise or on
- * error.
- *
- * Since: 2.8
+ * @deprecated - remove for 3.0.0
  */
 int
-wpurple_g_access (const gchar *filename,
-	  int          mode)
+wpurple_g_access (const gchar *filename, int mode)
 {
 	return g_access(filename, mode);
 }
--- a/libpurple/win32/libc_interface.h	Thu Feb 18 16:59:04 2010 +0000
+++ b/libpurple/win32/libc_interface.h	Fri Feb 19 07:07:53 2010 +0000
@@ -129,19 +129,14 @@
 wpurple_gettimeofday( timeval, timezone )
 
 /* stdio.h */
+#undef snprintf
 #define snprintf _snprintf
+#undef vsnprintf
 #define vsnprintf _vsnprintf
 
 #define rename( oldname, newname ) \
 wpurple_rename( oldname, newname )
 
-#ifdef g_rename
-# undef g_rename
-#endif
-/* This is necessary because we want rename on win32 to be able to overwrite an existing file, it is done in internal.h if GLib < 2.6*/
-#define g_rename(oldname, newname) \
-wpurple_rename(oldname, newname)
-
 /* sys/stat.h */
 #define fchmod(a,b)
 
--- a/libpurple/win32/libpurplerc.rc.in	Thu Feb 18 16:59:04 2010 +0000
+++ b/libpurple/win32/libpurplerc.rc.in	Fri Feb 19 07:07:53 2010 +0000
@@ -18,7 +18,7 @@
         VALUE "FileDescription", "LibPurple Library"
         VALUE "FileVersion", "@PURPLE_VERSION@"
         VALUE "InternalName", "libpurple"
-        VALUE "LegalCopyright", "Copyright (C) 1998-2007 The Pidgin developer community (See the COPYRIGHT file in the source distribution)."
+        VALUE "LegalCopyright", "Copyright (C) 1998-2010 The Pidgin developer community (See the COPYRIGHT file in the source distribution)."
         VALUE "OriginalFilename", "libpurple.dll"
         VALUE "ProductName", "LibPurple"
         VALUE "ProductVersion", "@PURPLE_VERSION@"
--- a/pidgin/gtkblist.h	Thu Feb 18 16:59:04 2010 +0000
+++ b/pidgin/gtkblist.h	Fri Feb 19 07:07:53 2010 +0000
@@ -196,11 +196,14 @@
 void pidgin_blist_update_refresh_timeout(void);
 
 /**
- * Returns the blist emblem
+ * Returns the blist emblem.
+ *
+ * This may be an existing pixbuf that has been given an additional ref,
+ * so it shouldn't be modified.
  *
  * @param node   The node to return an emblem for
  *
- * @return  A newly created GdkPixbuf, or NULL
+ * @return  A GdkPixbuf for the emblem to show, or NULL
  */
 GdkPixbuf *
 pidgin_blist_get_emblem(PurpleBlistNode *node);
--- a/pidgin/plugins/gevolution/assoc-buddy.c	Thu Feb 18 16:59:04 2010 +0000
+++ b/pidgin/plugins/gevolution/assoc-buddy.c	Fri Feb 19 07:07:53 2010 +0000
@@ -20,7 +20,6 @@
  */
 #include "internal.h"
 #include "gtkblist.h"
-#include "gtkexpander.h"
 #include "pidgin.h"
 #include "gtkutils.h"
 #include "gtkimhtml.h"
--- a/pidgin/win32/pidgin_dll_rc.rc.in	Thu Feb 18 16:59:04 2010 +0000
+++ b/pidgin/win32/pidgin_dll_rc.rc.in	Fri Feb 19 07:07:53 2010 +0000
@@ -19,7 +19,7 @@
         VALUE "FileDescription", "GTK+ Pidgin Library"
         VALUE "FileVersion", "@PIDGIN_VERSION@"
         VALUE "InternalName", "libpidgin"
-        VALUE "LegalCopyright", "Copyright (C) 1998-2007 The Pidgin developer community (See the COPYRIGHT file in the source distribution)."
+        VALUE "LegalCopyright", "Copyright (C) 1998-2010 The Pidgin developer community (See the COPYRIGHT file in the source distribution)."
         VALUE "OriginalFilename", "pidgin.dll"
         VALUE "ProductName", "Pidgin"
         VALUE "ProductVersion", "@PIDGIN_VERSION@"
--- a/pidgin/win32/pidgin_exe_rc.rc.in	Thu Feb 18 16:59:04 2010 +0000
+++ b/pidgin/win32/pidgin_exe_rc.rc.in	Fri Feb 19 07:07:53 2010 +0000
@@ -19,7 +19,7 @@
         VALUE "FileDescription", "Pidgin"
         VALUE "FileVersion", "@PIDGIN_VERSION@"
         VALUE "InternalName", "pidgin"
-        VALUE "LegalCopyright", "Copyright (C) 1998-2007 The Pidgin developer community (See the COPYRIGHT file in the source distribution)."
+        VALUE "LegalCopyright", "Copyright (C) 1998-2010 The Pidgin developer community (See the COPYRIGHT file in the source distribution)."
         VALUE "OriginalFilename", "@ORIGINAL_FILENAME@"
         VALUE "ProductName", "Pidgin"
         VALUE "ProductVersion", "@PIDGIN_VERSION@"