From 78ac8a25e8598648fb648863556d72f8f3b4e08f Mon Sep 17 00:00:00 2001 From: "hshaw%netscape.com" Date: Mon, 15 Mar 1999 06:12:17 +0000 Subject: [PATCH] load up default pref file, more detailed version requires mac project file changes --- modules/libpref/src/nsPref.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/libpref/src/nsPref.cpp b/modules/libpref/src/nsPref.cpp index 6ae39d362f11..8247a9f2d550 100644 --- a/modules/libpref/src/nsPref.cpp +++ b/modules/libpref/src/nsPref.cpp @@ -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; }