Disable "New Tab" if a non-browser window is the main window. Bug 181560.

This commit is contained in:
smfr%smfr.org 2005-06-23 03:38:55 +00:00
Родитель ed0bc04db8
Коммит 25be3e222f
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -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:) ||