Disable the ATSUI renderer on 10.6

ATSUI has been deprecated on 10.6.  As it stands the ATSUI renderer does
not even work and it spews out masses of warnings when building, so
ATSUI is disabled when compiling for 10.6 for now.
This commit is contained in:
Bjorn Winckler
2009-09-01 22:43:56 +02:00
parent ad7da68f84
commit 67df700615
4 changed files with 17 additions and 1 deletions
+4
View File
@@ -8,6 +8,8 @@
* See README.txt for an overview of the Vim source code.
*/
#if ENABLE_ATSUI
#import <Cocoa/Cocoa.h>
#import "MMTextView.h"
@@ -97,3 +99,5 @@ enum { MMMaxCellsPerChar = 2 };
- (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size;
@end
#endif // ENABLE_ATSUI
+4
View File
@@ -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
+4 -1
View File
@@ -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];
}
+5
View File
@@ -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<MAC_OS_X_VERSION_10_6)
// NSUserDefaults keys
extern NSString *MMTabMinWidthKey;