pidgin/pidgin

Parents 1692f596a13d
Children b41d37dbf129
Port finch from the purple_protocols api to the purple_protocol_manager api

Testing Done:
Compile only.

Bugs closed: PIDGIN-17473

Reviewed at https://reviews.imfreedom.org/r/534/
--- a/finch/gntaccount.c Tue Mar 02 23:27:31 2021 -0600
+++ b/finch/gntaccount.c Tue Mar 02 23:30:05 2021 -0600
@@ -520,6 +520,7 @@
GList *list, *iter;
AccountEditDialog *dialog;
PurpleProtocol *protocol;
+ PurpleProtocolManager *protocol_manager = NULL;
gchar *password = NULL;
password = purple_credential_manager_read_password_finish(manager, res,
@@ -536,7 +537,8 @@
}
}
- list = purple_protocols_get_all();
+ protocol_manager = purple_protocol_manager_get_default();
+ list = purple_protocol_manager_get_all(protocol_manager);
if (list == NULL) {
purple_notify_error(NULL, _("Error"),
_("There are no protocols installed."),
@@ -568,7 +570,7 @@
purple_protocol_get_name(PURPLE_PROTOCOL(iter->data)));
}
- protocol = purple_protocols_find(purple_account_get_protocol_id(account));
+ protocol = purple_account_get_protocol(account);
if (account && protocol)
gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), protocol);
--- a/finch/gntblist.c Tue Mar 02 23:27:31 2021 -0600
+++ b/finch/gntblist.c Tue Mar 02 23:30:05 2021 -0600
@@ -1287,7 +1287,7 @@
PurpleProtocol *protocol = NULL;
type = PURPLE_LOG_CHAT;
account = purple_chat_get_account(c);
- protocol = purple_protocols_find(purple_account_get_protocol_id(account));
+ protocol = purple_account_get_protocol(account);
if (protocol) {
name = purple_protocol_chat_get_name(PURPLE_PROTOCOL_CHAT(protocol), purple_chat_get_components(c));
}
@@ -1608,7 +1608,7 @@
purple_notify_user_info_add_pair_plaintext(user_info, _("Account"), tmp);
g_free(tmp);
- protocol = purple_protocols_find(purple_account_get_protocol_id(account));
+ protocol = purple_account_get_protocol(account);
if (protocol) {
purple_protocol_client_tooltip_text(PURPLE_PROTOCOL_CLIENT(protocol), buddy, user_info, full);
}
--- a/finch/gntlog.c Tue Mar 02 23:27:31 2021 -0600
+++ b/finch/gntlog.c Tue Mar 02 23:30:05 2021 -0600
@@ -503,7 +503,7 @@
for(accounts = purple_accounts_get_all(); accounts != NULL; accounts = accounts->next) {
PurpleAccount *account = (PurpleAccount *)accounts->data;
- if(purple_protocols_find(purple_account_get_protocol_id(account)) == NULL)
+ if(purple_account_get_protocol(account) == NULL)
continue;
logs = g_list_concat(purple_log_get_system_logs(account), logs);