fixed problems with PromptUsernameAndPassword when dialogs are turned off

This commit is contained in:
morse%netscape.com 1999-04-19 22:36:49 +00:00
Родитель cacde97da7
Коммит 2edd9f63e8
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -164,8 +164,8 @@ MyFE_PromptUsernameAndPassword
(char *msg, char **username, char **password) { (char *msg, char **username, char **password) {
if (!si_GetUsingDialogsPref()) { if (!si_GetUsingDialogsPref()) {
*username = "your name"; *username = PL_strdup("your name");
*password = "your password"; *password = PL_strdup("your password");
return PR_TRUE; return PR_TRUE;
} }
@ -1751,7 +1751,9 @@ si_LoadSignonData(PRBool fullLoad) {
if (fullLoad) { if (fullLoad) {
si_RestartKey(); si_RestartKey();
while (!si_SetKey()) { while (!si_SetKey()) {
if (!MyFE_Confirm("incorrect key -- do you want to try again?")) { if (!si_GetUsingDialogsPref()) {
return 1;
} else if (!MyFE_Confirm("incorrect key -- do you want to try again?")) {
MyFE_Confirm("Key failure -- password file will not be opened"); MyFE_Confirm("Key failure -- password file will not be opened");
return 1; return 1;
} }