diff options
author | Gary Kramlich <grim@reaperworld.com> | 2022-05-20 01:34:32 -0500 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2022-05-20 01:34:32 -0500 |
commit | 3436319912420c41427b826017bc528c5138c074 (patch) | |
tree | c6e08a402bb2df1eb992dad3b737a726147f7ad5 /libpurple/accounts.c | |
parent | a18eaf9f345b7acb445a21249bc0410923b931d5 (diff) | |
download | pidgin-3436319912420c41427b826017bc528c5138c074.tar.gz |
Remove the ui parameter from purple_account_[gs]et_enabled
Testing Done:
Enabled and disabled the demo account a bunch of times, including restarts, and the like.
Reviewed at https://reviews.imfreedom.org/r/1458/
Diffstat (limited to 'libpurple/accounts.c')
-rw-r--r-- | libpurple/accounts.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libpurple/accounts.c b/libpurple/accounts.c index e586b5f687..3c09fccdde 100644 --- a/libpurple/accounts.c +++ b/libpurple/accounts.c @@ -326,6 +326,7 @@ parse_account(PurpleXmlNode *node) char *protocol_id = NULL; char *name = NULL; char *data; + gboolean enabled = FALSE; child = purple_xmlnode_get_child(node, "id"); if(child != NULL) { @@ -347,6 +348,11 @@ parse_account(PurpleXmlNode *node) name = purple_xmlnode_get_data(child); } + child = purple_xmlnode_get_child(node, "enabled"); + if(child != NULL) { + enabled = atoi(purple_xmlnode_get_data(child)); + } + if ((protocol_id == NULL) || (name == NULL)) { g_free(id); @@ -362,6 +368,7 @@ parse_account(PurpleXmlNode *node) "id", id, "username", name, "protocol-id", protocol_id, + "enabled", enabled, NULL); g_free(id); @@ -493,7 +500,7 @@ purple_accounts_delete(PurpleAccount *account) * account for all UIs rather than the just the current UI, * but it doesn't really matter. */ - purple_account_set_enabled(account, purple_core_get_ui(), FALSE); + purple_account_set_enabled(account, FALSE); purple_notify_close_with_handle(account); purple_request_close_with_handle(account); @@ -568,7 +575,7 @@ purple_accounts_restore_current_status(PurpleAccount *account, G_GNUC_UNUSED gpointer data) { gboolean enabled = FALSE, online = FALSE; - enabled = purple_account_get_enabled(account, purple_core_get_ui()); + enabled = purple_account_get_enabled(account); online = purple_presence_is_online(purple_account_get_presence(account)); if(enabled && online) { |