changeset 11976:e33a9171aceb

[gaim-migrate @ 14269] When upgrading from Gaim < 2.x Do The Right Thing with auto-login/enabled accounts (make them sign in as available just like they used to) committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Fri, 04 Nov 2005 19:18:39 +0000
parents aadf61b30056
children 0ea9a52fd333
files src/account.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/account.c	Fri Nov 04 19:15:05 2005 +0000
+++ b/src/account.c	Fri Nov 04 19:18:39 2005 +0000
@@ -678,6 +678,7 @@
 	char *protocol_id = NULL;
 	char *name = NULL;
 	char *data;
+	gboolean upgrade = FALSE;
 
 	child = xmlnode_get_child(node, "protocol");
 	if (child != NULL)
@@ -728,6 +729,8 @@
 	if (child != NULL)
 	{
 		parse_statuses(child, ret);
+	} else {
+		upgrade = TRUE;
 	}
 
 	/* Read the userinfo */
@@ -760,6 +763,10 @@
 		parse_proxy_info(child, ret);
 	}
 
+	if (upgrade && gaim_account_get_enabled(ret, gaim_core_get_ui())) {
+		gaim_presence_set_status_active(ret->presence, "available", TRUE);
+	}
+
 	return ret;
 }