Add a "-nosplash" command line option to disable splash screen. r=syd

git-svn-id: svn://10.0.0.236/trunk@60642 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tor%cs.brown.edu 2000-02-13 16:49:41 +00:00
parent 771016a2bb
commit b4ba80be89

View File

@ -591,6 +591,7 @@ void DumpHelp(char *appname)
printf("%s-ProfileWizard%sStart with profile wizard.\n",HELP_SPACER_1,HELP_SPACER_2);
printf("%s-ProfileManager%sStart with profile manager.\n",HELP_SPACER_1,HELP_SPACER_2);
printf("%s-SelectProfile%sStart with profile selection dialog.\n",HELP_SPACER_1,HELP_SPACER_2);
printf("%s-nosplash%sDisable splash screen.\n",HELP_SPACER_1,HELP_SPACER_2);
// not working yet, because we handle -h too early, and components
// havent registered yet
@ -648,8 +649,24 @@ int main(int argc, char* argv[])
// Note: this object is not released here. It is passed to main1 which
// has responsibility to release it.
nsISplashScreen *splash = 0;
rv = NS_CreateSplashScreen( &splash );
NS_ASSERTION( NS_SUCCEEDED(rv), "NS_CreateSplashScreen failed" );
PRBool dosplash = PR_TRUE;
// We can't use the command line service here because it isn't running yet
for (int i=0; i<argc; i++)
if ((PL_strcasecmp(argv[i], "-nosplash") == 0)
#ifdef XP_UNIX
|| (PL_strcasecmp(argv[i], "--nosplash") == 0)
#endif /* XP_UNIX */
#ifdef XP_PC
|| (PL_strcasecmp(argv[i], "/nosplash") == 0)
#endif /* XP_PC */
) {
dosplash = PR_FALSE;
break;
}
if (dosplash) {
rv = NS_CreateSplashScreen( &splash );
NS_ASSERTION( NS_SUCCEEDED(rv), "NS_CreateSplashScreen failed" );
}
// If the platform has a splash screen, show it ASAP.
if ( splash ) {
splash->Show();