pidgin: 6fdfc062: Remove deprecated PidginBuddyList.connec...

andrew.victor at mxit.com andrew.victor at mxit.com
Thu Sep 15 18:25:44 EDT 2011


----------------------------------------------------------------------
Revision: 6fdfc062f29797ae0b90dc76ac23bc17a541b641
Parent:   1323146d662c36442b0bf3cb0173704d42c831f9
Author:   andrew.victor at mxit.com
Date:     09/15/11 18:22:11
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/6fdfc062f29797ae0b90dc76ac23bc17a541b641

Changelog: 

Remove deprecated PidginBuddyList.connection_errors.


Changes against parent 1323146d662c36442b0bf3cb0173704d42c831f9

  patched  ChangeLog.API
  patched  pidgin/gtkblist.c
  patched  pidgin/gtkblist.h

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	fdbcad9622c31d76833988446ab025969b7dc380
+++ pidgin/gtkblist.c	4a6a7d8adc02f3a70a24f6381443bc79f9319e99
@@ -4763,8 +4763,6 @@ static void pidgin_blist_new_list(Purple
 	PidginBuddyList *gtkblist;
 
 	gtkblist = g_new0(PidginBuddyList, 1);
-	gtkblist->connection_errors = g_hash_table_new_full(g_direct_hash,
-												g_direct_equal, NULL, g_free);
 	gtkblist->priv = g_new0(PidginBuddyListPrivate, 1);
 
 	blist->ui_data = gtkblist;
@@ -5078,7 +5076,6 @@ generic_error_destroy_cb(GtkObject *dial
 generic_error_destroy_cb(GtkObject *dialog,
                          PurpleAccount *account)
 {
-	g_hash_table_remove(gtkblist->connection_errors, account);
 	/* If the error dialog is being destroyed in response to the
 	 * account-error-changed signal, we don't want to clear the current
 	 * error.
@@ -5336,28 +5333,6 @@ update_signed_on_elsewhere_tooltip(Purpl
 }
 
 
-/**
- * Was used by the connection API to tell the blist if an account has a
- * connection error or no longer has a connection error, but the blist now does
- * this itself with the @ref account-error-changed signal.
- *
- * @param account The account that either has a connection error
- *        or no longer has a connection error.
- * @param message The connection error message, or NULL if this
- *        account is no longer in an error state.
- */
-static void
-pidgin_blist_update_account_error_state(PurpleAccount *account, const char *text)
-{
-	/* connection_errors isn't actually used anywhere; it's just kept in
-	 * sync with reality in case a plugin uses it.
-	 */
-	if (text == NULL)
-		g_hash_table_remove(gtkblist->connection_errors, account);
-	else
-		g_hash_table_insert(gtkblist->connection_errors, account, g_strdup(text));
-}
-
 /* Call appropriate error notification code based on error types */
 static void
 update_account_error_state(PurpleAccount *account,
@@ -5371,12 +5346,6 @@ update_account_error_state(PurpleAccount
 	if (old == NULL && new == NULL)
 		return;
 
-	/* For backwards compatibility: */
-	if (new)
-		pidgin_blist_update_account_error_state(account, new->description);
-	else
-		pidgin_blist_update_account_error_state(account, NULL);
-
 	if (new != NULL)
 		pidgin_blist_select_notebook_page(gtkblist);
 
@@ -6884,7 +6853,6 @@ static void pidgin_blist_destroy(PurpleB
 	if (gtkblist->drag_timeout)
 		g_source_remove(gtkblist->drag_timeout);
 
-	g_hash_table_destroy(gtkblist->connection_errors);
 	gtkblist->refresh_timer = 0;
 	gtkblist->timeout = 0;
 	gtkblist->drag_timeout = 0;
============================================================
--- pidgin/gtkblist.h	f08fbccf480440eaab1bfe00f72d2ff3a8d3b2de
+++ pidgin/gtkblist.h	6374e8cb81e381c62c890c135aa9dbba92b3cdff
@@ -86,15 +86,6 @@ struct _PidginBuddyList {
 	GtkWidget *menutray;            /**< The menu tray widget. */
 	GtkWidget *menutrayicon;        /**< The menu tray icon. */
 
-	/** Caches connection error messages; keys are #PurpleAccount and
-	 *  values are non- at c NULL <tt>const char *</tt>s containing localised
-	 *  error messages.  (If an account does not have an error, it will not
-	 *  appear in the table.)
-	 *  @deprecated in favour of purple_account_get_current_error(), which also
-	 *              gives you the #PurpleConnectionError value.
-	 */
-	GHashTable *connection_errors;
-
 	guint refresh_timer;            /**< The timer for refreshing every 30 seconds */
 
 	guint      timeout;              /**< The timeout for the tooltip. */
============================================================
--- ChangeLog.API	32e9d5f1549f30fe975d4009cbf67c0dce3a5015
+++ ChangeLog.API	c9bb07bf3c14ea917527a74bfa22120d3fa6e10a
@@ -104,6 +104,7 @@ version 3.0.0 (??/??/????):
 		* pidgin_dialogs_alias_contact
 		* pidgin_set_custom_buddy_icon
 		* pidgin_setup_screenname_autocomplete
+		* PidginBuddyList.connection_errors
 		* PidginConversation.sg
 		* purple_account_add_buddies_with_invite
 		* purple_account_add_buddy_with_invite


More information about the Commits mailing list