changeset 11298:e26b3f52b6f2

[gaim-migrate @ 13498] When starting Gaim, restore the previous account presence for all enabled accounts. PRPLs will likely need changes to take advantage of this, and the gtkstatusselector still intializes to the "online" state. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 18 Aug 2005 05:07:33 +0000
parents 84d3f47e6258
children 421007f39e53
files src/account.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/account.c	Thu Aug 18 04:59:23 2005 +0000
+++ b/src/account.c	Thu Aug 18 05:07:33 2005 +0000
@@ -781,6 +781,12 @@
 		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);
+		}
 	}
 }
 
@@ -1258,7 +1264,7 @@
 	g_return_if_fail(ui      != NULL);
 
 	gaim_account_set_ui_bool(account, ui, "auto-login", value);
-	if (gaim_presence_is_online(account->presence))
+	if (value && gaim_presence_is_online(account->presence))
 		gaim_account_connect(account);
 }