зеркало из https://github.com/mozilla/pjs.git
Add command-line URL handling via the switch -url (bug 148887). r=pinkerton.
This commit is contained in:
Родитель
47e81dc216
Коммит
3f9d22bfc4
|
@ -70,6 +70,8 @@ class BookmarksService;
|
|||
FindDlgController* mFindDialog;
|
||||
|
||||
MVPreferencesController *preferencesController;
|
||||
|
||||
NSString* mStartURL;
|
||||
}
|
||||
|
||||
-(void)dealloc;
|
||||
|
|
|
@ -86,6 +86,9 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
|||
[NSApp terminate:self];
|
||||
return self;
|
||||
}
|
||||
|
||||
NSString* url = [defaults stringForKey:@"url"];
|
||||
mStartURL = url ? [url retain] : nil;
|
||||
mSplashScreen = [[CHSplashScreenWindow alloc] splashImage:nil withFade:YES withStatusRect:NSMakeRect(0,0,0,0)];
|
||||
mFindDialog = nil;
|
||||
mMenuBookmarks = nil;
|
||||
|
@ -145,12 +148,19 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
|||
[[mainWindow windowController] autosaveWindowFrame];
|
||||
|
||||
// Now open the new window.
|
||||
NSString* homePage = [mPreferenceManager homePage:YES];
|
||||
NSString* homePage = mStartURL ? mStartURL : [mPreferenceManager homePage:YES];
|
||||
BrowserWindowController* controller = [self openBrowserWindowWithURL:homePage];
|
||||
|
||||
if ([homePage isEqualToString: @"about:blank"])
|
||||
[controller focusURLBar];
|
||||
else
|
||||
[[[controller getBrowserWrapper] getBrowserView] setActive: YES];
|
||||
|
||||
// Only load the command-line specified URL for the first window we open
|
||||
if (mStartURL) {
|
||||
[mStartURL release];
|
||||
mStartURL = nil;
|
||||
}
|
||||
}
|
||||
|
||||
-(IBAction)newTab:(id)aSender
|
||||
|
|
|
@ -70,6 +70,8 @@ class BookmarksService;
|
|||
FindDlgController* mFindDialog;
|
||||
|
||||
MVPreferencesController *preferencesController;
|
||||
|
||||
NSString* mStartURL;
|
||||
}
|
||||
|
||||
-(void)dealloc;
|
||||
|
|
|
@ -86,6 +86,9 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
|||
[NSApp terminate:self];
|
||||
return self;
|
||||
}
|
||||
|
||||
NSString* url = [defaults stringForKey:@"url"];
|
||||
mStartURL = url ? [url retain] : nil;
|
||||
mSplashScreen = [[CHSplashScreenWindow alloc] splashImage:nil withFade:YES withStatusRect:NSMakeRect(0,0,0,0)];
|
||||
mFindDialog = nil;
|
||||
mMenuBookmarks = nil;
|
||||
|
@ -145,12 +148,19 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
|||
[[mainWindow windowController] autosaveWindowFrame];
|
||||
|
||||
// Now open the new window.
|
||||
NSString* homePage = [mPreferenceManager homePage:YES];
|
||||
NSString* homePage = mStartURL ? mStartURL : [mPreferenceManager homePage:YES];
|
||||
BrowserWindowController* controller = [self openBrowserWindowWithURL:homePage];
|
||||
|
||||
if ([homePage isEqualToString: @"about:blank"])
|
||||
[controller focusURLBar];
|
||||
else
|
||||
[[[controller getBrowserWrapper] getBrowserView] setActive: YES];
|
||||
|
||||
// Only load the command-line specified URL for the first window we open
|
||||
if (mStartURL) {
|
||||
[mStartURL release];
|
||||
mStartURL = nil;
|
||||
}
|
||||
}
|
||||
|
||||
-(IBAction)newTab:(id)aSender
|
||||
|
|
|
@ -70,6 +70,8 @@ class BookmarksService;
|
|||
FindDlgController* mFindDialog;
|
||||
|
||||
MVPreferencesController *preferencesController;
|
||||
|
||||
NSString* mStartURL;
|
||||
}
|
||||
|
||||
-(void)dealloc;
|
||||
|
|
|
@ -86,6 +86,9 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
|||
[NSApp terminate:self];
|
||||
return self;
|
||||
}
|
||||
|
||||
NSString* url = [defaults stringForKey:@"url"];
|
||||
mStartURL = url ? [url retain] : nil;
|
||||
mSplashScreen = [[CHSplashScreenWindow alloc] splashImage:nil withFade:YES withStatusRect:NSMakeRect(0,0,0,0)];
|
||||
mFindDialog = nil;
|
||||
mMenuBookmarks = nil;
|
||||
|
@ -145,12 +148,19 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
|||
[[mainWindow windowController] autosaveWindowFrame];
|
||||
|
||||
// Now open the new window.
|
||||
NSString* homePage = [mPreferenceManager homePage:YES];
|
||||
NSString* homePage = mStartURL ? mStartURL : [mPreferenceManager homePage:YES];
|
||||
BrowserWindowController* controller = [self openBrowserWindowWithURL:homePage];
|
||||
|
||||
if ([homePage isEqualToString: @"about:blank"])
|
||||
[controller focusURLBar];
|
||||
else
|
||||
[[[controller getBrowserWrapper] getBrowserView] setActive: YES];
|
||||
|
||||
// Only load the command-line specified URL for the first window we open
|
||||
if (mStartURL) {
|
||||
[mStartURL release];
|
||||
mStartURL = nil;
|
||||
}
|
||||
}
|
||||
|
||||
-(IBAction)newTab:(id)aSender
|
||||
|
|
|
@ -70,6 +70,8 @@ class BookmarksService;
|
|||
FindDlgController* mFindDialog;
|
||||
|
||||
MVPreferencesController *preferencesController;
|
||||
|
||||
NSString* mStartURL;
|
||||
}
|
||||
|
||||
-(void)dealloc;
|
||||
|
|
|
@ -86,6 +86,9 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
|||
[NSApp terminate:self];
|
||||
return self;
|
||||
}
|
||||
|
||||
NSString* url = [defaults stringForKey:@"url"];
|
||||
mStartURL = url ? [url retain] : nil;
|
||||
mSplashScreen = [[CHSplashScreenWindow alloc] splashImage:nil withFade:YES withStatusRect:NSMakeRect(0,0,0,0)];
|
||||
mFindDialog = nil;
|
||||
mMenuBookmarks = nil;
|
||||
|
@ -145,12 +148,19 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
|||
[[mainWindow windowController] autosaveWindowFrame];
|
||||
|
||||
// Now open the new window.
|
||||
NSString* homePage = [mPreferenceManager homePage:YES];
|
||||
NSString* homePage = mStartURL ? mStartURL : [mPreferenceManager homePage:YES];
|
||||
BrowserWindowController* controller = [self openBrowserWindowWithURL:homePage];
|
||||
|
||||
if ([homePage isEqualToString: @"about:blank"])
|
||||
[controller focusURLBar];
|
||||
else
|
||||
[[[controller getBrowserWrapper] getBrowserView] setActive: YES];
|
||||
|
||||
// Only load the command-line specified URL for the first window we open
|
||||
if (mStartURL) {
|
||||
[mStartURL release];
|
||||
mStartURL = nil;
|
||||
}
|
||||
}
|
||||
|
||||
-(IBAction)newTab:(id)aSender
|
||||
|
|
Загрузка…
Ссылка в новой задаче