Mercurial > pidgin
comparison src/account.c @ 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 | 0fab529c01fc |
children | 717cbb3115bc |
comparison
equal
deleted
inserted
replaced
11975:aadf61b30056 | 11976:e33a9171aceb |
---|---|
676 GaimAccount *ret; | 676 GaimAccount *ret; |
677 xmlnode *child; | 677 xmlnode *child; |
678 char *protocol_id = NULL; | 678 char *protocol_id = NULL; |
679 char *name = NULL; | 679 char *name = NULL; |
680 char *data; | 680 char *data; |
681 gboolean upgrade = FALSE; | |
681 | 682 |
682 child = xmlnode_get_child(node, "protocol"); | 683 child = xmlnode_get_child(node, "protocol"); |
683 if (child != NULL) | 684 if (child != NULL) |
684 protocol_id = xmlnode_get_data(child); | 685 protocol_id = xmlnode_get_data(child); |
685 | 686 |
726 /* Read the statuses */ | 727 /* Read the statuses */ |
727 child = xmlnode_get_child(node, "statuses"); | 728 child = xmlnode_get_child(node, "statuses"); |
728 if (child != NULL) | 729 if (child != NULL) |
729 { | 730 { |
730 parse_statuses(child, ret); | 731 parse_statuses(child, ret); |
732 } else { | |
733 upgrade = TRUE; | |
731 } | 734 } |
732 | 735 |
733 /* Read the userinfo */ | 736 /* Read the userinfo */ |
734 child = xmlnode_get_child(node, "userinfo"); | 737 child = xmlnode_get_child(node, "userinfo"); |
735 if ((child != NULL) && ((data = xmlnode_get_data(child)) != NULL)) | 738 if ((child != NULL) && ((data = xmlnode_get_data(child)) != NULL)) |
756 /* Read proxy */ | 759 /* Read proxy */ |
757 child = xmlnode_get_child(node, "proxy"); | 760 child = xmlnode_get_child(node, "proxy"); |
758 if (child != NULL) | 761 if (child != NULL) |
759 { | 762 { |
760 parse_proxy_info(child, ret); | 763 parse_proxy_info(child, ret); |
764 } | |
765 | |
766 if (upgrade && gaim_account_get_enabled(ret, gaim_core_get_ui())) { | |
767 gaim_presence_set_status_active(ret->presence, "available", TRUE); | |
761 } | 768 } |
762 | 769 |
763 return ret; | 770 return ret; |
764 } | 771 } |
765 | 772 |