Clean up the per-contact spelling a little. I think this fixes #12359.
This uses new, proper "language-grabbing" methods from the spell checker, as well as properly saves the spelling if the spelling was changed and the window was immediately closed. In this case, it would end up saving the wrong value.
2 * AILeopardCompatibility.h
5 * Created by Zachary West on 2009-08-29.
6 * Copyright 2009 . All rights reserved.
10 #ifndef AILeopardCompatibility
11 #define AILeopardCompatibility
13 #import <AvailabilityMacros.h>
15 #ifndef MAC_OS_X_VERSION_10_6
16 #define MAC_OS_X_VERSION_10_6 1060
17 #endif //ndef MAC_OS_X_VERSION_10_6
19 #if MAC_OS_X_VERSION_10_6 > MAC_OS_X_VERSION_MAX_ALLOWED
22 @interface NSTextView(NSTextViewLeopardMethods)
23 - (void)setAutomaticDataDetectionEnabled:(BOOL)flag;
24 - (BOOL)isAutomaticDataDetectionEnabled;
25 - (void)toggleAutomaticDataDetection:(id)sender;
27 - (void)setAutomaticDashSubstitutionEnabled:(BOOL)flag;
28 - (BOOL)isAutomaticDashSubstitutionEnabled;
29 - (void)toggleAutomaticDashSubstitution:(id)sender;
31 - (void)setAutomaticTextReplacementEnabled:(BOOL)flag;
32 - (BOOL)isAutomaticTextReplacementEnabled;
33 - (void)toggleAutomaticTextReplacement:(id)sender;
35 - (void)setAutomaticSpellingCorrectionEnabled:(BOOL)flag;
36 - (BOOL)isAutomaticSpellingCorrectionEnabled;
37 - (void)toggleAutomaticSpellingCorrection:(id)sender;
40 @interface NSSpellChecker(NSSpellCheckerLeopardMethods)
41 - (NSArray *)userPreferredLanguages;
45 #else //Not compiling for 10.6
47 #endif //MAC_OS_X_VERSION_10_6
49 #endif //AILeopardCompatibility