--- a/ChangeLog.API Sun Oct 09 00:41:50 2022 -0500
+++ b/ChangeLog.API Sun Oct 09 01:48:50 2022 -0500
@@ -944,6 +944,7 @@
* pidgin_cell_renderer_expander_new
+ * pidgin_connection_get_handle * PidginConvPlacementFunc
* pidgin_conv_get_tab_at_xy
--- a/finch/gntaccount.c Sun Oct 09 00:41:50 2022 -0500
+++ b/finch/gntaccount.c Sun Oct 09 01:48:50 2022 -0500
@@ -255,9 +255,9 @@
- /* In case of a new account, the 'Accounts' window is updated from the account-added
- * callback. In case of changes in an existing account, we need to explicitly do it
+ /* In case of a new account, the 'Accounts' window is updated from the + * 'added' callback. In case of changes in an existing account, we need to + * explicitly do it here. if (dialog->account != NULL && accounts.window) {
gnt_tree_change_text(GNT_TREE(accounts.tree), dialog->account,
@@ -861,7 +861,8 @@
-account_added_callback(PurpleAccount *account)
+account_added_callback(G_GNUC_UNUSED PurpleAccountManager *manager, + PurpleAccount *account, G_GNUC_UNUSED gpointer data) if (accounts.window == NULL)
@@ -870,7 +871,8 @@
-account_removed_callback(PurpleAccount *account)
+account_removed_callback(G_GNUC_UNUSED PurpleAccountManager *manager, + PurpleAccount *account, G_GNUC_UNUSED gpointer data) if (accounts.window == NULL)
@@ -890,22 +892,23 @@
void finch_accounts_init()
PurpleAccountManager *manager = NULL;
+ gpointer account_handle = NULL; - purple_signal_connect(purple_accounts_get_handle(), "account-added",
- finch_accounts_get_handle(), G_CALLBACK(account_added_callback),
- purple_signal_connect(purple_accounts_get_handle(), "account-removed",
- finch_accounts_get_handle(), G_CALLBACK(account_removed_callback),
- purple_signal_connect(purple_accounts_get_handle(), "account-disabled",
+ manager = purple_account_manager_get_default(); + account_handle = purple_accounts_get_handle(); + g_signal_connect(manager, "added", G_CALLBACK(account_added_callback), + g_signal_connect(manager, "removed", G_CALLBACK(account_removed_callback), + purple_signal_connect(account_handle, "account-disabled", finch_accounts_get_handle(),
G_CALLBACK(account_abled_cb), GINT_TO_POINTER(FALSE));
- purple_signal_connect(purple_accounts_get_handle(), "account-enabled",
+ purple_signal_connect(account_handle, "account-enabled", finch_accounts_get_handle(),
G_CALLBACK(account_abled_cb), GINT_TO_POINTER(TRUE));
- manager = purple_account_manager_get_default();
iter = purple_account_manager_get_all(manager);
for (; iter; iter = iter->next) {
--- a/finch/gntconn.c Sun Oct 09 00:41:50 2022 -0500
+++ b/finch/gntconn.c Sun Oct 09 01:48:50 2022 -0500
@@ -108,19 +108,12 @@
-account_removed_cb(PurpleAccount *account, gpointer user_data)
+account_removed_cb(G_GNUC_UNUSED PurpleAccountManager *manager, + PurpleAccount *account, G_GNUC_UNUSED gpointer data) g_hash_table_remove(hash, account);
-finch_connection_get_handle(void)
static PurpleConnectionUiOps ops = {
.report_disconnect = finch_connection_report_disconnect,
@@ -132,17 +125,21 @@
void finch_connections_init()
+ PurpleAccountManager *manager = purple_account_manager_get_default(); hash = g_hash_table_new_full(
g_direct_hash, g_direct_equal,
- purple_signal_connect(purple_accounts_get_handle(), "account-removed",
- finch_connection_get_handle(),
- G_CALLBACK(account_removed_cb), NULL);
+ g_signal_connect(manager, "removed", G_CALLBACK(account_removed_cb), NULL); void finch_connections_uninit()
- purple_signals_disconnect_by_handle(finch_connection_get_handle());
+ PurpleAccountManager *manager = purple_account_manager_get_default(); + g_signal_handlers_disconnect_by_func(manager, + G_CALLBACK(account_removed_cb), NULL); g_hash_table_destroy(hash);
--- a/libpurple/savedstatuses.c Sun Oct 09 00:41:50 2022 -0500
+++ b/libpurple/savedstatuses.c Sun Oct 09 01:48:50 2022 -0500
@@ -683,8 +683,9 @@
* exist for this account.
-purple_savedstatus_unset_all_substatuses(PurpleAccount *account,
+purple_savedstatus_unset_all_substatuses(G_GNUC_UNUSED PurpleAccountManager *manager, + PurpleAccount *account, + G_GNUC_UNUSED gpointer data) g_return_if_fail(account != NULL);
@@ -1204,6 +1205,7 @@
purple_savedstatuses_init(void)
+ PurpleAccountManager *manager = purple_account_manager_get_default(); void *handle = purple_savedstatuses_get_handle();
creation_times = g_hash_table_new(g_direct_hash, g_direct_equal);
@@ -1240,15 +1242,15 @@
purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
PURPLE_TYPE_SAVEDSTATUS);
- purple_signal_connect(purple_accounts_get_handle(), "account-removed",
- G_CALLBACK(purple_savedstatus_unset_all_substatuses),
+ g_signal_connect(manager, "removed", + G_CALLBACK(purple_savedstatus_unset_all_substatuses), purple_savedstatuses_uninit(void)
+ PurpleAccountManager *manager = purple_account_manager_get_default(); gpointer handle = purple_savedstatuses_get_handle();
remove_old_transient_statuses();
@@ -1266,6 +1268,9 @@
g_hash_table_destroy(creation_times);
+ g_signal_handlers_disconnect_by_func(manager, + G_CALLBACK(purple_savedstatus_unset_all_substatuses), purple_signals_unregister_by_instance(handle);
purple_signals_disconnect_by_handle(handle);
--- a/pidgin/gtkconn.c Sun Oct 09 00:41:50 2022 -0500
+++ b/pidgin/gtkconn.c Sun Oct 09 01:48:50 2022 -0500
@@ -179,7 +179,8 @@
-account_removed_cb(PurpleAccount *account, gpointer user_data)
+account_removed_cb(G_GNUC_UNUSED PurpleAccountManager *manager, + PurpleAccount *account, G_GNUC_UNUSED gpointer data) g_hash_table_remove(auto_reconns, account);
@@ -189,30 +190,25 @@
**************************************************************************/
-pidgin_connection_get_handle(void)
pidgin_connection_init(void)
+ PurpleAccountManager *manager = purple_account_manager_get_default(); auto_reconns = g_hash_table_new_full(
g_direct_hash, g_direct_equal,
- purple_signal_connect(purple_accounts_get_handle(), "account-removed",
- pidgin_connection_get_handle(),
- G_CALLBACK(account_removed_cb), NULL);
+ g_signal_connect(manager, "removed", G_CALLBACK(account_removed_cb), NULL); pidgin_connection_uninit(void)
- purple_signals_disconnect_by_handle(pidgin_connection_get_handle());
+ PurpleAccountManager *manager = purple_account_manager_get_default(); + g_signal_handlers_disconnect_by_func(manager, + G_CALLBACK(account_removed_cb), NULL); g_hash_table_destroy(auto_reconns);
--- a/pidgin/gtkconn.h Sun Oct 09 00:41:50 2022 -0500
+++ b/pidgin/gtkconn.h Sun Oct 09 01:48:50 2022 -0500
@@ -42,15 +42,6 @@
PurpleConnectionUiOps *pidgin_connections_get_ui_ops(void);
- * pidgin_connection_get_handle:
- * Returns the GTK connection handle.
- * Returns: The handle to the GTK connection system.
-void *pidgin_connection_get_handle(void);
* pidgin_connection_init:
* Initializes the GTK connection system.
--- a/pidgin/gtkutils.c Sun Oct 09 00:41:50 2022 -0500
+++ b/pidgin/gtkutils.c Sun Oct 09 01:48:50 2022 -0500
@@ -364,24 +364,49 @@
-buddyname_autocomplete_destroyed_cb(GtkWidget *widget, gpointer data)
+repopulate_autocomplete(gpointer something, gpointer data)
- purple_signals_disconnect_by_handle(widget);
+ add_completion_list(data); +autocomplete_account_added_cb(G_GNUC_UNUSED PurpleAccountManager *manager, + G_GNUC_UNUSED PurpleAccount *account, + add_completion_list(data); -repopulate_autocomplete(gpointer something, gpointer data)
+autocomplete_account_removed_cb(G_GNUC_UNUSED PurpleAccountManager *manager, + G_GNUC_UNUSED PurpleAccount *account, add_completion_list(data);
+buddyname_autocomplete_destroyed_cb(GtkWidget *widget, gpointer data) + PurpleAccountManager *manager = purple_account_manager_get_default(); + purple_signals_disconnect_by_handle(widget); + g_signal_handlers_disconnect_by_func(manager, + G_CALLBACK(autocomplete_account_added_cb), data); + g_signal_handlers_disconnect_by_func(manager, + G_CALLBACK(autocomplete_account_removed_cb), data); pidgin_setup_screenname_autocomplete(
GtkWidget *entry, GtkWidget *chooser,
PidginFilterBuddyCompletionEntryFunc filter_func, gpointer user_data)
PidginCompletionData *data;
+ PurpleAccountManager *manager = NULL; * Store the displayed completion value, the buddy name, the UTF-8
@@ -434,10 +459,11 @@
purple_signal_connect(purple_connections_get_handle(), "signed-off", entry,
G_CALLBACK(repopulate_autocomplete), data);
- purple_signal_connect(purple_accounts_get_handle(), "account-added", entry,
- G_CALLBACK(repopulate_autocomplete), data);
- purple_signal_connect(purple_accounts_get_handle(), "account-removed", entry,
- G_CALLBACK(repopulate_autocomplete), data);
+ manager = purple_account_manager_get_default(); + g_signal_connect(manager, "added", + G_CALLBACK(autocomplete_account_added_cb), data); + g_signal_connect(manager, "removed", + G_CALLBACK(autocomplete_account_removed_cb), data); g_signal_connect(G_OBJECT(entry), "destroy", G_CALLBACK(buddyname_autocomplete_destroyed_cb), data);
--- a/pidgin/pidginaccountstore.c Sun Oct 09 00:41:50 2022 -0500
+++ b/pidgin/pidginaccountstore.c Sun Oct 09 01:48:50 2022 -0500
@@ -79,16 +79,6 @@
-pidgin_account_store_add_accounts(PidginAccountStore *store) {
- PurpleAccountManager *manager = NULL;
- manager = purple_account_manager_get_default();
- purple_account_manager_foreach(manager,
- pidgin_account_store_add_account_helper,
pidgin_account_store_remove_account(PidginAccountStore *store,
@@ -126,14 +116,16 @@
*****************************************************************************/
-pidgin_account_store_account_added_cb(PurpleAccount *account,
+pidgin_account_store_account_added_cb(G_GNUC_UNUSED PurpleAccountManager *manager, + PurpleAccount *account, pidgin_account_store_add_account(PIDGIN_ACCOUNT_STORE(data), account);
-pidgin_account_store_account_removed_cb(PurpleAccount *account,
+pidgin_account_store_account_removed_cb(G_GNUC_UNUSED PurpleAccountManager *manager, + PurpleAccount *account, pidgin_account_store_remove_account(PIDGIN_ACCOUNT_STORE(data), account);
@@ -146,7 +138,7 @@
pidgin_account_store_init(PidginAccountStore *store) {
- gpointer accounts_handle = NULL;
+ PurpleAccountManager *manager = NULL; GType types[PIDGIN_ACCOUNT_STORE_N_COLUMNS] = {
@@ -160,16 +152,18 @@
/* add the known accounts */
- pidgin_account_store_add_accounts(store);
+ manager = purple_account_manager_get_default(); + purple_account_manager_foreach(manager, + pidgin_account_store_add_account_helper, /* add the signal handlers to dynamically add/remove accounts */
- accounts_handle = purple_accounts_get_handle();
- purple_signal_connect(accounts_handle, "account-added", store,
- G_CALLBACK(pidgin_account_store_account_added_cb),
- purple_signal_connect(accounts_handle, "account-removed", store,
- G_CALLBACK(pidgin_account_store_account_removed_cb),
+ g_signal_connect_object(manager, "added", + G_CALLBACK(pidgin_account_store_account_added_cb), + g_signal_connect_object(manager, "removed", + G_CALLBACK(pidgin_account_store_account_removed_cb),