pidgin/pidgin

45fef383cf60
Parents 61d9b9e2b974
Children bb457ce5ad5e
Remove purple_account_notify_added as it isn't used by anyone.

I used the new plugins-ansible repo to clone all known plugins and saw that it
was only used in the classic battlenet plugin which is no long maintained and
according to its issue tracker hasn't worked for a long time.

Testing Done:
Compiled

Reviewed at https://reviews.imfreedom.org/r/1526/
--- a/ChangeLog.API Wed Jul 06 05:47:52 2022 -0500
+++ b/ChangeLog.API Mon Jul 18 20:46:36 2022 -0500
@@ -342,6 +342,7 @@
* purple_account_get_ui_int
* purple_account_get_ui_string
* purple_account_get_ui_bool
+ * purple_account_notify_added
* purple_account_set_check_mail
* purple_account_set_current_error
* purple_account_set_password. Use
--- a/finch/gntaccount.c Wed Jul 06 05:47:52 2022 -0500
+++ b/finch/gntaccount.c Mon Jul 18 20:46:36 2022 -0500
@@ -965,24 +965,6 @@
}
static void
-notify_added(PurpleAccount *account, const char *remote_user,
- const char *id, const char *alias,
- const char *msg)
-{
- char *buffer;
- PurpleConnection *gc;
-
- gc = purple_account_get_connection(account);
-
- buffer = make_info(account, gc, remote_user, id, alias, msg);
-
- purple_notify_info(NULL, NULL, buffer, NULL,
- purple_request_cpar_from_connection(gc));
-
- g_free(buffer);
-}
-
-static void
free_add_user_data(AddUserData *data)
{
g_free(data->username);
@@ -1167,7 +1149,6 @@
static PurpleAccountUiOps ui_ops =
{
- .notify_added = notify_added,
.request_add = request_add,
.request_authorize = finch_request_authorize,
.close_account_request = finch_request_close,
--- a/libpurple/account.c Wed Jul 06 05:47:52 2022 -0500
+++ b/libpurple/account.c Mon Jul 18 20:46:36 2022 -0500
@@ -1227,22 +1227,6 @@
}
void
-purple_account_notify_added(PurpleAccount *account, const char *remote_user,
- const char *id, const char *alias,
- const char *message)
-{
- PurpleAccountUiOps *ui_ops;
-
- g_return_if_fail(PURPLE_IS_ACCOUNT(account));
- g_return_if_fail(remote_user != NULL);
-
- ui_ops = purple_accounts_get_ui_ops();
-
- if (ui_ops != NULL && ui_ops->notify_added != NULL)
- ui_ops->notify_added(account, remote_user, id, alias, message);
-}
-
-void
purple_account_request_add(PurpleAccount *account, const char *remote_user,
const char *id, const char *alias,
const char *message)
--- a/libpurple/account.h Wed Jul 06 05:47:52 2022 -0500
+++ b/libpurple/account.h Mon Jul 18 20:46:36 2022 -0500
@@ -214,24 +214,6 @@
gboolean purple_account_is_disconnecting(PurpleAccount *account);
/**
- * purple_account_notify_added:
- * @account: The account that was added.
- * @remote_user: The name of the user that added this account.
- * @id: The optional ID of the local account. Rarely used.
- * @alias: The optional alias of the user.
- * @message: The optional message sent from the user adding you.
- *
- * Notifies the user that the account was added to a remote user's
- * buddy list.
- *
- * This will present a dialog informing the user that he was added to the
- * remote user's buddy list.
- */
-void purple_account_notify_added(PurpleAccount *account, const char *remote_user,
- const char *id, const char *alias,
- const char *message);
-
-/**
* purple_account_request_add:
* @account: The account that was added.
* @remote_user: The name of the user that added this account.
--- a/libpurple/accounts.h Wed Jul 06 05:47:52 2022 -0500
+++ b/libpurple/accounts.h Mon Jul 18 20:46:36 2022 -0500
@@ -35,8 +35,6 @@
/**
* PurpleAccountUiOps:
- * @notify_added: A buddy who is already on this account's buddy list
- * added this account to their buddy list.
* @status_changed: This account's status changed.
* @request_add: Someone we don't have on our list added us; prompt
* to add them.
@@ -62,12 +60,6 @@
*/
struct _PurpleAccountUiOps
{
- void (*notify_added)(PurpleAccount *account,
- const char *remote_user,
- const char *id,
- const char *alias,
- const char *message);
-
void (*status_changed)(PurpleAccount *account,
PurpleStatus *status);
--- a/pidgin/gtkaccount.c Wed Jul 06 05:47:52 2022 -0500
+++ b/pidgin/gtkaccount.c Mon Jul 18 20:46:36 2022 -0500
@@ -1321,26 +1321,6 @@
}
static void
-pidgin_accounts_notify_added(PurpleAccount *account, const char *remote_user,
- const char *id, const char *alias,
- const char *msg)
-{
- char *buffer;
- PurpleConnection *gc;
- GtkWidget *alert;
-
- gc = purple_account_get_connection(account);
-
- buffer = make_info(account, gc, remote_user, id, alias, msg);
- alert = pidgin_mini_dialog_new_with_buttons(
- buffer, NULL, "dialog-information", NULL,
- _("Close"), NULL, NULL);
- pidgin_blist_add_alert(alert);
-
- g_free(buffer);
-}
-
-static void
pidgin_accounts_request_add(PurpleAccount *account, const char *remote_user,
const char *id, const char *alias,
const char *msg)
@@ -1582,7 +1562,6 @@
static PurpleAccountUiOps ui_ops =
{
- .notify_added = pidgin_accounts_notify_added,
.request_add = pidgin_accounts_request_add,
.request_authorize = pidgin_accounts_request_authorization,
.close_account_request = pidgin_accounts_request_close,