--- a/ChangeLog.API Sat Nov 05 01:06:18 2022 -0500
+++ b/ChangeLog.API Sat Nov 05 02:33:47 2022 -0500
@@ -327,21 +327,24 @@
* account-added signal. Use PurpleAccountManager::added 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-created signal. Use PurpleAccountManager::added instead.
* 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
* 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
--- a/doc/reference/libpurple/signals_account.md Sat Nov 05 01:06:18 2022 -0500
+++ b/doc/reference/libpurple/signals_account.md Sat Nov 05 02:33:47 2022 -0500
@@ -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
-void user_function(PurpleAccount *account,
- const PurpleConnectionErrorInfo *old_error,
- const PurpleConnectionErrorInfo *current_error,
-Emitted when `account`'s error changes. You should not call purple_account_clear_current_error() while this signal is being emitted.
-: The account whose error has changed.
-: 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.
-: 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 set when the signal handler was connected.
-----
--- a/libpurple/account.c Sat Nov 05 01:06:18 2022 -0500
+++ b/libpurple/account.c Sat Nov 05 02:33:47 2022 -0500
@@ -127,6 +127,7 @@
@@ -508,16 +509,16 @@
_purple_account_set_current_error(PurpleAccount *account,
PurpleConnectionErrorInfo *new_err)
- PurpleConnectionErrorInfo *old_err;
PurpleNotificationManager *manager = NULL;
g_return_if_fail(PURPLE_IS_ACCOUNT(account));
- old_err = account->current_error;
+ if(new_err == account->current_error) {
+ g_clear_pointer(&account->current_error, + purple_connection_error_info_free); account->current_error = new_err;
manager = purple_notification_manager_get_default();
@@ -535,12 +536,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 +1040,20 @@
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+ * The [type@GLib.Error] of the account. This is set when an account enters + * an error state and is cleared when a connection attempt is made. + properties[PROP_ERROR] = g_param_spec_boxed( + "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);
--- a/libpurple/accounts.c Sat Nov 05 01:06:18 2022 -0500
+++ b/libpurple/accounts.c Sat Nov 05 02:33:47 2022 -0500
@@ -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_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,
--- a/libpurple/protocols.c Sat Nov 05 01:06:18 2022 -0500
+++ b/libpurple/protocols.c Sat Nov 05 02:33:47 2022 -0500
@@ -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",