pidgin/pidgin

Remove unused account signals

20 months ago, Elliott Sales de Andrade
5ae15cfc1bee
Parents 3bc9948e9f3c
Children d567f89d6a9b
Remove unused account signals

Testing Done:
Compiled

Reviewed at https://reviews.imfreedom.org/r/1914/
--- a/ChangeLog.API Sun Oct 09 01:48:50 2022 -0500
+++ b/ChangeLog.API Sun Oct 09 02:20:18 2022 -0500
@@ -105,8 +105,6 @@
protocol interfaces) and protocols.h (protocols subsystem)
* status.h has been split into status.h (Status API) and presence.h
(Presence API)
- * account-authorization-requested signal merged with
- account-authorization-requested-with-message signal
* purple_account_add_buddy now takes an invite message as the last
parameter
* purple_account_add_buddies now takes an invite message as the last
@@ -326,7 +324,17 @@
* _PurpleSoundEventID
* _PurpleSslConnection
* _XMLNodeType
- * account-authorization-requested-with-message signal
+ * 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-removed signal. Use PurpleAccountManager::removed
+ instead.
+ * account-setting-info, account-set-info signals
* 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 Sun Oct 09 01:48:50 2022 -0500
+++ b/doc/reference/libpurple/signals_account.md Sun Oct 09 02:20:18 2022 -0500
@@ -7,23 +7,13 @@
* [account-created](#account-created)
* [account-destroying](#account-destroying)
-* [account-added](#account-added)
-* [account-connecting](#account-connecting)
-* [account-removed](#account-removed)
* [account-disabled](#account-disabled)
* [account-enabled](#account-enabled)
-* [account-setting-info](#account-setting-info)
-* [account-set-info](#account-set-info)
* [account-status-changed](#account-status-changed)
* [account-actions-changed](#account-actions-changed)
-* [account-alias-changed](#account-alias-changed)
-* [account-authorization-requested](#account-authorization-requested)
-* [account-authorization-denied](#account-authorization-denied)
-* [account-authorization-granted](#account-authorization-granted)
* [account-error-changed](#account-error-changed)
* [account-signed-on](#account-signed-on)
* [account-signed-off](#account-signed-off)
-* [account-connection-error](#account-connection-error)
### Signal Details
@@ -63,61 +53,6 @@
----
-#### account-added
-
-```c
-void user_function(PurpleAccount *account, gpointer user_data);
-```
-
-Emitted when an account is added.
-
-**Parameters:**
-
-
-**account**
-: The account that was added. See `purple_accounts_add()`.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-----
-
-#### account-connecting
-
-```c
-void user_function(PurpleAccount *account, gpointer user_data);
-```
-
-This is emitted when an account is in the process of connecting.
-
-**Parameters:**
-
-**account**
-: The account in the process of connecting.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-----
-
-#### account-removed
-
-```c
-void user_function(PurpleAccount *account, gpointer user_data);
-```
-
-Emitted when an account is removed.
-
-**Parameters:**
-
-**account**
-: The account that was removed. See `purple_accounts_remove()`.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-----
-
#### account-disabled
```c
@@ -154,48 +89,6 @@
----
-#### account-setting-info
-
-```c
-void user_function(PurpleAccount *account, const gchar *new_info, gpointer user_data);
-```
-
-Emitted when a user is about to send his new user info, or profile, to the server.
-
-**Parameters:**
-
-**account**
-: The account that the info will be set on.
-
-**new_info**
-: The new information to set.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-----
-
-#### account-set-info
-
-```c
-void user_function(PurpleAccount *account, const gchar *new_info, gpointer user_data);
-```
-
-Emitted when a user sent his new user info, or profile, to the server.
-
-**Parameters:**
-
-**account**
-: The account that the info was set on.
-
-**new_info**
-: The new information set.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-----
-
#### account-status-changed
```c
@@ -241,126 +134,6 @@
----
-#### account-alias-changed
-
-```c
-void user_function(PurpleAccount *account, const gchar *old, gpointer user_data);
-```
-
-Emitted when the alias of an account changes (after the change).
-
-**Parameters:**
-
-**account**
-: The account for which the alias was changed.
-
-**old**
-: The alias before change.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-----
-
-#### account-authorization-requested
-
-```c
-int user_function(PurpleAccount *account,
- const gchar *user,
- const gchar *message,
- gchar **response,
- gpointer user_data);
-```
-
-Emitted when a user requests authorization.
-
-**Parameters:**
-
-**account**
-: The account.
-
-**user**
-: The name of the user requesting authorization.
-
-**message**
-: The authorization request message.
-
-**response**
-: The message to send in the response.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-**Returns:**
-
-`PURPLE_ACCOUNT_RESPONSE_IGNORE`
-: To silently ignore the request
-
-`PURPLE_ACCOUNT_RESPONSE_DENY`
-: To block the request (the sender might get informed)
-
-`PURPLE_ACCOUNT_RESPONSE_ACCEPT`
-: If the request should be granted.
-
-`PURPLE_ACCOUNT_RESPONSE_PASS`
-: The user will be prompted with the request.
-
-----
-
-#### account-authorization-denied
-
-```c
-void user_function(PurpleAccount *account,
- const gchar *user,
- const gchar *message,
- gpointer user_data);
-```
-
-Emitted when the authorization request for a buddy is denied.
-
-**Parameters:**
-
-**account**
-: The account.
-
-**user**
-: The name of the user requesting authorization.
-
-**message**
-: The message to tell the buddy who was denied.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-----
-
-#### account-authorization-granted
-
-```c
-void user_function(PurpleAccount *account,
- const gchar *user,
- const gchar *message,
- gpointer user_data);
-```
-
-Emitted when the authorization request for a buddy is granted.
-
-**Parameters:**
-
-**account**
-: The account.
-
-**user**
-: The name of the user requesting authorization.
-
-**message**
-: The message to tell the buddy who was granted authorization.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-----
-
#### account-error-changed
```c
@@ -421,30 +194,3 @@
**user_data**
: User data set when the signal handler was connected.
-
-----
-
-#### account-connection-error
-
-```c
-void user_function(PurpleAccount *account,
- PurpleConnectionError err,
- const gchar *desc,
- gpointer user_data)
-```
-
-Emitted when a connection error occurs, before `"signed"`-off.
-
-**Parameters:**
-
-**account**
-: The account on which the error has occurred.
-
-**err**
-: The error that occurred.
-
-**desc**
-: A description of the error, giving more information.
-
-**user_data**
-: User data set when the signal handler was connected.
--- a/libpurple/account.c Sun Oct 09 01:48:50 2022 -0500
+++ b/libpurple/account.c Sun Oct 09 02:20:18 2022 -0500
@@ -1372,14 +1372,11 @@
if ((!alias && account->alias) || (alias && !account->alias) ||
g_utf8_collate(account->alias, alias))
{
- char *old = account->alias;
-
+ g_free(account->alias);
account->alias = g_strdup(alias);
+
g_object_notify_by_pspec(G_OBJECT(account),
properties[PROP_PRIVATE_ALIAS]);
- purple_signal_emit(purple_accounts_get_handle(), "account-alias-changed",
- account, old);
- g_free(old);
purple_accounts_schedule_save();
}
--- a/libpurple/accounts.c Sun Oct 09 01:48:50 2022 -0500
+++ b/libpurple/accounts.c Sun Oct 09 02:20:18 2022 -0500
@@ -671,9 +671,6 @@
err = purple_connection_error_info_new(type, description);
_purple_account_set_current_error(account, err);
-
- purple_signal_emit(purple_accounts_get_handle(), "account-connection-error",
- account, type, description);
}
void
@@ -682,10 +679,6 @@
void *handle = purple_accounts_get_handle();
void *conn_handle = purple_connections_get_handle();
- purple_signal_register(handle, "account-connecting",
- purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
- PURPLE_TYPE_ACCOUNT);
-
purple_signal_register(handle, "account-disabled",
purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
PURPLE_TYPE_ACCOUNT);
@@ -694,14 +687,6 @@
purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
PURPLE_TYPE_ACCOUNT);
- purple_signal_register(handle, "account-setting-info",
- purple_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 2,
- PURPLE_TYPE_ACCOUNT, G_TYPE_STRING);
-
- purple_signal_register(handle, "account-set-info",
- purple_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 2,
- PURPLE_TYPE_ACCOUNT, G_TYPE_STRING);
-
purple_signal_register(handle, "account-created",
purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
PURPLE_TYPE_ACCOUNT);
@@ -710,14 +695,6 @@
purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
PURPLE_TYPE_ACCOUNT);
- purple_signal_register(handle, "account-added",
- purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
- PURPLE_TYPE_ACCOUNT);
-
- purple_signal_register(handle, "account-removed",
- purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
- PURPLE_TYPE_ACCOUNT);
-
purple_signal_register(handle, "account-status-changing",
purple_marshal_VOID__POINTER_POINTER_POINTER,
G_TYPE_NONE, 3, PURPLE_TYPE_ACCOUNT,
@@ -732,23 +709,6 @@
purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
PURPLE_TYPE_ACCOUNT);
- purple_signal_register(handle, "account-alias-changed",
- purple_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 2,
- PURPLE_TYPE_ACCOUNT, G_TYPE_STRING);
-
- purple_signal_register(handle, "account-authorization-requested",
- purple_marshal_INT__POINTER_POINTER_POINTER,
- G_TYPE_INT, 4, PURPLE_TYPE_ACCOUNT, G_TYPE_STRING,
- G_TYPE_STRING, G_TYPE_STRING);
-
- purple_signal_register(handle, "account-authorization-denied",
- purple_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 3,
- PURPLE_TYPE_ACCOUNT, G_TYPE_STRING, G_TYPE_STRING);
-
- purple_signal_register(handle, "account-authorization-granted",
- purple_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 3,
- PURPLE_TYPE_ACCOUNT, G_TYPE_STRING, G_TYPE_STRING);
-
purple_signal_register(handle, "account-error-changed",
purple_marshal_VOID__POINTER_POINTER_POINTER,
G_TYPE_NONE, 3, PURPLE_TYPE_ACCOUNT,
@@ -763,11 +723,6 @@
purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
PURPLE_TYPE_ACCOUNT);
- purple_signal_register(handle, "account-connection-error",
- purple_marshal_VOID__POINTER_INT_POINTER,
- G_TYPE_NONE, 3, PURPLE_TYPE_ACCOUNT,
- PURPLE_TYPE_CONNECTION_ERROR, G_TYPE_STRING);
-
purple_signal_connect(conn_handle, "signed-on", handle,
G_CALLBACK(signed_on_cb), NULL);
purple_signal_connect(conn_handle, "signed-off", handle,
--- a/libpurple/connection.c Sun Oct 09 01:48:50 2022 -0500
+++ b/libpurple/connection.c Sun Oct 09 02:20:18 2022 -0500
@@ -958,8 +958,6 @@
purple_debug_info("connection", "Connecting. connection = %p",
connection);
- purple_signal_emit(purple_accounts_get_handle(), "account-connecting",
- account);
purple_protocol_login(protocol, account);
}
}
--- a/libpurple/purpleaccountmanager.c Sun Oct 09 01:48:50 2022 -0500
+++ b/libpurple/purpleaccountmanager.c Sun Oct 09 02:20:18 2022 -0500
@@ -153,9 +153,6 @@
purple_accounts_schedule_save();
g_signal_emit(manager, signals[SIG_ADDED], 0, account);
-
- /* Finally emit the old purple signal that will eventually be removed. */
- purple_signal_emit(purple_accounts_get_handle(), "account-added", account);
}
void
@@ -175,10 +172,6 @@
purple_account_clear_current_error(account);
g_signal_emit(manager, signals[SIG_REMOVED], 0, account);
-
- /* Finally emit the old purple signal that will eventually be removed. */
- purple_signal_emit(purple_accounts_get_handle(), "account-removed",
- account);
}
GList *
--- a/libpurple/server.c Sun Oct 09 01:48:50 2022 -0500
+++ b/libpurple/server.c Sun Oct 09 02:20:18 2022 -0500
@@ -110,22 +110,13 @@
void purple_serv_set_info(PurpleConnection *gc, const char *info)
{
PurpleProtocol *protocol;
- PurpleAccount *account;
if (gc) {
protocol = purple_connection_get_protocol(gc);
if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, SERVER, set_info)) {
- account = purple_connection_get_account(gc);
-
- purple_signal_emit(purple_accounts_get_handle(),
- "account-setting-info", account, info);
-
purple_protocol_server_set_info(PURPLE_PROTOCOL_SERVER(protocol),
gc, info);
-
- purple_signal_emit(purple_accounts_get_handle(),
- "account-set-info", account, info);
}
}
}