Merge pull request #126 from fenderle/master

Fixes search field (Issue #65)
This commit is contained in:
Michael Starke
2013-12-11 17:10:18 -08:00
2 changed files with 19 additions and 1 deletions

View File

@@ -344,6 +344,10 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
#pragma mark Filtering
- (void)showFilter:(id)sender {
if([self _showsFilterBar]) {
[self.filterSearchField selectText:self];
}
[self _showFilterBarAnimated];
}
@@ -412,6 +416,17 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
self.filter = [self.filterSearchField stringValue];
}
- (BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector
{
if (commandSelector == @selector(insertNewline:))
{
self.filter = [self.filterSearchField stringValue];
}
return NO;
}
- (void)_setupFilterBar {
if(!self.filterBar) {
[[NSBundle mainBundle] loadNibNamed:@"FilterBar" owner:self topLevelObjects:nil];