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