Fix for failing silently if prefs arent set - Bug 39872 - r: sspitzer

This commit is contained in:
rhp%netscape.com 2000-05-20 02:06:15 +00:00
Родитель 397c363d61
Коммит ad545fe55f
3 изменённых файлов: 11 добавлений и 0 удалений

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

@ -31,6 +31,7 @@ syncAuthSuccess=Synchronization authentication complete.
syncAuthFailed=Synchronization authentication failed. syncAuthFailed=Synchronization authentication failed.
syncInvalidResponse=The server returned invalid response! syncInvalidResponse=The server returned invalid response!
syncServerError=The server returned the error: %s syncServerError=The server returned the error: %s
syncNeedPrefs=You need to fill in your Address Book Synchronization preferences before attempting a synchronization operation.
passwordPrompt=Enter your AIM Screen Name and Password for Address Book Synchronization passwordPrompt=Enter your AIM Screen Name and Password for Address Book Synchronization
passwordTitle=Enter Password passwordTitle=Enter Password
passwordError=You must enter a valid screen name and password for Address Book Synchronization passwordError=You must enter a valid screen name and password for Address Book Synchronization

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

@ -198,6 +198,11 @@ NS_IMETHODIMP nsAbSyncDriver::KickIt(nsIMsgStatusFeedback *aStatus)
PR_FREEIF(msgValue); PR_FREEIF(msgValue);
} }
} }
else
{
// We failed, turn the button back on...
mStatus->StopMeteors();
}
return rv; return rv;
} }

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

@ -537,6 +537,11 @@ NS_IMETHODIMP nsAbSync::PerformAbSync(PRInt32 *aTransactionID)
// Did we get sane values... // Did we get sane values...
if (!mAbSyncServer) if (!mAbSyncServer)
{ {
// If we get here, we need to put up a UI warning
PRUnichar *outValue = GetString(NS_ConvertASCIItoUCS2("syncNeedPrefs").GetUnicode());
DisplayErrorMessage(outValue);
PR_FREEIF(outValue);
rv = NS_ERROR_FAILURE; rv = NS_ERROR_FAILURE;
goto EarlyExit; goto EarlyExit;
} }