Mercurial > pidgin.yaz
comparison src/account.c @ 10758:c80a609bd747
[gaim-migrate @ 12361]
A few other minor changes.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 27 Mar 2005 22:48:04 +0000 |
parents | 8a97b59f0071 |
children | f93ed7f6ecc7 |
comparison
equal
deleted
inserted
replaced
10757:bb6fea81e770 | 10758:c80a609bd747 |
---|---|
765 gaim_account_set_password(account, entry); | 765 gaim_account_set_password(account, entry); |
766 | 766 |
767 gaim_connection_new(account, FALSE, entry); | 767 gaim_connection_new(account, FALSE, entry); |
768 } | 768 } |
769 | 769 |
770 /* | |
771 * TODO: Make the entry box a required field, and add a | |
772 * "save password" checkbox. | |
773 */ | |
770 static void | 774 static void |
771 request_password(GaimAccount *account) | 775 request_password(GaimAccount *account) |
772 { | 776 { |
773 gchar *primary; | 777 gchar *primary; |
774 gchar *escaped; | 778 gchar *escaped; |
775 const gchar *username; | 779 const gchar *username; |
780 | |
781 /* Close any previous password request windows */ | |
782 gaim_request_close_with_handle(account); | |
776 | 783 |
777 username = gaim_account_get_username(account); | 784 username = gaim_account_get_username(account); |
778 escaped = g_markup_escape_text(username, strlen(username)); | 785 escaped = g_markup_escape_text(username, strlen(username)); |
779 primary = g_strdup_printf(_("Enter password for %s (%s)"), escaped, | 786 primary = g_strdup_printf(_("Enter password for %s (%s)"), escaped, |
780 gaim_account_get_protocol_name(account)); | 787 gaim_account_get_protocol_name(account)); |
803 { | 810 { |
804 gchar *message; | 811 gchar *message; |
805 | 812 |
806 message = g_strdup_printf(_("Missing protocol plugin for %s"), | 813 message = g_strdup_printf(_("Missing protocol plugin for %s"), |
807 gaim_account_get_username(account)); | 814 gaim_account_get_username(account)); |
808 gaim_notify_error(NULL, _("Connection Error"), message, NULL); | 815 gaim_notify_error(account, _("Connection Error"), message, NULL); |
809 g_free(message); | 816 g_free(message); |
810 return; | 817 return; |
811 } | 818 } |
812 | 819 |
813 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl); | 820 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl); |
864 new_pass_1 = gaim_request_fields_get_string(fields, "new_password_1"); | 871 new_pass_1 = gaim_request_fields_get_string(fields, "new_password_1"); |
865 new_pass_2 = gaim_request_fields_get_string(fields, "new_password_2"); | 872 new_pass_2 = gaim_request_fields_get_string(fields, "new_password_2"); |
866 | 873 |
867 if (g_utf8_collate(new_pass_1, new_pass_2)) | 874 if (g_utf8_collate(new_pass_1, new_pass_2)) |
868 { | 875 { |
869 gaim_notify_error(NULL, NULL, | 876 gaim_notify_error(account, NULL, |
870 _("New passwords do not match."), NULL); | 877 _("New passwords do not match."), NULL); |
871 | 878 |
872 return; | 879 return; |
873 } | 880 } |
874 | 881 |
875 if (orig_pass == NULL || new_pass_1 == NULL || new_pass_2 == NULL || | 882 if (orig_pass == NULL || new_pass_1 == NULL || new_pass_2 == NULL || |
876 *orig_pass == '\0' || *new_pass_1 == '\0' || *new_pass_2 == '\0') | 883 *orig_pass == '\0' || *new_pass_1 == '\0' || *new_pass_2 == '\0') |
877 { | 884 { |
878 gaim_notify_error(NULL, NULL, | 885 gaim_notify_error(account, NULL, |
879 _("Fill out all fields completely."), NULL); | 886 _("Fill out all fields completely."), NULL); |
880 return; | 887 return; |
881 } | 888 } |
882 | 889 |
883 serv_change_passwd(gaim_account_get_connection(account), | 890 serv_change_passwd(gaim_account_get_connection(account), |
1695 { | 1702 { |
1696 GaimBlistNode *gnode, *cnode, *bnode; | 1703 GaimBlistNode *gnode, *cnode, *bnode; |
1697 | 1704 |
1698 g_return_if_fail(account != NULL); | 1705 g_return_if_fail(account != NULL); |
1699 | 1706 |
1707 gaim_notify_close_with_handle(account); | |
1708 gaim_request_close_with_handle(account); | |
1709 | |
1700 gaim_accounts_remove(account); | 1710 gaim_accounts_remove(account); |
1701 | 1711 |
1702 /* Remove this account's buddies */ | 1712 /* Remove this account's buddies */ |
1703 for (gnode = gaim_get_blist()->root; gnode != NULL; gnode = gnode->next) { | 1713 for (gnode = gaim_get_blist()->root; gnode != NULL; gnode = gnode->next) { |
1704 if (!GAIM_BLIST_NODE_IS_GROUP(gnode)) | 1714 if (!GAIM_BLIST_NODE_IS_GROUP(gnode)) |