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

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13A2093" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment defaultVersion="1080" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/>
@@ -87,6 +87,9 @@
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</searchFieldCell>
<connections>
<outlet property="delegate" destination="-2" id="Y78-7K-e9c"/>
</connections>
</searchField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="96">
<rect key="frame" x="238" y="6" width="74" height="17"/>

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];