Fix for incorrect error notification on Copy failures - Bug #: 41504 - r: bienvenu

This commit is contained in:
rhp%netscape.com 2000-07-28 00:18:56 +00:00
Родитель 15a59d37c9
Коммит f86f929e73
1 изменённых файлов: 19 добавлений и 15 удалений

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

@ -2683,7 +2683,6 @@ nsMsgComposeAndSend::DeliverMessage()
{
Fail(NS_ERROR_BUT_DONT_SHOW_ALERT, printfString);
PR_FREEIF(printfString);
NotifyListenersOnStopCopy(NS_ERROR_FAILURE);
return NS_ERROR_FAILURE;
}
else
@ -3067,20 +3066,6 @@ nsMsgComposeAndSend::DoFcc()
// If we hit here, the copy operation FAILED and we should at least tell the
// user that it did fail but the send operation has already succeeded.
//
PRBool oopsGiveMeBackTheComposeWindow = PR_FALSE;
nsXPIDLString eMsg;
mComposeBundle->GetStringByID(NS_MSG_FAILED_COPY_OPERATION, getter_Copies(eMsg));
Fail(NS_ERROR_BUT_DONT_SHOW_ALERT, eMsg);
if (mGUINotificationEnabled)
{
nsMsgAskBooleanQuestionByString(eMsg, &oopsGiveMeBackTheComposeWindow);
if (!oopsGiveMeBackTheComposeWindow)
rv = NS_OK;
}
NotifyListenersOnStopCopy(rv);
}
@ -3348,6 +3333,25 @@ nsMsgComposeAndSend::NotifyListenersOnStopCopy(nsresult aStatus)
return NS_OK;
}
}
else if (NS_FAILED(aStatus))
{
//
// If we hit here, the ASYNC copy operation FAILED and we should at least tell the
// user that it did fail but the send operation has already succeeded.
//
PRBool oopsGiveMeBackTheComposeWindow = PR_FALSE;
nsXPIDLString eMsg;
mComposeBundle->GetStringByID(NS_MSG_FAILED_COPY_OPERATION, getter_Copies(eMsg));
Fail(NS_ERROR_BUT_DONT_SHOW_ALERT, eMsg);
if (mGUINotificationEnabled)
{
nsMsgAskBooleanQuestionByString(eMsg, &oopsGiveMeBackTheComposeWindow);
if (!oopsGiveMeBackTheComposeWindow)
aStatus = NS_OK;
}
}
// If we are here, its real cleanup time!
for (i=0; i<mListenerArrayCount; i++)