Fixed bug 16923. r=mjudge

This commit is contained in:
cmanske%netscape.com 1999-10-20 23:50:20 +00:00
parent 441e02909f
commit aa863e0267

View File

@ -262,27 +262,19 @@ static nsresult HandleEditorStartup( nsICmdLineService* cmdLineArgs, nsIPref *pr
rv = cmdLineArgs->GetCmdLineValue("-edit", &cmdResult);
if (NS_SUCCEEDED(rv))
{
if (forceLaunchEditor || (cmdResult && (PL_strcmp("1",cmdResult)==0))) {
if (forceLaunchEditor || cmdResult) {
urlstr = "chrome://editor/content/";
if (cmdResult) {
if (PL_strcmp("1",cmdResult)==0) {
// this signals no URL after "-edit"?
withArgs = "about:blank";
} else {
// We have a URL -- Should we do some URL validating here?
withArgs = cmdResult;
}
}
OpenWindow( urlstr, withArgs.GetUnicode() );
}
// Check for -editor -- this will eventually go away
if (nsnull == urlstr)
{
rv = cmdLineArgs->GetCmdLineValue("-editor", &cmdResult);
if (NS_SUCCEEDED(rv))
{
if (cmdResult && (PL_strcmp("1",cmdResult)==0)) {
printf(" -editor no longer supported, use -edit instead!\n");
return NS_ERROR_FAILURE;
}
}
}
}
return NS_OK;