Moved the Mac Toolbox initialization from nsToolkit to nsAppShell, the reason being that nsAppShell is destined to be replaced by embedding applications while nsToolkit isn't.
git-svn-id: svn://10.0.0.236/trunk@15873 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -31,9 +31,18 @@
|
||||
#include "nsMacMessageSink.h" //¥¥¥ until this is moved into webshell(?)
|
||||
#include "nsMacMessagePump.h"
|
||||
#include "nsToolKit.h"
|
||||
#include <Quickdraw.h>
|
||||
#include <Fonts.h>
|
||||
#include <TextEdit.h>
|
||||
#include <Dialogs.h>
|
||||
#include <Traps.h>
|
||||
#include <Events.h>
|
||||
#include <Menus.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
PRBool nsAppShell::mInitializedToolbox = PR_FALSE;
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
@@ -112,6 +121,19 @@ NS_IMETHODIMP nsAppShell::Exit()
|
||||
//-------------------------------------------------------------------------
|
||||
nsAppShell::nsAppShell()
|
||||
{
|
||||
// once only, macintosh specific initialization
|
||||
if (mInitializedToolbox == PR_FALSE)
|
||||
{
|
||||
mInitializedToolbox = PR_TRUE;
|
||||
InitGraf(&qd.thePort);
|
||||
InitFonts();
|
||||
InitWindows();
|
||||
InitMenus();
|
||||
TEInit();
|
||||
InitDialogs(0);
|
||||
InitCursor();
|
||||
}
|
||||
|
||||
mRefCnt = 0;
|
||||
mExitCalled = PR_FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user