fix bug31929 - wrong way to throw a message box; r=rhp

This commit is contained in:
jefft%netscape.com 2000-03-15 15:38:14 +00:00
Родитель 74470ca9fd
Коммит 3f40211291
2 изменённых файлов: 9 добавлений и 5 удалений

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

@ -50,4 +50,4 @@ MessageLoaded=Message loaded...
PrintingMessage=Printing message...
PrintingComplete=Printing complete.
saveAttachmentFailed=Unable to save the attachment. Please check your file name and try again later.
saveMessageFailed=Unable to save the message. Please check your file name and try again later.>>>>>>> 1.6
saveMessageFailed=Unable to save the message. Please check your file name and try again later.

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

@ -789,12 +789,16 @@ done:
nsresult
nsMessenger::Alert(const char *stringName)
{
nsresult rv;
nsresult rv = NS_OK;
nsString errorMessage = GetString(nsString(stringName).GetUnicode());
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(mWebShell));
if (docShell)
{
nsCOMPtr<nsIPrompt> dialog(do_GetInterface(docShell));
NS_WITH_SERVICE(nsIPrompt, dialog, kNetSupportDialogCID, &rv);
if (NS_SUCCEEDED(rv))
rv = dialog->Alert(errorMessage.GetUnicode());
if (dialog)
rv = dialog->Alert(errorMessage.GetUnicode());
}
return rv;
}