From 99758285c96957fcb88658721b7f829b3fd3f816 Mon Sep 17 00:00:00 2001 From: "law%netscape.com" Date: Thu, 13 Aug 1998 06:50:08 +0000 Subject: [PATCH] Added support for -prefs cmd line arg --- cmd/winfe/woohoo.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/cmd/winfe/woohoo.cpp b/cmd/winfe/woohoo.cpp index a336745f752..3c4c105e227 100644 --- a/cmd/winfe/woohoo.cpp +++ b/cmd/winfe/woohoo.cpp @@ -27,6 +27,7 @@ #include "template.h" #include "mainfrm.h" #include "woohoo.h" +#include "prefs.h" #if defined(OJI) #include "jvmmgr.h" @@ -93,6 +94,9 @@ BOOL CNetscapeApp::ParseComponentArguments(char * pszCommandLine,BOOL bRemove) }else if (IsRuntimeSwitch("-EXPORT", pszCommandLine, bRemove)){ m_bCreateLDIF_EXPORT = TRUE; + }else if (IsRuntimeSwitch("-PREFS", pszCommandLine, bRemove)){ + m_bShowPrefsOnStartup = TRUE; + }else return FALSE; //nothing to do here!! if (strlen(pszCommandLine) > 1) @@ -215,6 +219,9 @@ BOOL CNetscapeApp::ExistComponentArguments(char * pszCommandLine) } else if (strcasestr(pszCommandLine,"-PROFILE_MANAGER" )){ m_bProfileManager = TRUE; + } else if (strcasestr(pszCommandLine,"-PREFS" )){ + m_bShowPrefsOnStartup = TRUE; + #if defined(OJI) || defined(JAVA) } else if (strcasestr(pszCommandLine,"-javadebug" )){ m_bCreateJavaDebugAgent = TRUE; @@ -524,6 +531,11 @@ void CNetscapeApp::LaunchComponentWindow(int iStartupMode, char *pszCmdLine) break; #endif + case STARTUP_PREFS: + // Open preferences (non-modal). + wfe_DisplayPreferences( NULL ); + break; + case 0: { AfxMessageBox(IDS_CMDLINE_ERROR4); @@ -538,7 +550,7 @@ void CNetscapeApp::LaunchComponentWindow(int iStartupMode, char *pszCmdLine) // rhp - added STARTUP_CLIENT_MAPI for starting MAPI if ((iStartupMode & STARTUP_BROWSER || iStartupMode & STARTUP_EDITOR || // if startup browser or editor - !(iStartupMode & (STARTUP_JAVA_DEBUG_AGENT|STARTUP_BROWSER|STARTUP_NEWS|STARTUP_MAIL|STARTUP_ADDRESS + !(iStartupMode & (STARTUP_JAVA_DEBUG_AGENT|STARTUP_BROWSER|STARTUP_NEWS|STARTUP_MAIL|STARTUP_ADDRESS|STARTUP_PREFS #ifdef MOZ_MAIL_NEWS |STARTUP_INBOX|STARTUP_COMPOSE|STARTUP_FOLDER|STARTUP_FOLDERS|STARTUP_NETCASTER|STARTUP_CALENDAR |STARTUP_CLIENT_MAPI|STARTUP_CLIENT_ABAPI)) || // or invalid data @@ -899,6 +911,10 @@ void CNetscapeApp::SetStartupMode(int32 *iStartupMode) *iStartupMode= STARTUP_BROWSER; m_bCreateBrowser= 0; + }else if (m_bShowPrefsOnStartup) { + *iStartupMode= STARTUP_PREFS; + m_bShowPrefsOnStartup= 0; + //we don't want to handle preferences in the first instance //if requested to do so by a second instance }else if (m_bCreateNewProfile) {