Mercurial > pidgin
comparison src/account.c @ 11985:41d84ac57cb6
[gaim-migrate @ 14278]
Getting some stuff out of my tree
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 05 Nov 2005 21:49:44 +0000 |
parents | 54a3eae03182 |
children | e4666705944b |
comparison
equal
deleted
inserted
replaced
11984:59494e5f7fdf | 11985:41d84ac57cb6 |
---|---|
876 | 876 |
877 if (gaim_conversation_get_account(conv) == account) | 877 if (gaim_conversation_get_account(conv) == account) |
878 gaim_conversation_set_account(conv, NULL); | 878 gaim_conversation_set_account(conv, NULL); |
879 } | 879 } |
880 | 880 |
881 if (account->username != NULL) g_free(account->username); | 881 g_free(account->username); |
882 if (account->alias != NULL) g_free(account->alias); | 882 g_free(account->alias); |
883 if (account->password != NULL) g_free(account->password); | 883 g_free(account->password); |
884 if (account->user_info != NULL) g_free(account->user_info); | 884 g_free(account->user_info); |
885 if (account->protocol_id != NULL) g_free(account->protocol_id); | 885 g_free(account->protocol_id); |
886 | 886 |
887 g_hash_table_destroy(account->settings); | 887 g_hash_table_destroy(account->settings); |
888 g_hash_table_destroy(account->ui_settings); | 888 g_hash_table_destroy(account->ui_settings); |
889 | 889 |
890 gaim_account_set_status_types(account, NULL); | 890 gaim_account_set_status_types(account, NULL); |
912 static void | 912 static void |
913 request_password_ok_cb(GaimAccount *account, GaimRequestFields *fields) | 913 request_password_ok_cb(GaimAccount *account, GaimRequestFields *fields) |
914 { | 914 { |
915 const char *entry; | 915 const char *entry; |
916 gboolean remember; | 916 gboolean remember; |
917 | 917 |
918 entry = gaim_request_fields_get_string(fields, "password"); | 918 entry = gaim_request_fields_get_string(fields, "password"); |
919 remember = gaim_request_fields_get_bool(fields, "remember"); | 919 remember = gaim_request_fields_get_bool(fields, "remember"); |
920 | 920 |
921 if (!entry || !*entry) | 921 if (!entry || !*entry) |
922 { | 922 { |
923 gaim_notify_error(account, NULL, _("Password is required to sign on."), NULL); | 923 gaim_notify_error(account, NULL, _("Password is required to sign on."), NULL); |
924 return; | 924 return; |
925 } | 925 } |
1069 _("Fill out all fields completely."), NULL); | 1069 _("Fill out all fields completely."), NULL); |
1070 return; | 1070 return; |
1071 } | 1071 } |
1072 | 1072 |
1073 gaim_account_change_password(account, orig_pass, new_pass_1); | 1073 gaim_account_change_password(account, orig_pass, new_pass_1); |
1074 gaim_account_set_password(account, new_pass_1); | |
1075 } | 1074 } |
1076 | 1075 |
1077 void | 1076 void |
1078 gaim_account_request_change_password(GaimAccount *account) | 1077 gaim_account_request_change_password(GaimAccount *account) |
1079 { | 1078 { |
2031 const char *new_pw) | 2030 const char *new_pw) |
2032 { | 2031 { |
2033 GaimPluginProtocolInfo *prpl_info = NULL; | 2032 GaimPluginProtocolInfo *prpl_info = NULL; |
2034 GaimConnection *gc = gaim_account_get_connection(account); | 2033 GaimConnection *gc = gaim_account_get_connection(account); |
2035 | 2034 |
2035 gaim_account_set_password(account, new_pw); | |
2036 | |
2036 if (gc != NULL && gc->prpl != NULL) | 2037 if (gc != NULL && gc->prpl != NULL) |
2037 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); | 2038 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); |
2038 | 2039 |
2039 if (prpl_info && g_list_find(gaim_connections_get_all(), gc) && prpl_info->change_passwd) | 2040 if (prpl_info && g_list_find(gaim_connections_get_all(), gc) && prpl_info->change_passwd) |
2040 prpl_info->change_passwd(gc, orig_pw, new_pw); | 2041 prpl_info->change_passwd(gc, orig_pw, new_pw); |
2041 } | 2042 } |
2042 | 2043 |
2043 void | 2044 void |
2044 gaim_accounts_add(GaimAccount *account) | 2045 gaim_accounts_add(GaimAccount *account) |
2045 { | 2046 { |
2046 g_return_if_fail(account != NULL); | 2047 g_return_if_fail(account != NULL); |