From 590585d37bdd8453dd1020cefe27dd55a77de5aa Mon Sep 17 00:00:00 2001 From: Bibiko Date: Mon, 1 Nov 2010 14:30:47 +0000 Subject: =?UTF-8?q?=E2=80=A2=20disable=20"New=20Connection=20Tab"=20?= =?UTF-8?q?=E2=8C=98T=20menu=20item=20if=20a=20sheet=20is=20ordered=20out?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPAppController.m | 6 +++++- Source/SPDatabaseDocument.m | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 0589b1d2..e94f52ac 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -109,7 +109,11 @@ return NO; } - + if([menuItem action] == @selector(newTab:)) + { + return ([[self frontDocumentWindow] attachedSheet] == nil); + } + return YES; } diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 914ab259..beb8ab5a 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -3555,7 +3555,7 @@ } if (!_isConnected || _isWorkingLevel) { - return ([menuItem action] == @selector(newWindow:) || [menuItem action] == @selector(terminate:) || [menuItem action] == @selector(closeTab:) || [menuItem action] == @selector(newTab:)); + return ([menuItem action] == @selector(newWindow:) || [menuItem action] == @selector(terminate:) || [menuItem action] == @selector(closeTab:)); } if ([menuItem action] == @selector(openCurrentConnectionInNewWindow:)) -- cgit v1.2.3