pidgin: ab9b84a4: Build everything with the *_DISABLE_DEPR...

rlaager at pidgin.im rlaager at pidgin.im
Thu Oct 30 18:56:00 EDT 2008


-----------------------------------------------------------------
Revision: ab9b84a471052769ba856a2bc4ec0d298a97b676
Ancestor: 51ba664ce9b488a4479e94f4f783a8b3bb6287ce
Author: rlaager at pidgin.im
Date: 2008-10-30T22:40:49
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ab9b84a471052769ba856a2bc4ec0d298a97b676

Modified files:
        configure.ac libpurple/account.c libpurple/blist.c
        libpurple/blist.h libpurple/buddyicon.c
        libpurple/buddyicon.h libpurple/connection.c
        libpurple/connection.h libpurple/dbus-server.c
        libpurple/internal.h libpurple/notify.c libpurple/notify.h
        libpurple/plugin.c libpurple/plugin.h
        libpurple/plugins/perl/common/BuddyList.xs
        libpurple/plugins/perl/common/module.h
        libpurple/protocols/gg/gg.c libpurple/sslconn.c
        libpurple/sslconn.h pidgin/gtkconv.c pidgin/gtkconv.h
        pidgin/gtkdialogs.c pidgin/gtkdialogs.h pidgin/gtkimhtml.c
        pidgin/gtkimhtml.h pidgin/gtkutils.c pidgin/gtkutils.h
        pidgin/plugins/perl/common/gtkmodule.h

ChangeLog: 

Build everything with the *_DISABLE_DEPRECATED flags set.  This allows us
to detect when we're still using deprecated functions internally (and by
extension, when we've deprecated something we shouldn't have).  In the
course of developing this changeset, I fixed a few such cases.

Given that the plan is to switch from PURPLE_HIDE_STRUCTS to
PURPLE_DISABLE_DEPRECATED as each struct is fully dealt with, this will
also ensure we have no regressions on the struct hiding work.

Deprecated functions are still available to the respective .c file, to
avoid missing prototype errors.  Also, Perl and DBus undef the
*_DISABLE_DEPRECATED defines as appropriate so that deprecated functions
will still be exported to Perl plugins and via DBus.  (Otherwise, we'd
be breaking backwards compatibility.)

-------------- next part --------------
============================================================
--- configure.ac	b178f87577e1101a99d6eba2c72531fed682d75a
+++ configure.ac	edbd01859b54edf52cbc027ab4cc929f788e1a10
@@ -1143,6 +1143,7 @@ AC_ARG_ENABLE(fortify, [AC_HELP_STRING([
 
 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.
============================================================
--- libpurple/account.c	247775131c335af3e7aa0ab787867b5b51b4d4f9
+++ libpurple/account.c	c67de76a1add2367539089326947aeeb7b8aa833
@@ -1035,7 +1035,7 @@ purple_account_register(PurpleAccount *a
 	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_account_unregister(PurpleAccount 
 	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 @@ request_password_ok_cb(PurpleAccount *ac
 
 	purple_account_set_password(account, entry);
 
-	purple_connection_new(account, FALSE, entry);
+	_purple_connection_new(account, FALSE, entry);
 }
 
 static void
@@ -1155,7 +1155,7 @@ purple_account_connect(PurpleAccount *ac
 		!(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 @@ purple_account_disconnect(PurpleAccount 
 	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);
============================================================
--- libpurple/blist.c	b90d368f010ac7bb099c92e49dc8b35c4a1cf570
+++ libpurple/blist.c	e7c7fb700491e00370bb540d6c04576cb636b72a
@@ -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 @@ parse_contact(PurpleGroup *group, xmlnod
 			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 @@ purple_blist_update_node_icon(PurpleBlis
 		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
============================================================
--- libpurple/blist.h	51498284711eabf924d7fbcb8062a2edd4e641b3
+++ libpurple/blist.h	bf3c1e82378df0cd3ed3a9e4c03a5d65c0857c73
@@ -89,7 +89,7 @@ typedef enum
 /* 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(Purpl
  */
 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.
  *
@@ -561,7 +561,7 @@ PurpleBuddy *purple_contact_get_priority
  */
 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.
  *
============================================================
--- libpurple/buddyicon.c	dbb00fa1c7275c14d773a9073830c5d0b41deca2
+++ libpurple/buddyicon.c	a67d2a27063f810d014699d3be6328906f68f3f3
@@ -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 @@ purple_buddy_icons_node_set_custom_icon_
 	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 @@ purple_buddy_icons_set_custom_icon(Purpl
 {
 	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)
============================================================
--- libpurple/buddyicon.h	15012fdc49959c5117aa9eb99b7649574d77db35
+++ libpurple/buddyicon.h	2a754b6a6d7c42bd9ec1646651ab1b1d8430afd1
@@ -337,7 +337,7 @@ purple_buddy_icons_node_set_custom_icon_
 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.
  *
============================================================
--- libpurple/connection.c	99d100199ff71455d6a80af4dbfb7226e5ae2fb1
+++ libpurple/connection.c	fd72dc8c98862b6b52304c32423a51d71a3c00ad
@@ -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 @@ purple_connection_new(PurpleAccount *acc
 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 @@ purple_connection_new(PurpleAccount *acc
 		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 @@ purple_connection_destroy(PurpleConnecti
 void
 purple_connection_destroy(PurpleConnection *gc)
 {
+	_purple_connection_destroy(gc);
+}
+
+void
+_purple_connection_destroy(PurpleConnection *gc)
+{
 	PurpleAccount *account;
 	GSList *buddies;
 	PurplePluginProtocolInfo *prpl_info = NULL;
============================================================
--- libpurple/connection.h	1bedab3e80682d43f51c28e7c6893169e597662a
+++ libpurple/connection.h	d77712b6f6c732bbc84b3d8e1603c66f893f63ee
@@ -268,7 +268,7 @@ extern "C" {
 /**************************************************************************/
 /*@{*/
 
-#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 @@ void purple_connection_new(PurpleAccount
 									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(Pu
 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.
  *
============================================================
--- libpurple/dbus-server.c	d996cc7c970a108dc90d0cebe84eb2ff4a6e9b0c
+++ libpurple/dbus-server.c	f8a9c43f4c5bb4247d9d15953ee43d94708730f0
@@ -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"
============================================================
--- libpurple/internal.h	a360e25572941b94a9e53dcd18be2957fee42543
+++ libpurple/internal.h	86902e7163d0f3b356dc3bdb2820ce355806f780
@@ -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 @@ _purple_buddy_icon_set_old_icons_dir(con
 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_ */
============================================================
--- libpurple/notify.c	9dc8cffcb81d377457cc490c069af62a72c91c21
+++ libpurple/notify.c	12fed73c103fe5ebab9d5fa566ff321199f576f8
@@ -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"
============================================================
--- libpurple/notify.h	0d5f7599116b9500109df537c8da63bf3e83cd76
+++ libpurple/notify.h	0731de71899c748b86c99483410e82b4170de13b
@@ -289,7 +289,7 @@ void purple_notify_searchresults_row_add
  */
 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_ro
 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_co
 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 @@ GList *purple_notify_searchresults_row_g
 										 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.
  *
============================================================
--- libpurple/plugin.c	0b134dff56c99a2adb9b01b35ad136a87f5f6875
+++ libpurple/plugin.c	2549ba41e1aa06b741a66c3d04e95c6874b10cc8
@@ -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"
============================================================
--- libpurple/plugin.h	33d560f93a89304a04c7114dad6396ac8ffd2780
+++ libpurple/plugin.h	b66b4aa41ed05a016dd10d93b8f32af992a605c4
@@ -533,7 +533,7 @@ gboolean purple_plugins_enabled(void);
  */
 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_notif
 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_not
 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 purple_plugins_register_load_notify
 										  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_noti
 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 purple_plugins_register_unload_noti
 											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.
  *
============================================================
--- libpurple/plugins/perl/common/BuddyList.xs	030c5d24f9cb5b0bde621a45de9ea98ae11843e0
+++ libpurple/plugins/perl/common/BuddyList.xs	d8f28e69fb7927ebdef452fc9428dc9c55289773
@@ -1,3 +1,4 @@
+#undef PURPLE_DISABLE_DEPRECATED
 #include "module.h"
 #include "../perl-handlers.h"
 
============================================================
--- libpurple/plugins/perl/common/module.h	6e13877fb09377e45051ef2ea374cc7ac1d32d38
+++ libpurple/plugins/perl/common/module.h	5b62ae604532ec24f0925781615d91b4eef17cce
@@ -1,5 +1,7 @@
+/* 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;
 
 #define group perl_group
============================================================
--- libpurple/protocols/gg/gg.c	15da503be05fe6b49a46589f40361b9c6f4ffd93
+++ libpurple/protocols/gg/gg.c	cd4a52d3d3db06a25c6cde90335e75f6e43fe085
@@ -421,7 +421,7 @@ static void ggp_callback_register_accoun
 	 */
 
 	/* 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 @@ static void ggp_callback_register_accoun
 	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);
============================================================
--- libpurple/sslconn.c	2d3ba35764808ce88b5379ada27b2706e2996288
+++ libpurple/sslconn.c	5ee54b3d14cff0877e6efa345a1024d0c732e9aa
@@ -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"
============================================================
--- libpurple/sslconn.h	9351ae6d31423524f7765608deb779665a7ccf71
+++ libpurple/sslconn.h	abbe7765db1356b53279697d7016a67184ab8ad5
@@ -185,7 +185,7 @@ PurpleSslConnection *purple_ssl_connect(
 									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.
  *
============================================================
--- pidgin/gtkconv.c	774147c5a06f8527f74e6feba906d6b1d56abad7
+++ pidgin/gtkconv.c	87efe1815b4d8e1c331a95ed086c5c2604ced7ab
@@ -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"
 
============================================================
--- pidgin/gtkconv.h	3e90f211a964455e40f6d07b30fe0fc9a03ae36d
+++ pidgin/gtkconv.h	87813d273d8cdf6d1def152c675db1fce58301c6
@@ -143,7 +143,7 @@ struct _PidginConversation
 	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
============================================================
--- pidgin/gtkdialogs.c	1a8ea524f3d98ec672cbe8b1c7f0cc86e9f80aa5
+++ pidgin/gtkdialogs.c	f9320a36d974fd8cfc43738c401a1c307b963776
@@ -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 @@ pidgin_dialogs_alias_contact_cb(PurpleCo
 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
============================================================
--- pidgin/gtkdialogs.h	94796355ec26bc98beaefe88bf290a102e61694e
+++ pidgin/gtkdialogs.h	32054e8ddbd97560b6d5c25d349b41081e5cf38c
@@ -38,11 +38,13 @@ void pidgin_dialogs_log(void);
 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 @@ void pidgin_dialogs_merge_groups(PurpleG
 /* 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_ */
============================================================
--- pidgin/gtkimhtml.c	87534daed35898d027b62b0e8f8c4d744cd161e3
+++ pidgin/gtkimhtml.c	d4ea20324e2320a18c38544641d18de1fcc10a61
@@ -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>
============================================================
--- pidgin/gtkimhtml.h	70cae1aa620e19d608ff47451dbc760121d94468
+++ pidgin/gtkimhtml.h	622a9f59b9e16f4ecab6b0d171594686819ba150
@@ -130,7 +130,7 @@ struct _GtkIMHtml {
 		GtkTextTag *link;
 	} edit;
 
-#ifndef PIDGIN_DISABLE_DEPRECATED
+#if !(defined PIDGIN_DISABLE_DEPRECATED) || (defined _PIDGIN_GTKIMHTML_C_)
 	/** @deprecated */
 	char *clipboard_text_string;
 	/** @deprecated */
============================================================
--- pidgin/gtkutils.c	22c624f08665eeb041b0827cd90469a93df33818
+++ pidgin/gtkutils.c	5d3e217fe4eb4b27259aaceafb882cf2a2adcb29
@@ -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 @@ gdk_pixbuf_new_from_file_at_scale(const 
 }
 #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 @@ void pidgin_set_custom_buddy_icon(Purple
 	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)
 {
============================================================
--- pidgin/gtkutils.h	9712ef124a8ce4b2fe2363fc40b7514d46cc113d
+++ pidgin/gtkutils.h	de3c539472dcb9a855742e68818d5cd5f05ac1a4
@@ -638,7 +638,7 @@ GdkPixbuf *gdk_pixbuf_new_from_file_at_s
 											 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.
  *
============================================================
--- pidgin/plugins/perl/common/gtkmodule.h	4178e210b597473408bd1ac727cbc1ffa97afcb0
+++ pidgin/plugins/perl/common/gtkmodule.h	cf2d6e9212ff12f05950ddaebf607e27b342a149
@@ -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


More information about the Commits mailing list