From 373af7d28f55328a0d004ddd106ccbaafdd782d4 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 30 Apr 2009 12:47:01 +0000 Subject: =?UTF-8?q?=E2=80=A2=20changed=20context=20menu=20item=20in=20CQ's?= =?UTF-8?q?=20textview=20to=20support=20"MySQL=20Help"=20=E2=80=A2=20prepa?= =?UTF-8?q?red=20code=20to=20work=20with=20autoHelp=20=E2=80=A2=20improved?= =?UTF-8?q?=20getRangeForCurrentWord=20(fix=20for=20"=20=20=20|a")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/CustomQuery.m | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Source/CustomQuery.m') 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]]; -- cgit v1.2.3