From 21da436a143c7c2dfa3bc1d86f2d3578fb51ae5e Mon Sep 17 00:00:00 2001 From: emsquared Date: Mon, 4 Jun 2012 23:27:30 -0400 Subject: [PATCH] Fixes #188 Let us honor grammar and auto correction settings in order for Textual to be less annoying. --- Classes/Controllers/MasterController.m | 6 +++++- Classes/Preferences/Preferences.m | 2 ++ Resources/Miscellaneous/Info.plist | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Classes/Controllers/MasterController.m b/Classes/Controllers/MasterController.m index 708241d674..e8275f2276 100755 --- a/Classes/Controllers/MasterController.m +++ b/Classes/Controllers/MasterController.m @@ -525,7 +525,9 @@ - (void)loadWindowState [window setFrame:NSMakeRect(x, y, w, h) display:YES animate:menu.isInFullScreenMode]; + [text setGrammarCheckingEnabled:[_NSUserDefaults() boolForKey:@"GrammarChecking"]]; [text setContinuousSpellCheckingEnabled:[_NSUserDefaults() boolForKey:@"SpellChecking"]]; + [text setAutomaticSpellingCorrectionEnabled:[_NSUserDefaults() boolForKey:@"AutoSpellChecking"]]; serverSplitView.position = [dic integerForKey:@"serverList"]; memberSplitView.position = [dic integerForKey:@"memberList"]; @@ -591,7 +593,9 @@ - (void)saveWindowState [dic setInteger:serverSplitView.position forKey:@"serverList"]; [dic setInteger:memberSplitView.position forKey:@"memberList"]; - [_NSUserDefaults() setBool:[text isContinuousSpellCheckingEnabled] forKey:@"SpellChecking"]; + [_NSUserDefaults() setBool:[text isGrammarCheckingEnabled] forKey:@"GrammarChecking"]; + [_NSUserDefaults() setBool:[text isContinuousSpellCheckingEnabled] forKey:@"SpellChecking"]; + [_NSUserDefaults() setBool:[text isAutomaticSpellingCorrectionEnabled] forKey:@"AutoSpellChecking"]; [Preferences saveWindowState:dic name:@"MainWindow"]; [Preferences sync]; diff --git a/Classes/Preferences/Preferences.m b/Classes/Preferences/Preferences.m index b8a9a8914c..2ea4546a44 100755 --- a/Classes/Preferences/Preferences.m +++ b/Classes/Preferences/Preferences.m @@ -1019,6 +1019,7 @@ + (void)initPreferences NSMutableDictionary *d = [NSMutableDictionary dictionary]; [d setBool:YES forKey:@"SpellChecking"]; + [d setBool:YES forKey:@"GrammarChecking"]; [d setBool:YES forKey:@"eventHighlightGrowl"]; [d setBool:YES forKey:@"eventNewtalkGrowl"]; [d setBool:YES forKey:@"eventAddressBookMatch"]; @@ -1036,6 +1037,7 @@ + (void)initPreferences [d setBool:YES forKey:@"Preferences.General.use_nomode_symbol"]; [d setBool:YES forKey:@"Preferences.General.focus_on_message"]; [d setBool:YES forKey:@"Preferences.General.reply_ctcp_requests"]; + [d setBool:NO forKey:@"AutoSpellChecking"]; [d setBool:NO forKey:DeveloperEnvironmentToken]; [d setBool:NO forKey:@"Preferences.General.log_transcript"]; [d setBool:NO forKey:@"ForceServerListBadgeLocalization"]; diff --git a/Resources/Miscellaneous/Info.plist b/Resources/Miscellaneous/Info.plist index 0937729dd5..c930601edd 100755 --- a/Resources/Miscellaneous/Info.plist +++ b/Resources/Miscellaneous/Info.plist @@ -3,9 +3,9 @@ Build Number - 10063 + 10064 Build Reference - 2.1.1-84-gd14b208-stdbuild + 2.1.1-86-g145d274-stdbuild CFBundleExecutable Textual CFBundleIconFile