aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-10-21 21:13:46 +0000
committerstuconnolly <stuart02@gmail.com>2009-10-21 21:13:46 +0000
commit8e298ebb3805b4357d8388de4f5e82158df19cb9 (patch)
treea806ff400092c96e60c30ac0f802e661a466e7e7
parent83c761cbd4d20dbb46f92865051d8060a50284c8 (diff)
downloadsequelpro-8e298ebb3805b4357d8388de4f5e82158df19cb9.tar.gz
sequelpro-8e298ebb3805b4357d8388de4f5e82158df19cb9.tar.bz2
sequelpro-8e298ebb3805b4357d8388de4f5e82158df19cb9.zip
Other than the custom query item, disable all the main toolbar items when something other than a table or view is currently selected.
-rw-r--r--Source/TableDocument.m5
1 files changed, 5 insertions, 0 deletions
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;
}