Temporary fix until mcmullen updates some back end prefs code. We need to manually specify the pref file to use. We can't get at the profile information so look in the current directory.

This commit is contained in:
mscott%netscape.com 1999-04-20 00:43:23 +00:00
Родитель bc95a9b7d6
Коммит 07a669c9ad
2 изменённых файлов: 21 добавлений и 0 удалений

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

@ -70,6 +70,7 @@ static NS_DEFINE_CID(kNetServiceCID, NS_NETSERVICE_CID);
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
static NS_DEFINE_CID(kSmtpServiceCID, NS_SMTPSERVICE_CID);
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
/////////////////////////////////////////////////////////////////////////////////
// Define default values to be used to drive the test
/////////////////////////////////////////////////////////////////////////////////
@ -435,6 +436,16 @@ int main()
nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
nsComponentManager::RegisterComponent(kPrefCID, nsnull, nsnull, PREF_DLL, PR_TRUE, PR_TRUE);
// make sure prefs get initialized and loaded..
// mscott - this is just a bad bad bad hack right now until prefs
// has the ability to take nsnull as a parameter. Once that happens,
// prefs will do the work of figuring out which prefs file to load...
NS_WITH_SERVICE(nsIPref, prefs, kPrefCID, &result);
if (NS_SUCCEEDED(result) && prefs)
{
prefs->Startup("prefs50.js");
}
// Create the Event Queue for this thread...
nsIEventQueueService* pEventQService;
result = nsServiceManager::GetService(kEventQueueServiceCID,

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

@ -464,6 +464,16 @@ int main()
nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
nsComponentManager::RegisterComponent(kPrefCID, nsnull, nsnull, PREF_DLL, PR_TRUE, PR_TRUE);
// make sure prefs get initialized and loaded..
// mscott - this is just a bad bad bad hack right now until prefs
// has the ability to take nsnull as a parameter. Once that happens,
// prefs will do the work of figuring out which prefs file to load...
NS_WITH_SERVICE(nsIPref, prefs, kPrefCID, &result);
if (NS_SUCCEEDED(result) && prefs)
{
prefs->Startup("prefs50.js");
}
// Create the Event Queue for this thread...
nsIEventQueueService* pEventQService;
result = nsServiceManager::GetService(kEventQueueServiceCID,