aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-04-30 12:47:01 +0000
committerBibiko <bibiko@eva.mpg.de>2009-04-30 12:47:01 +0000
commit373af7d28f55328a0d004ddd106ccbaafdd782d4 (patch)
treeb3aba55c6bfd4ac45a56ec0bfb7dca5c167653fa /Source/CustomQuery.m
parent40dc576b30ec1da22ae58c1daaae86a6d1020b2c (diff)
downloadsequelpro-373af7d28f55328a0d004ddd106ccbaafdd782d4.tar.gz
sequelpro-373af7d28f55328a0d004ddd106ccbaafdd782d4.tar.bz2
sequelpro-373af7d28f55328a0d004ddd106ccbaafdd782d4.zip
• changed context menu item in CQ's textview to support "MySQL Help"
• prepared code to work with autoHelp • improved getRangeForCurrentWord (fix for " |a")
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r--Source/CustomQuery.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index a7741792..10cf95f7 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -245,6 +245,15 @@ closes the sheet
[textView setAutopair:enableAutopair];
}
+ // "Auto-help" toggle
+ if (sender == autohelpMenuItem) {
+ BOOL enableAutohelp = ([autohelpMenuItem state] == NSOffState);
+ [prefs setBool:enableAutohelp forKey:@"CustomQueryAutohelp"];
+ [prefs synchronize];
+ [autohelpMenuItem setState:enableAutohelp?NSOnState:NSOffState];
+ [textView setAutohelp:enableAutohelp];
+ }
+
// "Auto-uppercase keywords" toggle
if (sender == autouppercaseKeywordsMenuItem) {
BOOL enableAutouppercaseKeywords = ([autouppercaseKeywordsMenuItem state] == NSOffState);
@@ -910,6 +919,8 @@ sets the connection (received from TableDocument) and makes things that have to
[textView setAutoindentIgnoresEnter:YES];
[autopairMenuItem setState:([prefs boolForKey:@"CustomQueryAutopair"]?NSOnState:NSOffState)];
[textView setAutopair:[prefs boolForKey:@"CustomQueryAutopair"]];
+ [autohelpMenuItem setState:([prefs boolForKey:@"CustomQueryAutohelp"]?NSOnState:NSOffState)];
+ [textView setAutohelp:[prefs boolForKey:@"CustomQueryAutohelp"]];
[autouppercaseKeywordsMenuItem setState:([prefs boolForKey:@"CustomQueryAutouppercaseKeywords"]?NSOnState:NSOffState)];
[textView setAutouppercaseKeywords:[prefs boolForKey:@"CustomQueryAutouppercaseKeywords"]];
[queryFavoritesView registerForDraggedTypes:[NSArray arrayWithObjects:@"SequelProPasteboard", nil]];