Bug 92750 - Fizilla doesn't ask to save changes when quitting with Cmd-Q. r=brade/sr=sfraser

git-svn-id: svn://10.0.0.236/trunk@104417 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ccarlen%netscape.com
2001-10-02 14:50:29 +00:00
parent d852115c6f
commit 9229cf836e
6 changed files with 30 additions and 4 deletions

View File

@@ -60,6 +60,7 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
#include "nsIWindowWatcher.h"
#include "jsapi.h"
#include "nsReadableUtils.h"
#include "nsICloseAllWindows.h"
#include "nsAEEventHandling.h"
@@ -339,6 +340,17 @@ OSErr nsMacCommandLine::Quit(TAskSave askSave)
//----------------------------------------------------------------------------------------
{
nsresult rv;
nsCOMPtr<nsICloseAllWindows> closer =
do_CreateInstance("@mozilla.org/appshell/closeallwindows;1", &rv);
if (NS_FAILED(rv))
return errAEEventNotHandled;
PRBool doQuit;
rv = closer->CloseAll(askSave != eSaveNo, &doQuit);
if (NS_FAILED(rv) || !doQuit)
return errAEEventNotHandled;
nsCOMPtr<nsIAppShellService> appShellService =
do_GetService(kAppShellServiceCID, &rv);
if (NS_FAILED(rv))