Some fixes for startup

This commit is contained in:
spider%netscape.com 1998-10-08 23:34:41 +00:00
parent eaf98a1a8a
commit 9fa08971b5
3 changed files with 15 additions and 11 deletions

View File

@ -86,6 +86,8 @@ nsShellInstance::nsShellInstance()
nsShellInstance::~nsShellInstance()
{
//NS_ShutdownINetService();
NS_IF_RELEASE(mDeviceContext);
NS_IF_RELEASE(mApplicationWindow);
@ -116,9 +118,9 @@ nsresult nsShellInstance::Init()
mPref->Startup(nsnull);
res = NS_InitINetService();
if (NS_OK != res)
return res;
//res = NS_InitINetService();
//if (NS_OK != res)
// return res;
// Create a Stream Manager
res = nsRepository::CreateInstance(kCStreamManager,

View File

@ -34,7 +34,6 @@
#define XPFC_DLL "libxpfc10.so"
extern "C" char *fe_GetConfigDir(void) {
printf("XXX: return /tmp for fe_GetConfigDir\n");
return strdup("/tmp");
}
@ -78,6 +77,8 @@ void main(int argc, char **argv)
nsIShellInstance * pShellInstance ;
nsIApplicationShell * pApplicationShell ;
PL_InitializeEventsLib("");
XtSetLanguageProc(NULL, NULL, NULL);
topLevel = XtVaAppInitialize(&app_context, "Shell", NULL, 0, &argc, argv, NULL, NULL);
@ -87,6 +88,7 @@ void main(int argc, char **argv)
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
// Let get a ShellInstance for this Application instance
nsRepository::RegisterFactory(kCShellInstanceCID, XPFC_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCXPFCMenuBarCID, XPFC_DLL, PR_FALSE, PR_FALSE);
@ -157,8 +159,7 @@ void main(int argc, char **argv)
// We're done, clean up
nsApplicationManager::DeleteShellAssociation(pApplicationShell, pShellInstance);
NS_ShutdownINetService();
PR_Cleanup();
//PR_Cleanup();
// book out of here
return ;

View File

@ -72,10 +72,12 @@ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdParam,
nsIShellInstance * pShellInstance ;
nsIApplicationShell * pApplicationShell ;
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
PL_InitializeEventsLib("");
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
PL_InitializeEventsLib("");
// Let get a ShellInstance for this Application instance
@ -149,7 +151,6 @@ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdParam,
NS_RELEASE(pApplicationShell);
NS_RELEASE(pShellInstance);
NS_ShutdownINetService();
//PR_Cleanup();
// book out of here