diff --git a/src/MacVim/MMAtsuiTextView.h b/src/MacVim/MMAtsuiTextView.h index eead8cf5c3..9f588d89d6 100644 --- a/src/MacVim/MMAtsuiTextView.h +++ b/src/MacVim/MMAtsuiTextView.h @@ -8,6 +8,8 @@ * See README.txt for an overview of the Vim source code. */ +#if ENABLE_ATSUI + #import #import "MMTextView.h" @@ -97,3 +99,5 @@ enum { MMMaxCellsPerChar = 2 }; - (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size; @end + +#endif // ENABLE_ATSUI diff --git a/src/MacVim/MMAtsuiTextView.m b/src/MacVim/MMAtsuiTextView.m index bdc55ac1d4..11c2774047 100644 --- a/src/MacVim/MMAtsuiTextView.m +++ b/src/MacVim/MMAtsuiTextView.m @@ -25,6 +25,8 @@ * resized. */ +#if ENABLE_ATSUI + #import "MMAppController.h" #import "MMAtsuiTextView.h" #import "MMTextViewHelper.h" @@ -1268,3 +1270,5 @@ defaultLineHeightForFont(NSFont *font) } @end // MMAtsuiTextView (Drawing) + +#endif // ENABLE_ATSUI diff --git a/src/MacVim/MMVimView.m b/src/MacVim/MMVimView.m index 3643b3214c..85ea90857c 100644 --- a/src/MacVim/MMVimView.m +++ b/src/MacVim/MMVimView.m @@ -89,13 +89,16 @@ enum { [self setAutoresizesSubviews:YES]; NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; +#if ENABLE_ATSUI if ([ud boolForKey:MMAtsuiRendererKey]) { // Use ATSUI for text rendering. // // HACK! 'textView' has type MMTextView, but MMAtsuiTextView is not // derived from MMTextView. textView = [[MMAtsuiTextView alloc] initWithFrame:frame]; - } else { + } else +#endif // ENABLE_ATSUI + { // Use Cocoa text system for text rendering. textView = [[MMTextView alloc] initWithFrame:frame]; } diff --git a/src/MacVim/Miscellaneous.h b/src/MacVim/Miscellaneous.h index 9b66ecdeb8..c650870747 100644 --- a/src/MacVim/Miscellaneous.h +++ b/src/MacVim/Miscellaneous.h @@ -16,6 +16,11 @@ // TODO: Remove this when the inline IM code has been tested #define INCLUDE_OLD_IM_CODE +// Disable ATSUI when compiling on 10.6. This is because ATSUI is deprecated +// on 10.6 and hence spews out masses of warning messages when building. Also, +// the ATSUI code currently does not work on 10.6. +#define MM_ENABLE_ATSUI (MAC_OS_X_VERSION_MIN_REQUIRED