8673 ShutDown() should try to close all open windows.

This commit is contained in:
davidm%netscape.com 1999-11-03 05:28:02 +00:00
Родитель 48d3aeccb5
Коммит 1f0a7ff024
4 изменённых файлов: 13 добавлений и 11 удалений

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

@ -1427,15 +1427,15 @@ nsEditorShell::SaveAs()
}
NS_IMETHODIMP
nsEditorShell::CloseWindow()
nsEditorShell::CloseWindow( PRBool *_retval )
{
nsresult rv = NS_OK;
PRBool result;
rv = CheckAndSaveDocument(GetString("BeforeClosing").GetUnicode(),&result);
rv = CheckAndSaveDocument(GetString("BeforeClosing").GetUnicode(),_retval);
// Don't close the window if there was an error saving file or
// user canceled an action along the way
if (NS_SUCCEEDED(rv) && result)
if (NS_SUCCEEDED(rv) && *_retval)
mWebShellWin->Close();
return rv;

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

@ -1427,15 +1427,15 @@ nsEditorShell::SaveAs()
}
NS_IMETHODIMP
nsEditorShell::CloseWindow()
nsEditorShell::CloseWindow( PRBool *_retval )
{
nsresult rv = NS_OK;
PRBool result;
rv = CheckAndSaveDocument(GetString("BeforeClosing").GetUnicode(),&result);
rv = CheckAndSaveDocument(GetString("BeforeClosing").GetUnicode(),_retval);
// Don't close the window if there was an error saving file or
// user canceled an action along the way
if (NS_SUCCEEDED(rv) && result)
if (NS_SUCCEEDED(rv) && *_retval)
mWebShellWin->Close();
return rv;

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

@ -120,7 +120,7 @@ interface nsIEditorShell : nsISupports
*/
boolean CheckAndSaveDocument(in wstring reasonToSave);
void CloseWindow();
boolean CloseWindow();
void Print();
void Exit();

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

@ -47,6 +47,7 @@ function EditorOnLoad() {
}
// Continue with normal startup.
EditorStartup( 'html', document.getElementById("content-frame"));
window.tryToClose = EditorClose;
return;
}
@ -251,7 +252,7 @@ function EditorPrint()
function EditorClose()
{
dump("In EditorClose...\n");
editorShell.CloseWindow();
return editorShell.CloseWindow();
// This doesn't work, but we can close
// the window in the EditorAppShell, so we don't need it
//window.close();
@ -1251,7 +1252,8 @@ function EditorUnitTests()
function EditorExit()
{
dump("Exiting\n");
editorShell.Exit();
// editorShell.Exit();
goQuitApplication();
}
function EditorTestDocument()