mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Remove code required when building with the 10.9 and 10.10 SDK
We only support building with the 10.11 and 10.12 SDK, so this code is no longer required. Also added MAC_OS_X_VERSION_10_10 comments around 10.10 API that we conditionally use. This is just to make it easier to find it when bumping the minimum OS requirement.
This commit is contained in:
@@ -14,8 +14,3 @@ PUBLIC extern NSUInteger const OakMoveNoActionReturn;
|
||||
|
||||
PUBLIC NSUInteger OakPerformTableViewActionFromKeyEvent (NSTableView* tableView, NSEvent* event);
|
||||
PUBLIC NSUInteger OakPerformTableViewActionFromSelector (NSTableView* tableView, SEL selector);
|
||||
|
||||
#if !defined(MAC_OS_X_VERSION_10_10) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10)
|
||||
PUBLIC extern NSString *const *const pNSAccessibilitySharedFocusElementsAttribute;
|
||||
#define NSAccessibilitySharedFocusElementsAttribute (*pNSAccessibilitySharedFocusElementsAttribute)
|
||||
#endif
|
||||
@@ -167,15 +167,3 @@ NSUInteger OakPerformTableViewActionFromSelector (NSTableView* tableView, SEL se
|
||||
[helper doCommandBySelector:selector];
|
||||
return helper.returnCode;
|
||||
}
|
||||
|
||||
// ======================
|
||||
|
||||
#if !defined(MAC_OS_X_VERSION_10_10) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10)
|
||||
// 10.9 and 10.10 SDKs don't define NSAppKitVersionNumber10_9 (nor *_10)
|
||||
// literal value taken of 1265 from https://developer.apple.com/library/prerelease/mac/releasenotes/AppKit/RN-AppKit/index.html
|
||||
#ifndef NSAppKitVersionNumber10_9
|
||||
#define NSAppKitVersionNumber10_9 1265
|
||||
#endif
|
||||
NSString *const _NSAccessibilitySharedFocusElementsAttribute = @"AXSharedFocusElements";
|
||||
NSString *const *const pNSAccessibilitySharedFocusElementsAttribute = (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_9) ? nil : &_NSAccessibilitySharedFocusElementsAttribute;
|
||||
#endif
|
||||
@@ -630,7 +630,7 @@ static std::vector<bundles::item_ptr> relevant_items_in_scope (scope::context_t
|
||||
[_keyEquivalentView bind:NSValueBinding toObject:self withKeyPath:@"keyEquivalentString" options:nil];
|
||||
[_keyEquivalentView addObserver:self forKeyPath:@"recording" options:NSKeyValueObservingOptionNew context:kRecordingBinding];
|
||||
|
||||
if(nil != &NSAccessibilitySharedFocusElementsAttribute)
|
||||
if(nil != &NSAccessibilitySharedFocusElementsAttribute) // MAC_OS_X_VERSION_10_10
|
||||
[_keyEquivalentView accessibilitySetOverrideValue:@[ self.tableView ] forAttribute:NSAccessibilitySharedFocusElementsAttribute];
|
||||
}
|
||||
return _keyEquivalentView;
|
||||
|
||||
@@ -141,7 +141,7 @@ static void* kFirstResponderBinding = &kFirstResponderBinding;
|
||||
tableView.target = self;
|
||||
tableView.dataSource = self;
|
||||
tableView.delegate = self;
|
||||
if(nil != &NSAccessibilitySharedFocusElementsAttribute)
|
||||
if(nil != &NSAccessibilitySharedFocusElementsAttribute) // MAC_OS_X_VERSION_10_10
|
||||
[_searchField.cell accessibilitySetOverrideValue:@[tableView] forAttribute:NSAccessibilitySharedFocusElementsAttribute];
|
||||
_tableView = tableView;
|
||||
|
||||
@@ -274,7 +274,7 @@ static void* kFirstResponderBinding = &kFirstResponderBinding;
|
||||
[self updateFilterString:_filterString];
|
||||
|
||||
// see http://lists.apple.com/archives/accessibility-dev/2014/Aug/msg00024.html
|
||||
if(nil != &NSAccessibilitySharedFocusElementsAttribute)
|
||||
if(nil != &NSAccessibilitySharedFocusElementsAttribute) // MAC_OS_X_VERSION_10_10
|
||||
NSAccessibilityPostNotification(_tableView, NSAccessibilitySelectedRowsChangedNotification);
|
||||
}
|
||||
|
||||
|
||||
@@ -165,9 +165,8 @@ static NSString* CreateSpacedString(NSUInteger length)
|
||||
@implementation OakLinkedSearchField
|
||||
+ (void)initialize
|
||||
{
|
||||
// MAC_OS_X_VERSION_10_10
|
||||
if((nil == &NSAccessibilitySharedFocusElementsAttribute) && (self == OakLinkedSearchField.class))
|
||||
{
|
||||
[OakLinkedSearchField setCellClass:[OakLinkedSearchFieldCell class]];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user