changeset 25800:8b7ae3775a0b

propagate from branch 'im.pidgin.pidgin' (head 7821a3549d7d99473e999dc067afc4218addcc1e) to branch 'im.pidgin.pidgin.next.minor' (head f5288ef412711861bacd78dba56c4963826d86ed)
author Richard Laager <rlaager@wiktel.com>
date Fri, 31 Oct 2008 17:46:39 +0000
parents 18711b62ec27 (diff) ede22bc33d56 (current diff)
children 178efff39041
files libpurple/blist.c libpurple/blist.h libpurple/connection.c libpurple/connection.h libpurple/protocols/gg/gg.c
diffstat 32 files changed, 141 insertions(+), 48 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Fri Oct 31 05:08:57 2008 +0000
+++ b/configure.ac	Fri Oct 31 17:46:39 2008 +0000
@@ -1143,6 +1143,7 @@
 
 AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes)
 
+DEBUG_CFLAGS="$DEBUG_CFLAGS -DPURPLE_DISABLE_DEPRECATED -DPIDGIN_DISABLE_DEPRECATED -DFINCH_DISABLE_DEPRECATED -DGNT_DISABLE_DEPRECATED"
 if test "x$GCC" = "xyes"; then
 	dnl We enable -Wall later.
 	dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
--- a/libpurple/account.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/account.c	Fri Oct 31 17:46:39 2008 +0000
@@ -1035,7 +1035,7 @@
 	purple_debug_info("account", "Registering account %s\n",
 					purple_account_get_username(account));
 
-	purple_connection_new(account, TRUE, purple_account_get_password(account));
+	_purple_connection_new(account, TRUE, purple_account_get_password(account));
 }
 
 void
@@ -1046,7 +1046,7 @@
 	purple_debug_info("account", "Unregistering account %s\n",
 					  purple_account_get_username(account));
 
-	purple_connection_new_unregister(account, purple_account_get_password(account), cb, user_data);
+	_purple_connection_new_unregister(account, purple_account_get_password(account), cb, user_data);
 }
 
 static void
@@ -1069,7 +1069,7 @@
 
 	purple_account_set_password(account, entry);
 
-	purple_connection_new(account, FALSE, entry);
+	_purple_connection_new(account, FALSE, entry);
 }
 
 static void
@@ -1155,7 +1155,7 @@
 		!(prpl_info->options & OPT_PROTO_PASSWORD_OPTIONAL))
 		purple_account_request_password(account, G_CALLBACK(request_password_ok_cb), G_CALLBACK(request_password_cancel_cb), account);
 	else
-		purple_connection_new(account, FALSE, password);
+		_purple_connection_new(account, FALSE, password);
 }
 
 void
@@ -1171,7 +1171,7 @@
 	account->disconnecting = TRUE;
 
 	gc = purple_account_get_connection(account);
-	purple_connection_destroy(gc);
+	_purple_connection_destroy(gc);
 	if (!purple_account_get_remember_password(account))
 		purple_account_set_password(account, NULL);
 	purple_account_set_connection(account, NULL);
--- a/libpurple/blist.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/blist.c	Fri Oct 31 17:46:39 2008 +0000
@@ -20,7 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  *
  */
-#define PURPLE_BLIST_STRUCTS
+#define _PURPLE_BLIST_C_
 
 #include "internal.h"
 #include "blist.h"
@@ -447,7 +447,7 @@
 			purple_blist_get_last_child((PurpleBlistNode*)group));
 
 	if ((alias = xmlnode_get_attrib(cnode, "alias"))) {
-		purple_contact_set_alias(contact, alias);
+		purple_blist_alias_contact(contact, alias);
 	}
 
 	for (x = cnode->child; x; x = x->next) {
@@ -836,13 +836,11 @@
 		ops->update(purplebuddylist, node);
 }
 
-#ifndef PURPLE_DISABLE_DEPRECATED
 void
 purple_blist_update_buddy_icon(PurpleBuddy *buddy)
 {
 	purple_blist_update_node_icon((PurpleBlistNode *)buddy);
 }
-#endif
 
 /*
  * TODO: Maybe remove the call to this from server.c and call it
--- a/libpurple/blist.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/blist.h	Fri Oct 31 17:46:39 2008 +0000
@@ -89,7 +89,7 @@
 /* Data Structures                                                        */
 /**************************************************************************/
 
-#if !(defined PURPLE_HIDE_STRUCTS) || (defined PURPLE_BLIST_STRUCTS)
+#if !(defined PURPLE_HIDE_STRUCTS) || (defined _PURPLE_BLIST_C_)
 
 /**
  * A Buddy list node.  This can represent a group, a buddy, or anything else.
@@ -335,7 +335,7 @@
  */
 void purple_blist_update_node_icon(PurpleBlistNode *node);
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BLIST_C_)
 /**
  * Updates a buddy's icon.
  *
@@ -587,7 +587,7 @@
  */
 PurpleBuddy *purple_contact_get_priority_buddy(PurpleContact *contact);
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BLIST_C_)
 /**
  * Sets the alias for a contact.
  *
--- a/libpurple/buddyicon.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/buddyicon.c	Fri Oct 31 17:46:39 2008 +0000
@@ -23,6 +23,8 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
+#define _PURPLE_BUDDYICON_C_
+
 #include "internal.h"
 #include "buddyicon.h"
 #include "conversation.h"
@@ -954,7 +956,6 @@
 	return purple_buddy_icons_node_set_custom_icon(node, data, len);
 }
 
-#ifndef PURPLE_DISABLE_DEPRECATED
 gboolean
 purple_buddy_icons_has_custom_icon(PurpleContact *contact)
 {
@@ -973,7 +974,6 @@
 {
 	return purple_buddy_icons_node_set_custom_icon((PurpleBlistNode*)contact, icon_data, icon_len);
 }
-#endif
 
 void
 _purple_buddy_icon_set_old_icons_dir(const char *dirname)
--- a/libpurple/buddyicon.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/buddyicon.h	Fri Oct 31 17:46:39 2008 +0000
@@ -337,7 +337,7 @@
 purple_buddy_icons_node_set_custom_icon_from_file(PurpleBlistNode *node,
                                                   const gchar *filename);
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BUDDYICON_C_)
 /**
  * PurpleContact version of purple_buddy_icons_node_has_custom_icon.
  *
--- a/libpurple/connection.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/connection.c	Fri Oct 31 17:46:39 2008 +0000
@@ -23,6 +23,8 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
+#define _PURPLE_CONNECTION_C_
+
 #include "internal.h"
 #include "account.h"
 #include "blist.h"
@@ -99,6 +101,12 @@
 void
 purple_connection_new(PurpleAccount *account, gboolean regist, const char *password)
 {
+	_purple_connection_new(account, regist, password);
+}
+
+void
+_purple_connection_new(PurpleAccount *account, gboolean regist, const char *password)
+{
 	PurpleConnection *gc;
 	PurplePlugin *prpl;
 	PurplePluginProtocolInfo *prpl_info;
@@ -170,9 +178,14 @@
 		prpl_info->login(account);
 	}
 }
+void
+purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data)
+{
+	_purple_connection_new_unregister(account, password, cb, user_data);
+}
 
 void
-purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data)
+_purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data)
 {
 	/* Lots of copy/pasted code to avoid API changes. You might want to integrate that into the previous function when posssible. */
 	PurpleConnection *gc;
@@ -230,6 +243,12 @@
 void
 purple_connection_destroy(PurpleConnection *gc)
 {
+	_purple_connection_destroy(gc);
+}
+
+void
+_purple_connection_destroy(PurpleConnection *gc)
+{
 	PurpleAccount *account;
 	GSList *buddies;
 	PurplePluginProtocolInfo *prpl_info = NULL;
--- a/libpurple/connection.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/connection.h	Fri Oct 31 17:46:39 2008 +0000
@@ -268,7 +268,7 @@
 /**************************************************************************/
 /*@{*/
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_)
 /**
  * This function should only be called by purple_account_connect()
  * in account.c.  If you're trying to sign on an account, use that
@@ -292,7 +292,7 @@
 									const char *password);
 #endif
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_)
 /**
  * This function should only be called by purple_account_unregister()
  * in account.c.
@@ -310,7 +310,7 @@
 void purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data);
 #endif
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_)
 /**
  * Disconnects and destroys a PurpleConnection.
  *
--- a/libpurple/dbus-server.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/dbus-server.c	Fri Oct 31 17:46:39 2008 +0000
@@ -29,6 +29,10 @@
 #include <stdlib.h>
 #include <string.h>
 
+/* Allow the code below to see deprecated functions, so we can continue to
+ * export them via DBus. */
+#undef PURPLE_DISABLE_DEPRECATED
+
 #include "account.h"
 #include "blist.h"
 #include "conversation.h"
--- a/libpurple/internal.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/internal.h	Fri Oct 31 17:46:39 2008 +0000
@@ -231,6 +231,12 @@
 #define PURPLE_WEBSITE "http://pidgin.im/"
 #define PURPLE_DEVEL_WEBSITE "http://developer.pidgin.im/"
 
+
+/* INTERNAL FUNCTIONS */
+
+#include "account.h"
+#include "connection.h"
+
 /* This is for the accounts code to notify the buddy icon code that
  * it's done loading.  We may want to replace this with a signal. */
 void
@@ -247,4 +253,48 @@
 void
 _purple_buddy_icon_set_old_icons_dir(const char *dirname);
 
+/**
+ * Creates a connection to the specified account and either connects
+ * or attempts to register a new account.  If you are logging in,
+ * the connection uses the current active status for this account.
+ * So if you want to sign on as "away," for example, you need to
+ * have called purple_account_set_status(account, "away").
+ * (And this will call purple_account_connect() automatically).
+ *
+ * @note This function should only be called by purple_account_connect()
+ *       in account.c.  If you're trying to sign on an account, use that
+ *       function instead.
+ *
+ * @param account  The account the connection should be connecting to.
+ * @param regist   Whether we are registering a new account or just
+ *                 trying to do a normal signon.
+ * @param password The password to use.
+ */
+void _purple_connection_new(PurpleAccount *account, gboolean regist,
+                            const char *password);
+/**
+ * Tries to unregister the account on the server. If the account is not
+ * connected, also creates a new connection.
+ *
+ * @note This function should only be called by purple_account_unregister()
+ *       in account.c.
+ *
+ * @param account  The account to unregister
+ * @param password The password to use.
+ * @param cb Optional callback to be called when unregistration is complete
+ * @param user_data user data to pass to the callback
+ */
+void _purple_connection_new_unregister(PurpleAccount *account, const char *password,
+                                       PurpleAccountUnregistrationCb cb, void *user_data);
+/**
+ * Disconnects and destroys a PurpleConnection.
+ *
+ * @note This function should only be called by purple_account_disconnect()
+ *        in account.c.  If you're trying to sign off an account, use that
+ *        function instead.
+ *
+ * @param gc The purple connection to destroy.
+ */
+void _purple_connection_destroy(PurpleConnection *gc);
+
 #endif /* _PURPLE_INTERNAL_H_ */
--- a/libpurple/network.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/network.h	Fri Oct 31 17:46:39 2008 +0000
@@ -106,7 +106,6 @@
  */
 const char *purple_network_get_my_ip(int fd);
 
-#ifndef PURPLE_DISABLE_DEPRECATED
 /**
  * Should calls to purple_network_listen() and purple_network_listen_range()
  * map the port externally using NAT-PMP or UPnP?
@@ -118,7 +117,6 @@
  * @since 2.3.0
  */
 void purple_network_listen_map_external(gboolean map_external);
-#endif
 
 /**
  * Attempts to open a listening port ONLY on the specified port number.
@@ -203,11 +201,9 @@
 unsigned short purple_network_get_port_from_fd(int fd);
 
 /**
- * Detects if there is an available Internet connection. Note that this call
- * could block for the amount of time specified in inet_detect_timeout, so
- * using it in a UI thread may cause uncomfortableness
+ * Detects if there is an available network connection.
  *
- * @return TRUE if the Internet is available
+ * @return TRUE if the network is available
  */
 gboolean purple_network_is_available(void);
 
--- a/libpurple/notify.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/notify.c	Fri Oct 31 17:46:39 2008 +0000
@@ -23,6 +23,8 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
+#define _PURPLE_NOTIFY_C_
+
 #include "internal.h"
 #include "dbus-maybe.h"
 #include "notify.h"
--- a/libpurple/notify.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/notify.h	Fri Oct 31 17:46:39 2008 +0000
@@ -289,7 +289,7 @@
  */
 void purple_notify_searchresults_row_add(PurpleNotifySearchResults *results,
 									   GList *row);
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
 /**
  * Returns a number of the rows in the search results object.
  *
@@ -310,7 +310,7 @@
 guint purple_notify_searchresults_get_rows_count(PurpleNotifySearchResults *results);
 #endif
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
 /**
  * Returns a number of the columns in the search results object.
  *
@@ -331,7 +331,7 @@
 guint purple_notify_searchresults_get_columns_count(PurpleNotifySearchResults *results);
 #endif
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
 /**
  * Returns a row of the results from the search results object.
  *
@@ -354,7 +354,7 @@
 										 unsigned int row_id);
 #endif
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
 /**
  * Returns a title of the search results object's column.
  *
--- a/libpurple/plugin.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/plugin.c	Fri Oct 31 17:46:39 2008 +0000
@@ -19,6 +19,8 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
+#define _PURPLE_PLUGIN_C_
+
 #include "internal.h"
 
 #include "accountopt.h"
--- a/libpurple/plugin.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/plugin.h	Fri Oct 31 17:46:39 2008 +0000
@@ -533,7 +533,7 @@
  */
 gboolean purple_plugins_enabled(void);
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
 /**
  * Registers a function that will be called when probing is finished.
  *
@@ -544,7 +544,7 @@
 void purple_plugins_register_probe_notify_cb(void (*func)(void *), void *data);
 #endif
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
 /**
  * Unregisters a function that would be called when probing is finished.
  *
@@ -554,7 +554,7 @@
 void purple_plugins_unregister_probe_notify_cb(void (*func)(void *));
 #endif
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
 /**
  * Registers a function that will be called when a plugin is loaded.
  *
@@ -566,7 +566,7 @@
 										  void *data);
 #endif
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
 /**
  * Unregisters a function that would be called when a plugin is loaded.
  *
@@ -576,7 +576,7 @@
 void purple_plugins_unregister_load_notify_cb(void (*func)(PurplePlugin *, void *));
 #endif
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
 /**
  * Registers a function that will be called when a plugin is unloaded.
  *
@@ -588,7 +588,7 @@
 											void *data);
 #endif
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
 /**
  * Unregisters a function that would be called when a plugin is unloaded.
  *
--- a/libpurple/plugins/perl/common/BuddyList.xs	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/plugins/perl/common/BuddyList.xs	Fri Oct 31 17:46:39 2008 +0000
@@ -1,3 +1,4 @@
+#undef PURPLE_DISABLE_DEPRECATED
 #include "module.h"
 #include "../perl-handlers.h"
 
--- a/libpurple/plugins/perl/common/module.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/plugins/perl/common/module.h	Fri Oct 31 17:46:39 2008 +0000
@@ -1,4 +1,6 @@
-
+/* Allow the Perl code to see deprecated functions, so we can continue to
+ * export them to Perl plugins. */
+#undef PURPLE_DISABLE_DEPRECATED
 
 typedef struct group *Purple__Group;
 
--- a/libpurple/protocols/gg/gg.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/protocols/gg/gg.c	Fri Oct 31 17:46:39 2008 +0000
@@ -421,7 +421,7 @@
 	 */
 
 	/* Need to disconnect or actually log in. For now, we disconnect. */
-	purple_connection_destroy(gc);
+	purple_account_disconnect(account);
 
 exit_err:
 	if(account->registration_cb)
@@ -446,7 +446,7 @@
 	GGPInfo *info = gc->proto_data;
 	GGPToken *token = info->token;
 
-	purple_connection_destroy(gc);
+	purple_account_disconnect(gc->account);
 
 	g_free(token->id);
 	g_free(token->data);
--- a/libpurple/protocols/msn/notification.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/protocols/msn/notification.c	Fri Oct 31 17:46:39 2008 +0000
@@ -578,7 +578,7 @@
 		g_snprintf(fmt_str, sizeof(fmt_str), "%d", MSN_NETWORK_PASSPORT);
 
 	/*mobile*/
-	//type_str = g_strdup_printf("4");
+	/*type_str = g_strdup_printf("4");*/
 	xmlnode_set_attrib(c_node, "t", fmt_str);
 
 	xmlnode_insert_child(d_node, c_node);
--- a/libpurple/protocols/qq/im.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/protocols/qq/im.c	Fri Oct 31 17:46:39 2008 +0000
@@ -341,7 +341,7 @@
 	if(im_text.fragmentCount == 0)
 		im_text.fragmentCount = 1;
 
-	// Filter tail space
+	/* Filter tail space */
 	if(im_text.fragmentIndex == im_text.fragmentCount -1)
 	{
 		gint real_len = text_len;
@@ -349,7 +349,7 @@
 			real_len --;
 
 		text_len = real_len;
-		// Null string instaed of space
+		/* Null string instead of space */
 		im_text.msg[text_len] = 0;
 	}
 
--- a/libpurple/sslconn.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/sslconn.c	Fri Oct 31 17:46:39 2008 +0000
@@ -23,6 +23,8 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
+#define _PURPLE_SSLCONN_C_
+
 #include "internal.h"
 
 #include "certificate.h"
--- a/libpurple/sslconn.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/libpurple/sslconn.h	Fri Oct 31 17:46:39 2008 +0000
@@ -185,7 +185,7 @@
 									PurpleSslErrorFunction error_func,
 									void *data);
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_SSLCONN_C_)
 /**
  * Makes a SSL connection using an already open file descriptor.
  *
--- a/pidgin/gtkconv.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/pidgin/gtkconv.c	Fri Oct 31 17:46:39 2008 +0000
@@ -24,6 +24,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  *
  */
+#define _PIDGIN_GTKCONV_C_
+
 #include "internal.h"
 #include "pidgin.h"
 
--- a/pidgin/gtkconv.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/pidgin/gtkconv.h	Fri Oct 31 17:46:39 2008 +0000
@@ -143,7 +143,7 @@
 	GtkWidget *tab_label;
 	GtkWidget *menu_icon;
 	GtkWidget *menu_label;
-#ifndef PIDGIN_DISABLE_DEPRECATED
+#if !(defined PIDGIN_DISABLE_DEPRECATED) || (defined _PIDGIN_GTKCONV_C_)
 	/** @deprecated */
 	GtkSizeGroup *sg;
 #else
--- a/pidgin/gtkdialogs.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/pidgin/gtkdialogs.c	Fri Oct 31 17:46:39 2008 +0000
@@ -23,6 +23,8 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
+#define _PIDGIN_GTKDIALOGS_C_
+
 #include "internal.h"
 #include "pidgin.h"
 
@@ -967,7 +969,7 @@
 static void
 pidgin_dialogs_alias_contact_cb(PurpleContact *contact, const char *new_alias)
 {
-	purple_contact_set_alias(contact, new_alias);
+	purple_blist_alias_contact(contact, new_alias);
 }
 
 void
--- a/pidgin/gtkdialogs.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/pidgin/gtkdialogs.h	Fri Oct 31 17:46:39 2008 +0000
@@ -38,11 +38,13 @@
 void pidgin_dialogs_info(void);
 void pidgin_dialogs_log(void);
 
+#if !(defined PIDGIN_DISABLE_DEPRECATED) || (defined _PIDGIN_GTKDIALOGS_C_)
 /**
  * @deprecated This function is no longer used and will be removed in
  *             Pidgin 3.0.0 unless there is sufficient demand to keep it.
  */
 void pidgin_dialogs_alias_contact(PurpleContact *);
+#endif
 
 void pidgin_dialogs_alias_buddy(PurpleBuddy *);
 void pidgin_dialogs_alias_chat(PurpleChat *);
@@ -55,9 +57,12 @@
 /* Everything after this should probably be moved elsewhere */
 
 #ifndef PIDGIN_DISABLE_DEPRECATED
+/* This PIDGIN_DISABLE_DEPRECATED doesn't need to be deactivated by
+ * _PIDGIN_GTKDIALOGS_C_, because it shouldn't be using this macro. */
 #define PIDGIN_DIALOG(x)	x = gtk_window_new(GTK_WINDOW_TOPLEVEL); \
 			gtk_window_set_type_hint(GTK_WINDOW(x), GDK_WINDOW_TYPE_HINT_DIALOG)
 #endif
+
 #define PIDGIN_WINDOW_ICONIFIED(x) (gdk_window_get_state(GTK_WIDGET(x)->window) & GDK_WINDOW_STATE_ICONIFIED)
 
 #endif /* _PIDGINDIALOGS_H_ */
--- a/pidgin/gtkimhtml.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/pidgin/gtkimhtml.c	Fri Oct 31 17:46:39 2008 +0000
@@ -24,6 +24,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  *
  */
+#define _PIDGIN_GTKIMHTML_C_
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
--- a/pidgin/gtkimhtml.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/pidgin/gtkimhtml.h	Fri Oct 31 17:46:39 2008 +0000
@@ -130,7 +130,7 @@
 		GtkTextTag *link;
 	} edit;
 
-#ifndef PIDGIN_DISABLE_DEPRECATED
+#if !(defined PIDGIN_DISABLE_DEPRECATED) || (defined _PIDGIN_GTKIMHTML_C_)
 	/** @deprecated */
 	char *clipboard_text_string;
 	/** @deprecated */
--- a/pidgin/gtkutils.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/pidgin/gtkutils.c	Fri Oct 31 17:46:39 2008 +0000
@@ -23,6 +23,8 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
+#define _PIDGIN_GTKUTILS_C_
+
 #include "internal.h"
 #include "pidgin.h"
 
@@ -2878,7 +2880,6 @@
 }
 #endif /* ! Gtk 2.6.0 */
 
-#ifndef PURPLE_DISABLE_DEPRECATED
 void pidgin_set_custom_buddy_icon(PurpleAccount *account, const char *who, const char *filename)
 {
 	PurpleBuddy *buddy;
@@ -2893,7 +2894,6 @@
 	contact = purple_buddy_get_contact(buddy);
 	purple_buddy_icons_node_set_custom_icon_from_file((PurpleBlistNode*)contact, filename);
 }
-#endif
 
 char *pidgin_make_pretty_arrows(const char *str)
 {
--- a/pidgin/gtkutils.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/pidgin/gtkutils.h	Fri Oct 31 17:46:39 2008 +0000
@@ -638,7 +638,7 @@
 											 GError **error);
 #endif
 
-#ifndef PURPLE_DISABLE_DEPRECATED
+#if !(defined PIDGIN_DISABLE_DEPRECATED) || (defined _PIDGIN_GTKUTILS_C_)
 /**
  * Set or unset a custom buddyicon for a user.
  *
--- a/pidgin/pidgintooltip.c	Fri Oct 31 05:08:57 2008 +0000
+++ b/pidgin/pidgintooltip.c	Fri Oct 31 17:46:39 2008 +0000
@@ -61,7 +61,9 @@
 static void
 initialize_tooltip_delay()
 {
+#if GTK_CHECK_VERSION(2,14,0)
 	GtkSettings *settings;
+#endif
 
 	if (tooltip_delay != -1)
 		return;
--- a/pidgin/plugins/perl/common/gtkmodule.h	Fri Oct 31 05:08:57 2008 +0000
+++ b/pidgin/plugins/perl/common/gtkmodule.h	Fri Oct 31 17:46:39 2008 +0000
@@ -1,3 +1,7 @@
+/* Allow the Perl code to see deprecated functions, so we can continue to
+ * export them to Perl plugins. */
+#undef PIDGIN_DISABLE_DEPRECATED
+
 typedef struct group *Pidgin__Group;
 
 #define group perl_group