From 8e298ebb3805b4357d8388de4f5e82158df19cb9 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Wed, 21 Oct 2009 21:13:46 +0000 Subject: Other than the custom query item, disable all the main toolbar items when something other than a table or view is currently selected. --- Source/TableDocument.m | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Source') diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 2d972e60..6f839fe7 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -3274,6 +3274,11 @@ if ([identifier isEqualToString:@"ClearConsoleIdentifier"]) { return ([[SPQueryController sharedQueryController] consoleMessageCount] > 0); } + + if (![identifier isEqualToString:@"SwitchToRunQueryToolbarItemIdentifier"]) { + return (([tablesListInstance tableType] == SP_TABLETYPE_TABLE) || + ([tablesListInstance tableType] == SP_TABLETYPE_VIEW)); + } return YES; } -- cgit v1.2.3