зеркало из https://github.com/mozilla/pjs.git
Disable "New Tab" if a non-browser window is the main window. Bug 181560.
This commit is contained in:
Родитель
ed0bc04db8
Коммит
25be3e222f
|
@ -1285,6 +1285,13 @@ Otherwise, we return the URL we originally got. Right now this supports .url and
|
||||||
if ( action == @selector(getInfo:) )
|
if ( action == @selector(getInfo:) )
|
||||||
return (browserController && [browserController canGetInfo]);
|
return (browserController && [browserController canGetInfo]);
|
||||||
|
|
||||||
|
// only enable newTab if there is a browser window frontmost, or if there is no window
|
||||||
|
// (i.e. disable it for non-browser windows).
|
||||||
|
if (action == @selector(newTab:))
|
||||||
|
{
|
||||||
|
return (browserController != nil) || ([NSApp mainWindow] == nil);
|
||||||
|
}
|
||||||
|
|
||||||
// only activate if we've got multiple tabs open.
|
// only activate if we've got multiple tabs open.
|
||||||
if ((action == @selector(closeTab:) ||
|
if ((action == @selector(closeTab:) ||
|
||||||
action == @selector(nextTab:) ||
|
action == @selector(nextTab:) ||
|
||||||
|
|
Загрузка…
Ссылка в новой задаче