Frameworks/AIUtilities Framework/Source/AILeopardCompatibility.h
author Zachary West <zacw@adium.im>
Thu Oct 29 12:43:40 2009 -0400 (2009-10-29)
changeset 2678 4f51d10a2af5
parent 2599 236abfc3797e
permissions -rw-r--r--
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.
     1 /*
     2  *  AILeopardCompatibility.h
     3  *  Adium
     4  *
     5  *  Created by Zachary West on 2009-08-29.
     6  *  Copyright 2009  . All rights reserved.
     7  *
     8  */
     9 
    10 #ifndef AILeopardCompatibility
    11 #define AILeopardCompatibility
    12 
    13 #import <AvailabilityMacros.h>
    14 
    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
    18 
    19 #if MAC_OS_X_VERSION_10_6 > MAC_OS_X_VERSION_MAX_ALLOWED
    20 
    21 #ifdef __OBJC__
    22 @interface NSTextView(NSTextViewLeopardMethods)
    23 - (void)setAutomaticDataDetectionEnabled:(BOOL)flag;
    24 - (BOOL)isAutomaticDataDetectionEnabled;
    25 - (void)toggleAutomaticDataDetection:(id)sender;
    26 
    27 - (void)setAutomaticDashSubstitutionEnabled:(BOOL)flag;
    28 - (BOOL)isAutomaticDashSubstitutionEnabled;
    29 - (void)toggleAutomaticDashSubstitution:(id)sender;
    30 
    31 - (void)setAutomaticTextReplacementEnabled:(BOOL)flag;
    32 - (BOOL)isAutomaticTextReplacementEnabled;
    33 - (void)toggleAutomaticTextReplacement:(id)sender;
    34 
    35 - (void)setAutomaticSpellingCorrectionEnabled:(BOOL)flag;
    36 - (BOOL)isAutomaticSpellingCorrectionEnabled;
    37 - (void)toggleAutomaticSpellingCorrection:(id)sender;
    38 @end
    39 
    40 @interface NSSpellChecker(NSSpellCheckerLeopardMethods)
    41 - (NSArray *)userPreferredLanguages;
    42 @end
    43 #endif
    44 
    45 #else //Not compiling for 10.6
    46 
    47 #endif //MAC_OS_X_VERSION_10_6
    48 
    49 #endif //AILeopardCompatibility