зеркало из https://github.com/mozilla/pjs.git
open a new widow if there aren't any available for us to use
This commit is contained in:
Родитель
b3b8884b90
Коммит
af6ff5ba17
|
@ -41,8 +41,11 @@
|
||||||
if ( prefService )
|
if ( prefService )
|
||||||
prefService->GetBoolPref("browser.always_reuse_window", &reuseWindow);
|
prefService->GetBoolPref("browser.always_reuse_window", &reuseWindow);
|
||||||
|
|
||||||
|
// reuse the main window if there is one. The user may have closed all of
|
||||||
|
// them or we may get this event at startup before we've had time to load
|
||||||
|
// our window.
|
||||||
BrowserWindowController* controller = nsnull;
|
BrowserWindowController* controller = nsnull;
|
||||||
if ( reuseWindow ) {
|
if ( reuseWindow && [NSApp mainWindow] ) {
|
||||||
controller = [[NSApp mainWindow] windowController];
|
controller = [[NSApp mainWindow] windowController];
|
||||||
[controller loadURLString:[self directParameter]];
|
[controller loadURLString:[self directParameter]];
|
||||||
[[[controller getBrowserWrapper] getBrowserView] setActive: YES];
|
[[[controller getBrowserWrapper] getBrowserView] setActive: YES];
|
||||||
|
|
|
@ -41,8 +41,11 @@
|
||||||
if ( prefService )
|
if ( prefService )
|
||||||
prefService->GetBoolPref("browser.always_reuse_window", &reuseWindow);
|
prefService->GetBoolPref("browser.always_reuse_window", &reuseWindow);
|
||||||
|
|
||||||
|
// reuse the main window if there is one. The user may have closed all of
|
||||||
|
// them or we may get this event at startup before we've had time to load
|
||||||
|
// our window.
|
||||||
BrowserWindowController* controller = nsnull;
|
BrowserWindowController* controller = nsnull;
|
||||||
if ( reuseWindow ) {
|
if ( reuseWindow && [NSApp mainWindow] ) {
|
||||||
controller = [[NSApp mainWindow] windowController];
|
controller = [[NSApp mainWindow] windowController];
|
||||||
[controller loadURLString:[self directParameter]];
|
[controller loadURLString:[self directParameter]];
|
||||||
[[[controller getBrowserWrapper] getBrowserView] setActive: YES];
|
[[[controller getBrowserWrapper] getBrowserView] setActive: YES];
|
||||||
|
|
|
@ -41,8 +41,11 @@
|
||||||
if ( prefService )
|
if ( prefService )
|
||||||
prefService->GetBoolPref("browser.always_reuse_window", &reuseWindow);
|
prefService->GetBoolPref("browser.always_reuse_window", &reuseWindow);
|
||||||
|
|
||||||
|
// reuse the main window if there is one. The user may have closed all of
|
||||||
|
// them or we may get this event at startup before we've had time to load
|
||||||
|
// our window.
|
||||||
BrowserWindowController* controller = nsnull;
|
BrowserWindowController* controller = nsnull;
|
||||||
if ( reuseWindow ) {
|
if ( reuseWindow && [NSApp mainWindow] ) {
|
||||||
controller = [[NSApp mainWindow] windowController];
|
controller = [[NSApp mainWindow] windowController];
|
||||||
[controller loadURLString:[self directParameter]];
|
[controller loadURLString:[self directParameter]];
|
||||||
[[[controller getBrowserWrapper] getBrowserView] setActive: YES];
|
[[[controller getBrowserWrapper] getBrowserView] setActive: YES];
|
||||||
|
|
|
@ -41,8 +41,11 @@
|
||||||
if ( prefService )
|
if ( prefService )
|
||||||
prefService->GetBoolPref("browser.always_reuse_window", &reuseWindow);
|
prefService->GetBoolPref("browser.always_reuse_window", &reuseWindow);
|
||||||
|
|
||||||
|
// reuse the main window if there is one. The user may have closed all of
|
||||||
|
// them or we may get this event at startup before we've had time to load
|
||||||
|
// our window.
|
||||||
BrowserWindowController* controller = nsnull;
|
BrowserWindowController* controller = nsnull;
|
||||||
if ( reuseWindow ) {
|
if ( reuseWindow && [NSApp mainWindow] ) {
|
||||||
controller = [[NSApp mainWindow] windowController];
|
controller = [[NSApp mainWindow] windowController];
|
||||||
[controller loadURLString:[self directParameter]];
|
[controller loadURLString:[self directParameter]];
|
||||||
[[[controller getBrowserWrapper] getBrowserView] setActive: YES];
|
[[[controller getBrowserWrapper] getBrowserView] setActive: YES];
|
||||||
|
|
Загрузка…
Ссылка в новой задаче