# HG changeset patch # User Will Thompson # Date 1193613008 0 # Node ID 872068d10eab153c858f87c54c59b4bae64deaf4 # Parent f5b223d0cb89842c14fbead6705afcc1516c55ce Mark pointed out that PurpleConnectionErrorPair is not a very good name for the struct (what if it gains an extra field in the future?), and John suggested PurpleConnectionErrorInfo, which is an accurate name. diff -r f5b223d0cb89 -r 872068d10eab ChangeLog.API --- a/ChangeLog.API Sun Oct 28 18:03:14 2007 +0000 +++ b/ChangeLog.API Sun Oct 28 23:10:08 2007 +0000 @@ -32,7 +32,7 @@ to whether automatic reconnection should be attempted after a connection error (rather than checking gc->wants_to_die). - * PurpleConnectionErrorPair, a struct to hold a + * PurpleConnectionErrorInfo, a struct to hold a PurpleConnectionError and a const char *description. * purple_account_get_current_error() to get the most recent PurpleConnectionError and description (or NULL if the diff -r f5b223d0cb89 -r 872068d10eab doc/account-signals.dox --- a/doc/account-signals.dox Sun Oct 28 18:03:14 2007 +0000 +++ b/doc/account-signals.dox Sun Oct 28 23:10:08 2007 +0000 @@ -144,7 +144,7 @@ @signaldef account-error-changed @signalproto -void (*account_error_changed)(PurpleAccount *account, const PurpleConnectionErrorPair *old_error, const PurpleConnectionErrorPair *current_error); +void (*account_error_changed)(PurpleAccount *account, const PurpleConnectionErrorInfo *old_error, const PurpleConnectionErrorInfo *current_error); @endsignalproto @signaldesc Emitted when @a account's error changes. diff -r f5b223d0cb89 -r 872068d10eab libpurple/account.c --- a/libpurple/account.c Sun Oct 28 18:03:14 2007 +0000 +++ b/libpurple/account.c Sun Oct 28 23:10:08 2007 +0000 @@ -43,7 +43,7 @@ typedef struct { - PurpleConnectionErrorPair *current_error; + PurpleConnectionErrorInfo *current_error; } PurpleAccountPrivate; #define PURPLE_ACCOUNT_GET_PRIVATE(account) \ @@ -2236,7 +2236,7 @@ clear_current_error(PurpleAccount *account) { PurpleAccountPrivate *priv = PURPLE_ACCOUNT_GET_PRIVATE(account); - PurpleConnectionErrorPair *old; + PurpleConnectionErrorInfo *old; if (priv->current_error) { @@ -2266,9 +2266,9 @@ { PurpleAccount *account = purple_connection_get_account(gc); PurpleAccountPrivate *priv = PURPLE_ACCOUNT_GET_PRIVATE(account); - PurpleConnectionErrorPair *old = priv->current_error; - - priv->current_error = g_new0(PurpleConnectionErrorPair, 1); + PurpleConnectionErrorInfo *old = priv->current_error; + + priv->current_error = g_new0(PurpleConnectionErrorInfo, 1); priv->current_error->type = err; priv->current_error->description = desc; @@ -2278,7 +2278,7 @@ g_free(old); } -const PurpleConnectionErrorPair * +const PurpleConnectionErrorInfo * purple_account_get_current_error(PurpleAccount *account) { PurpleAccountPrivate *priv = PURPLE_ACCOUNT_GET_PRIVATE(account); diff -r f5b223d0cb89 -r 872068d10eab libpurple/account.h --- a/libpurple/account.h Sun Oct 28 18:03:14 2007 +0000 +++ b/libpurple/account.h Sun Oct 28 23:10:08 2007 +0000 @@ -903,7 +903,7 @@ * @constreturn The type of error and a human-readable description of the * current error, or @c NULL if there is no current error. */ -const PurpleConnectionErrorPair *purple_account_get_current_error(PurpleAccount *account); +const PurpleConnectionErrorInfo *purple_account_get_current_error(PurpleAccount *account); /*@}*/ diff -r f5b223d0cb89 -r 872068d10eab libpurple/connection.h --- a/libpurple/connection.h Sun Oct 28 18:03:14 2007 +0000 +++ b/libpurple/connection.h Sun Oct 28 23:10:08 2007 +0000 @@ -133,7 +133,7 @@ PurpleConnectionError type; /** A localised, human-readable description of the error. */ const char *description; -} PurpleConnectionErrorPair; +} PurpleConnectionErrorInfo; #include diff -r f5b223d0cb89 -r 872068d10eab pidgin/gtkblist.c --- a/pidgin/gtkblist.c Sun Oct 28 18:03:14 2007 +0000 +++ b/pidgin/gtkblist.c Sun Oct 28 23:10:08 2007 +0000 @@ -4395,8 +4395,8 @@ static void update_account_error_state(PurpleAccount *account, - PurpleConnectionErrorPair *old, - PurpleConnectionErrorPair *new, + PurpleConnectionErrorInfo *old, + PurpleConnectionErrorInfo *new, PidginBuddyList *gtkblist) { if (new)