Mercurial > pidgin
diff src/account.c @ 11348:efb358543b1d
[gaim-migrate @ 13565]
Two changes:
1. Fix the "enabled" button in the accounts editor so that unchecking it
will sign off an account. I broke this in one of my commits on
August 17th
2. Some changes from Thomas Butter to finishing initializing Gaim, and THEN
attempt to sign on accounts. This fixes problems with the crypto API
not yet being initialized.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 26 Aug 2005 04:38:36 +0000 |
parents | d3b567926e8f |
children | 9f521a61ef58 |
line wrap: on
line diff
--- a/src/account.c Fri Aug 26 03:21:03 2005 +0000 +++ b/src/account.c Fri Aug 26 04:38:36 2005 +0000 @@ -781,12 +781,6 @@ GaimAccount *new_acct; new_acct = parse_account(child); gaim_accounts_add(new_acct); - - if (gaim_account_get_enabled(new_acct, gaim_core_get_ui()) && - (gaim_presence_is_online(new_acct->presence))) - { - gaim_account_connect(new_acct); - } } } @@ -1295,6 +1289,8 @@ gaim_account_set_ui_bool(account, ui, "auto-login", value); if (value && gaim_presence_is_online(account->presence)) gaim_account_connect(account); + else if (!value && !gaim_account_is_disconnected(account)) + gaim_account_disconnect(account); } void @@ -2060,6 +2056,23 @@ } void +gaim_accounts_restore_previous_statuses() +{ + GList *l; + GaimAccount *account; + + for (l = gaim_accounts_get_all(); l != NULL; l = l->next) + { + account = (GaimAccount *)l->data; + if (gaim_account_get_enabled(account, gaim_core_get_ui()) && + (gaim_presence_is_online(account->presence))) + { + gaim_account_connect(account); + } + } +} + +void gaim_accounts_set_ui_ops(GaimAccountUiOps *ops) { account_ui_ops = ops;