comparison src/account.c @ 11562:9f521a61ef58

[gaim-migrate @ 13828] More tiny changes. Forward port my saving password through failed connections change, and attach to the Message Send signal of the statusbox imhtml, so that hitting Enter sets the message immediately. I like the timeout; but this will probably make more sense to most people. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Wed, 21 Sep 2005 22:57:10 +0000
parents efb358543b1d
children 4b7fb30b8926
comparison
equal deleted inserted replaced
11561:71945305a87e 11562:9f521a61ef58
913 gaim_notify_error(account, NULL, _("Password is required to sign on."), NULL); 913 gaim_notify_error(account, NULL, _("Password is required to sign on."), NULL);
914 return; 914 return;
915 } 915 }
916 916
917 if(remember) 917 if(remember)
918 gaim_account_set_remember_password(account, TRUE); 918 gaim_account_set_remember_password(account, TRUE);
919 919
920 if (gaim_account_get_remember_password(account)) 920 gaim_account_set_password(account, entry);
921 gaim_account_set_password(account, entry);
922 921
923 gaim_connection_new(account, FALSE, entry); 922 gaim_connection_new(account, FALSE, entry);
924 } 923 }
925 924
926 static void 925 static void
1008 1007
1009 account->disconnecting = TRUE; 1008 account->disconnecting = TRUE;
1010 1009
1011 gc = gaim_account_get_connection(account); 1010 gc = gaim_account_get_connection(account);
1012 gaim_connection_destroy(gc); 1011 gaim_connection_destroy(gc);
1012 if (!gaim_account_get_remember_password(account))
1013 gaim_account_set_password(account, NULL);
1013 gaim_account_set_connection(account, NULL); 1014 gaim_account_set_connection(account, NULL);
1014 1015
1015 account->disconnecting = FALSE; 1016 account->disconnecting = FALSE;
1016 } 1017 }
1017 1018
1166 { 1167 {
1167 g_return_if_fail(account != NULL); 1168 g_return_if_fail(account != NULL);
1168 1169
1169 g_free(account->password); 1170 g_free(account->password);
1170 account->password = NULL; 1171 account->password = NULL;
1171
1172 if (!gaim_account_get_remember_password(account))
1173 return;
1174
1175 account->password = (password == NULL ? NULL : g_strdup(password)); 1172 account->password = (password == NULL ? NULL : g_strdup(password));
1176 1173
1177 schedule_accounts_save(); 1174 schedule_accounts_save();
1178 } 1175 }
1179 1176