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