mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 04:58:00 +00:00
Disable "New Tab" if a non-browser window is the main window. Bug 181560.
This commit is contained in:
parent
0e60b9654a
commit
e646de80cd
@ -1285,6 +1285,13 @@ Otherwise, we return the URL we originally got. Right now this supports .url and
|
||||
if ( action == @selector(getInfo:) )
|
||||
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.
|
||||
if ((action == @selector(closeTab:) ||
|
||||
action == @selector(nextTab:) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user