Use ‘refuses first responder’ property

We still need the subclass for rendering the control as active, but the less we override the better.
This commit is contained in:
Allan Odgaard
2013-02-12 22:01:02 +01:00
parent ba7b1b1be7
commit 007dd2db00

View File

@@ -33,8 +33,6 @@ static NSButton* OakCreateScopeButton (NSString* label, SEL action, NSUInteger t
@end
@implementation OakNonActivatingTableView
- (BOOL)acceptsFirstResponder { return NO; }
- (NSCell*)preparedCellAtColumn:(NSInteger)column row:(NSInteger)row
{
OFBPathInfoCell* res = (OFBPathInfoCell*)[super preparedCellAtColumn:column row:row];
@@ -244,6 +242,7 @@ static path::glob_list_t globs_for_path (std::string const& path)
_tableView.focusRingType = NSFocusRingTypeNone;
_tableView.allowsEmptySelection = NO;
_tableView.allowsMultipleSelection = YES;
_tableView.refusesFirstResponder = YES;
_tableView.doubleAction = @selector(accept:);
_tableView.target = self;
_tableView.dataSource = self;