This commit is contained in:
scullin 1998-07-13 23:38:08 +00:00
Родитель bd6ea77124
Коммит d117ff34fb
4 изменённых файлов: 21 добавлений и 5 удалений

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

@ -24,7 +24,7 @@ CPPSRCS = \
$(NULL)
INCLUDES+= -I$(PUBLIC)/raptor -I$(PUBLIC)/xpcom -I$(PUBLIC)/dom -I$(PUBLIC)/netlib -I$(PUBLIC)/js
INCLUDES+= -I$(PUBLIC)/raptor -I$(PUBLIC)/xpcom -I$(PUBLIC)/dom -I$(PUBLIC)/netlib -I$(PUBLIC)/js -I$(PUBLIC)/pref
DIRS =

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

@ -39,7 +39,7 @@ OBJS = \
.\$(OBJDIR)\nsEditorMode.obj \
$(NULL)
LINCS=-I$(PUBLIC)\raptor -I$(PUBLIC)\xpcom -I$(PUBLIC)\dom -I$(PUBLIC)\js -I$(PUBLIC)\netlib
LINCS=-I$(PUBLIC)\raptor -I$(PUBLIC)\xpcom -I$(PUBLIC)\dom -I$(PUBLIC)\js -I$(PUBLIC)\netlib -I$(PUBLIC)\pref
MYLIBS= \
$(DIST)\lib\raptorbase.lib \

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

@ -28,6 +28,7 @@
#include <malloc.h>
#endif
#define NS_IMPL_IDS
#include "nsViewer.h"
#include "resources.h" // #defines ID's for menu items
#include "nsIWidget.h"
@ -68,6 +69,7 @@
#include "nsINetContainerApplication.h"
#include "nsIButton.h"
#include "nsITextWidget.h"
#include "nsIPref.h"
#include "nsIImageObserver.h"
#include "nsFont.h"
#include "nsIFontMetrics.h"
@ -146,6 +148,7 @@ static NS_DEFINE_IID(kIChildWidgetIID, NS_IWIDGET_IID);
nsViewer* gTheViewer = nsnull;
WindowData * gMainWindowData = nsnull;
nsIAppShell *gAppShell= nsnull;
nsIPref *gPrefs;
static char* startURL;
static nsVoidArray* gWindows;
static PRBool gDoPurify; // run in Purify auto mode
@ -1614,8 +1617,6 @@ nsDocLoader* nsViewer::SetupViewer(nsIWidget **aMainWindow, int argc, char **arg
PL_InitializeEventsLib("");
#endif
NS_InitINetService(this);
gWindows = new nsVoidArray();
NSRepository::RegisterFactory(kCWindowIID, WIDGET_DLL, PR_FALSE, PR_FALSE);
@ -1641,9 +1642,18 @@ nsDocLoader* nsViewer::SetupViewer(nsIWidget **aMainWindow, int argc, char **arg
NSRepository::RegisterFactory(kCScrollingViewCID, VIEW_DLL, PR_FALSE, PR_FALSE);
NSRepository::RegisterFactory(kCWebWidgetCID, WEB_DLL, PR_FALSE, PR_FALSE);
NSRepository::RegisterFactory(kCDocumentLoaderCID, WEB_DLL, PR_FALSE, PR_FALSE);
NSRepository::RegisterFactory(kPrefCID, PREF_DLL, PR_FALSE, PR_FALSE);
nsresult res;
res=NSRepository::CreateInstance(kPrefCID, NULL, kIPrefIID, (void **) &gPrefs);
if (NS_OK==res)
{
gPrefs->Startup("prefs.js");
}
NS_InitINetService(this);
// Create an application shell
nsresult res;
res=NSRepository::CreateInstance(kCAppShellCID, nsnull, kIAppShellIID, (void**)&gAppShell);
if (NS_OK==res)
{
@ -1847,6 +1857,10 @@ void nsViewer::Destroy(WindowData* aWinData)
gWindows->RemoveElement(aWinData);
delete aWinData;
}
if (nsnull != gPrefs) {
gPrefs->Shutdown();
gPrefs->Release();
}
}
nsresult nsViewer::Run()

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

@ -40,11 +40,13 @@ class nsIScriptGlobalObject;
#define GFXWIN_DLL "raptorgfxwin.dll"
#define VIEW_DLL "raptorview.dll"
#define WEB_DLL "raptorweb.dll"
#define PREF_DLL "xppref32.dll"
#else
#define WIDGET_DLL "libwidgetunix.so"
#define GFXWIN_DLL "libgfxunix.so"
#define VIEW_DLL "libraptorview.so"
#define WEB_DLL "libraptorwebwidget.so"
#define PREF_DLL "libpref.so"
#endif
#define MAXPATHLEN 1024