aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-06-04 19:31:00 +0000
committerBibiko <bibiko@eva.mpg.de>2009-06-04 19:31:00 +0000
commita62ac5494e570f782ab9bf74270f0ca7a61e033b (patch)
treeb9fc93afaaff887bab235a9f82b2e7fb1b22d97f /Source/CMTextView.m
parent57c25577a9c5ae66add3c30e1daf4e2bb5756a80 (diff)
downloadsequelpro-a62ac5494e570f782ab9bf74270f0ca7a61e033b.tar.gz
sequelpro-a62ac5494e570f782ab9bf74270f0ca7a61e033b.tar.bz2
sequelpro-a62ac5494e570f782ab9bf74270f0ca7a61e033b.zip
• added: syntax highlighting to the HUD window "Show Create Syntax"
• fixed: context menu item validation for "Show MySQL Help": hide it when no connection to the customQueryInstance is found
Diffstat (limited to 'Source/CMTextView.m')
-rw-r--r--Source/CMTextView.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/CMTextView.m b/Source/CMTextView.m
index da6e708b..b8392e30 100644
--- a/Source/CMTextView.m
+++ b/Source/CMTextView.m
@@ -2352,6 +2352,14 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
// Hide "Select Active Query" if self is not editable
[[menu itemAtIndex:4] setHidden:![self isEditable]];
+ if([[[self window] delegate] valueForKeyPath:@"customQueryInstance"]) {
+ [[menu itemAtIndex:5] setHidden:NO];
+ [[menu itemAtIndex:6] setHidden:NO];
+ } else {
+ [[menu itemAtIndex:5] setHidden:YES];
+ [[menu itemAtIndex:6] setHidden:YES];
+ }
+
return menu;
}