summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Laager <rlaager@pidgin.im>2008-10-30 22:40:49 +0000
committerRichard Laager <rlaager@pidgin.im>2008-10-30 22:40:49 +0000
commitadcd0d89ce465098d5808c985f07232f294335de (patch)
treeba9017f3f19d757f59f4aeefe8f2c08e17220cf5
parentb9e321e8cd3b19d62b304ea6676dbec1416cf6e4 (diff)
downloadpidgin-adcd0d89ce465098d5808c985f07232f294335de.tar.gz
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.)
-rw-r--r--configure.ac1
-rw-r--r--libpurple/account.c10
-rw-r--r--libpurple/blist.c6
-rw-r--r--libpurple/blist.h6
-rw-r--r--libpurple/buddyicon.c4
-rw-r--r--libpurple/buddyicon.h2
-rw-r--r--libpurple/connection.c21
-rw-r--r--libpurple/connection.h6
-rw-r--r--libpurple/dbus-server.c4
-rw-r--r--libpurple/internal.h50
-rw-r--r--libpurple/notify.c2
-rw-r--r--libpurple/notify.h8
-rw-r--r--libpurple/plugin.c2
-rw-r--r--libpurple/plugin.h12
-rw-r--r--libpurple/plugins/perl/common/BuddyList.xs1
-rw-r--r--libpurple/plugins/perl/common/module.h4
-rw-r--r--libpurple/protocols/gg/gg.c4
-rw-r--r--libpurple/sslconn.c2
-rw-r--r--libpurple/sslconn.h2
-rw-r--r--pidgin/gtkconv.c2
-rw-r--r--pidgin/gtkconv.h2
-rw-r--r--pidgin/gtkdialogs.c4
-rw-r--r--pidgin/gtkdialogs.h5
-rw-r--r--pidgin/gtkimhtml.c1
-rw-r--r--pidgin/gtkimhtml.h2
-rw-r--r--pidgin/gtkutils.c4
-rw-r--r--pidgin/gtkutils.h2
-rw-r--r--pidgin/plugins/perl/common/gtkmodule.h4
28 files changed, 134 insertions, 39 deletions
diff --git a/configure.ac b/configure.ac
index 753588f2df..dd2b5006c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1143,6 +1143,7 @@ AC_CHECK_FUNC(uname)
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.
diff --git a/libpurple/account.c b/libpurple/account.c
index ee2c9a8223..8196e266b6 100644
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -1035,7 +1035,7 @@ purple_account_register(PurpleAccount *account)
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 *account, PurpleAccountUnregistrationCb
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 *account, PurpleRequestFields *fields)
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 *account)
!(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)
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);
diff --git a/libpurple/blist.c b/libpurple/blist.c
index 74b52e437b..2a92ea3fcd 100644
--- a/libpurple/blist.c
+++ b/libpurple/blist.c
@@ -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, xmlnode *cnode)
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(PurpleBlistNode *node)
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
diff --git a/libpurple/blist.h b/libpurple/blist.h
index 016c8e9f28..e9b04aeea5 100644
--- a/libpurple/blist.h
+++ b/libpurple/blist.h
@@ -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_buddy_status(PurpleBuddy *buddy, PurpleStatus *old_stat
*/
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 @@ void purple_blist_merge_contact(PurpleContact *source, PurpleBlistNode *node);
*/
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.
*
diff --git a/libpurple/buddyicon.c b/libpurple/buddyicon.c
index 617d01944a..f2567744a6 100644
--- a/libpurple/buddyicon.c
+++ b/libpurple/buddyicon.c
@@ -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_from_file(PurpleBlistNode *node,
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(PurpleContact *contact, guchar *icon_data,
{
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)
diff --git a/libpurple/buddyicon.h b/libpurple/buddyicon.h
index 4800d3c9fe..0669804ea2 100644
--- a/libpurple/buddyicon.h
+++ b/libpurple/buddyicon.h
@@ -337,7 +337,7 @@ PurpleStoredImage *
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.
*
diff --git a/libpurple/connection.c b/libpurple/connection.c
index ecccbc6709..09c6d7d85d 100644
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -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 @@ update_keepalive(PurpleConnection *gc, gboolean on)
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,10 +178,15 @@ purple_connection_new(PurpleAccount *account, gboolean regist, const char *passw
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)
+{
/* Lots of copy/pasted code to avoid API changes. You might want to integrate that into the previous function when posssible. */
PurpleConnection *gc;
PurplePlugin *prpl;
@@ -230,6 +243,12 @@ purple_connection_new_unregister(PurpleAccount *account, const char *password, P
void
purple_connection_destroy(PurpleConnection *gc)
{
+ _purple_connection_destroy(gc);
+}
+
+void
+_purple_connection_destroy(PurpleConnection *gc)
+{
PurpleAccount *account;
GSList *buddies;
PurplePluginProtocolInfo *prpl_info = NULL;
diff --git a/libpurple/connection.h b/libpurple/connection.h
index cb72f42fd9..80c80a0978 100644
--- a/libpurple/connection.h
+++ b/libpurple/connection.h
@@ -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 *account, gboolean regist,
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(PurpleAccount *account, gboolean regist,
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.
*
diff --git a/libpurple/dbus-server.c b/libpurple/dbus-server.c
index df2a058879..dc757bc05b 100644
--- a/libpurple/dbus-server.c
+++ b/libpurple/dbus-server.c
@@ -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"
diff --git a/libpurple/internal.h b/libpurple/internal.h
index ae0aa26359..039dc7a0cf 100644
--- a/libpurple/internal.h
+++ b/libpurple/internal.h
@@ -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_icons_blist_loaded_cb(void);
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_ */
diff --git a/libpurple/notify.c b/libpurple/notify.c
index fbc92365bd..2b51d9f4f2 100644
--- a/libpurple/notify.c
+++ b/libpurple/notify.c
@@ -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"
diff --git a/libpurple/notify.h b/libpurple/notify.h
index f526f7efe1..34a9a24aa6 100644
--- a/libpurple/notify.h
+++ b/libpurple/notify.h
@@ -289,7 +289,7 @@ void purple_notify_searchresults_column_add(PurpleNotifySearchResults *results,
*/
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 @@ void purple_notify_searchresults_row_add(PurpleNotifySearchResults *results,
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_rows_count(PurpleNotifySearchResults *resu
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_get(PurpleNotifySearchResults *results,
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.
*
diff --git a/libpurple/plugin.c b/libpurple/plugin.c
index 40c07fb372..de622b964b 100644
--- a/libpurple/plugin.c
+++ b/libpurple/plugin.c
@@ -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"
diff --git a/libpurple/plugin.h b/libpurple/plugin.h
index 52c995dda3..3803abf518 100644
--- a/libpurple/plugin.h
+++ b/libpurple/plugin.h
@@ -533,7 +533,7 @@ void purple_plugins_probe(const char *ext);
*/
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 @@ gboolean purple_plugins_enabled(void);
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_register_probe_notify_cb(void (*func)(void *), void *data);
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_cb(void (*func)(PurplePlugin *, 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 a plugin is loaded.
*
@@ -576,7 +576,7 @@ void purple_plugins_register_load_notify_cb(void (*func)(PurplePlugin *, void *)
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_notify_cb(void (*func)(PurplePlugin *, 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 a plugin is unloaded.
*
diff --git a/libpurple/plugins/perl/common/BuddyList.xs b/libpurple/plugins/perl/common/BuddyList.xs
index f66b2c3877..5acb72af21 100644
--- a/libpurple/plugins/perl/common/BuddyList.xs
+++ b/libpurple/plugins/perl/common/BuddyList.xs
@@ -1,3 +1,4 @@
+#undef PURPLE_DISABLE_DEPRECATED
#include "module.h"
#include "../perl-handlers.h"
diff --git a/libpurple/plugins/perl/common/module.h b/libpurple/plugins/perl/common/module.h
index 4c8943b2d8..e62542cc31 100644
--- a/libpurple/plugins/perl/common/module.h
+++ b/libpurple/plugins/perl/common/module.h
@@ -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;
diff --git a/libpurple/protocols/gg/gg.c b/libpurple/protocols/gg/gg.c
index 7aec897325..f1e0faa498 100644
--- a/libpurple/protocols/gg/gg.c
+++ b/libpurple/protocols/gg/gg.c
@@ -421,7 +421,7 @@ static void ggp_callback_register_account_ok(PurpleConnection *gc,
*/
/* 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_account_cancel(PurpleConnection *gc,
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);
diff --git a/libpurple/sslconn.c b/libpurple/sslconn.c
index a5576472c8..bb255db532 100644
--- a/libpurple/sslconn.c
+++ b/libpurple/sslconn.c
@@ -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"
diff --git a/libpurple/sslconn.h b/libpurple/sslconn.h
index d9d3a20c89..2191ac1bb0 100644
--- a/libpurple/sslconn.h
+++ b/libpurple/sslconn.h
@@ -185,7 +185,7 @@ PurpleSslConnection *purple_ssl_connect(PurpleAccount *account, const char *host
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.
*
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
index ac73fa03dc..8958d27d60 100644
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -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"
diff --git a/pidgin/gtkconv.h b/pidgin/gtkconv.h
index df34aa0017..f94b6efc4a 100644
--- a/pidgin/gtkconv.h
+++ b/pidgin/gtkconv.h
@@ -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
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
index ce87c7edb1..41224823a7 100644
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -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_log(void)
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
diff --git a/pidgin/gtkdialogs.h b/pidgin/gtkdialogs.h
index a663a679e3..3a66249652 100644
--- a/pidgin/gtkdialogs.h
+++ b/pidgin/gtkdialogs.h
@@ -38,11 +38,13 @@ void pidgin_dialogs_im_with_user(PurpleAccount *, const char *);
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(PurpleGroup *, const char *);
/* 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_ */
diff --git a/pidgin/gtkimhtml.c b/pidgin/gtkimhtml.c
index 9ec99372be..a5ee1d9460 100644
--- a/pidgin/gtkimhtml.c
+++ b/pidgin/gtkimhtml.c
@@ -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>
diff --git a/pidgin/gtkimhtml.h b/pidgin/gtkimhtml.h
index 725e71eddd..ef18d99445 100644
--- a/pidgin/gtkimhtml.h
+++ b/pidgin/gtkimhtml.h
@@ -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 */
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
index 9dd223edc9..6667ce5722 100644
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -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 char *filename, int width, int height,
}
#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(PurpleAccount *account, const char *who, const
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)
{
diff --git a/pidgin/gtkutils.h b/pidgin/gtkutils.h
index 7cad487585..ace6bd4d2e 100644
--- a/pidgin/gtkutils.h
+++ b/pidgin/gtkutils.h
@@ -638,7 +638,7 @@ GdkPixbuf *gdk_pixbuf_new_from_file_at_scale(const char *filename, int width, in
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.
*
diff --git a/pidgin/plugins/perl/common/gtkmodule.h b/pidgin/plugins/perl/common/gtkmodule.h
index 5b566babae..7151f077fb 100644
--- a/pidgin/plugins/perl/common/gtkmodule.h
+++ b/pidgin/plugins/perl/common/gtkmodule.h
@@ -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