load up default pref file, more detailed version requires mac project file changes

This commit is contained in:
hshaw%netscape.com 1999-03-15 06:12:17 +00:00
parent 44463b458c
commit 78ac8a25e8

View File

@ -40,6 +40,7 @@ private:
nsPref();
~nsPref();
static void useDefaultPrefFile(nsPref *aPrefInst);
static nsPref *mInstance;
public:
@ -189,10 +190,24 @@ nsPref::~nsPref() {
mInstance = NULL;
}
void
nsPref::useDefaultPrefFile(nsPref *aPrefInst)
{
/* temporary hack to load up pref files */
if (!aPrefInst)
return;
aPrefInst->Startup("prefs.js");
return;
}
nsPref *nsPref::GetInstance()
{
if (mInstance == NULL) {
mInstance = new nsPref();
useDefaultPrefFile(mInstance);
}
return mInstance;
}