# HG changeset patch
# Node ID 8e560b73b3d6
# Parent  c66637c918bb
diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -327,21 +327,24 @@
 		* _PurpleSslConnection
 		* _XMLNodeType
 		* account-added signal. Use PurpleAccountManager::added instead.
+		* account-alias-changed signal
 		* account-created signal. Use PurpleAccountManager::added instead.
+		* account-authorization-denied, account-authorization-granted,
+		  account-authorization-requested,
+		  account-authorization-requested-with-message signals
+		* account-connecting signal
+		* account-connection-error signal
 		* account-destroying signal. Use PurpleAccountManager::removed instead.
 		* account-disabled signal. Use
 		  PurpleAccountManager::account-changed::enabled instead.
 		* account-enabled signal. Use
 		  PurpleAccountManager::account-changed::enabled instead.
-		* account-alias-changed signal
-		* account-authorization-denied, account-authorization-granted,
-		  account-authorization-requested,
-		  account-authorization-requested-with-message signals
-		* account-connecting signal
-		* account-connection-error signal
+		* account-error-changed signal. Use
+		  PurpleAccountManager::account-changed::error instead.
 		* account-removed signal. Use PurpleAccountManager::removed
 		  instead.
 		* account-setting-info, account-set-info signals
+		* account-status-changing signal.
 		* file-recv-accept, file-recv-cancel, file-recv-complete,
 		  file-recv-start, file-send-accept, file-send-cancel,
 		  file-send-complete, file-send-start signals. Use
diff --git a/doc/reference/libpurple/signals_account.md b/doc/reference/libpurple/signals_account.md
--- a/doc/reference/libpurple/signals_account.md
+++ b/doc/reference/libpurple/signals_account.md
@@ -7,7 +7,6 @@
 
 * [account-status-changed](#account-status-changed)
 * [account-actions-changed](#account-actions-changed)
-* [account-error-changed](#account-error-changed)
 * [account-signed-on](#account-signed-on)
 * [account-signed-off](#account-signed-off)
 
@@ -94,33 +93,6 @@
 
 ----
 
-#### account-error-changed
-
-```c
-void user_function(PurpleAccount *account,
-                   const PurpleConnectionErrorInfo *old_error,
-                   const PurpleConnectionErrorInfo *current_error,
-                   gpointer user_data);
-```
-
-Emitted when `account`'s error changes.  You should not call purple_account_clear_current_error() while this signal is being emitted.
-
-**Parameters:**
-
-**account**
-: The account whose error has changed.
-
-**old_error**
-: The account's previous error, or `NULL` if it had no error.  After this signal is emitted, `old_error` is not guaranteed to be a valid pointer.
-
-**new_error**
-: The account's new error, or `NULL` if it has no error. If not `NULL`, `new_error` will remain a valid until pointer just after the next time this signal is emitted for this `account`. See `purple_account_get_current_error()`.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-----
-
 #### account-signed-on
 
 ```c
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -127,6 +127,7 @@
 	PROP_BUDDY_ICON_PATH,
 	PROP_REMEMBER_PASSWORD,
 	PROP_PROXY_INFO,
+	PROP_ERROR,
 	PROP_LAST
 };
 
@@ -519,6 +520,7 @@
 		return;
 
 	account->current_error = new_err;
+	g_clear_pointer(&old_err, purple_connection_error_info_free);
 
 	manager = purple_notification_manager_get_default();
 
@@ -535,12 +537,9 @@
 		purple_notification_manager_add(manager, account->error_notification);
 	}
 
-	purple_signal_emit(purple_accounts_get_handle(),
-	                   "account-error-changed",
-	                   account, old_err, new_err);
+	g_object_notify_by_pspec(G_OBJECT(account), properties[PROP_ERROR]);
+
 	purple_accounts_schedule_save();
-
-	g_clear_pointer(&old_err, purple_connection_error_info_free);
 }
 
 /******************************************************************************
@@ -1042,6 +1041,20 @@
 		PURPLE_TYPE_PROXY_INFO,
 		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 
+	/**
+	 * PurpleAccount:error:
+	 *
+	 * The [type@GLib.Error] of the account. This is set when an account enters
+	 * and error state and is cleared when a connection attempt is made.
+	 *
+	 * Since: 3.0.0
+	 */
+	properties[PROP_ERROR] = g_param_spec_boxed(
+		"error", "error",
+		"The connection error info of the account",
+		PURPLE_TYPE_CONNECTION_ERROR_INFO,
+		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
 	g_object_class_install_properties(obj_class, PROP_LAST, properties);
 }
 
diff --git a/libpurple/accounts.c b/libpurple/accounts.c
--- a/libpurple/accounts.c
+++ b/libpurple/accounts.c
@@ -680,11 +680,6 @@
 	void *handle = purple_accounts_get_handle();
 	void *conn_handle = purple_connections_get_handle();
 
-	purple_signal_register(handle, "account-status-changing",
-						 purple_marshal_VOID__POINTER_POINTER_POINTER,
-						 G_TYPE_NONE, 3, PURPLE_TYPE_ACCOUNT,
-						 PURPLE_TYPE_STATUS, PURPLE_TYPE_STATUS);
-
 	purple_signal_register(handle, "account-status-changed",
 						 purple_marshal_VOID__POINTER_POINTER_POINTER,
 						 G_TYPE_NONE, 3, PURPLE_TYPE_ACCOUNT,
@@ -694,12 +689,6 @@
 						 purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
 						 PURPLE_TYPE_ACCOUNT);
 
-	purple_signal_register(handle, "account-error-changed",
-	                       purple_marshal_VOID__POINTER_POINTER_POINTER,
-	                       G_TYPE_NONE, 3, PURPLE_TYPE_ACCOUNT,
-	                       PURPLE_TYPE_CONNECTION_ERROR_INFO,
-	                       PURPLE_TYPE_CONNECTION_ERROR_INFO);
-
 	purple_signal_register(handle, "account-signed-on",
 	                       purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
 	                       PURPLE_TYPE_ACCOUNT);
diff --git a/libpurple/protocols.c b/libpurple/protocols.c
--- a/libpurple/protocols.c
+++ b/libpurple/protocols.c
@@ -362,9 +362,6 @@
 	g_return_if_fail(new_status != NULL);
 	g_return_if_fail(!purple_status_is_exclusive(new_status) || old_status != NULL);
 
-	purple_signal_emit(purple_accounts_get_handle(), "account-status-changing",
-					account, old_status, new_status);
-
 	do_protocol_change_account_status(account, old_status, new_status);
 
 	purple_signal_emit(purple_accounts_get_handle(), "account-status-changed",
