diff --git a/MacPass/EntryView.xib b/MacPass/EntryView.xib
index b39d14a0..607d6ed0 100644
--- a/MacPass/EntryView.xib
+++ b/MacPass/EntryView.xib
@@ -61,7 +61,7 @@
{788, 511}
-
+
_NS:13
YES
NO
@@ -345,7 +345,7 @@
{788, 528}
-
+
_NS:9
133680
@@ -384,14 +384,6 @@
395
-
tableToTop
@@ -413,30 +405,7 @@
3
- 671
-
-
-
- tableToBottom
-
-
-
- 4
- 0
-
- 4
- 1
-
- 0.0
-
- 1000
-
- 9
- 40
- 3
-
-
- 672
+ 686
@@ -688,8 +657,23 @@
336
+
+
+ 4
+ 0
+
+ 4
+ 1
+
+ 0.0
+
+ 1000
+
+ 8
+ 29
+ 3
+
-
6
@@ -1337,16 +1321,6 @@
-
- 666
-
-
-
-
- 670
-
-
-
676
@@ -1372,6 +1346,16 @@
+
+ 683
+
+
+
+
+ 685
+
+
+
@@ -1432,11 +1416,11 @@
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
-
+
-
+
@@ -1500,18 +1484,18 @@
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
- 681
+ 686
diff --git a/MacPass/FilterBar.xib b/MacPass/FilterBar.xib
index 5a16ca59..b1e7b3b9 100644
--- a/MacPass/FilterBar.xib
+++ b/MacPass/FilterBar.xib
@@ -45,9 +45,10 @@
268
- {{369, 5}, {136, 19}}
+ {{242, 6}, {100, 19}}
+
_NS:9
YES
@@ -120,7 +121,7 @@
268
- {{513, 5}, {42, 17}}
+ {{350, 6}, {42, 17}}
_NS:9
@@ -144,10 +145,10 @@
268
- {{188, 5}, {38, 17}}
+ {{188, 6}, {38, 17}}
-
+
_NS:9
YES
@@ -173,7 +174,7 @@
268
- {{104, 5}, {76, 17}}
+ {{104, 6}, {76, 17}}
@@ -198,7 +199,7 @@
268
- {{5, 6}, {44, 14}}
+ {{5, 7}, {44, 14}}
@@ -239,7 +240,7 @@
268
- {{54, 4}, {42, 19}}
+ {{54, 5}, {42, 19}}
@@ -262,7 +263,7 @@
NO
- {563, 28}
+ {400, 30}
@@ -351,6 +352,14 @@
79
+
+
+ filterSearchField
+
+
+
+ 95
+
@@ -736,11 +745,6 @@
-
- 63
-
-
-
66
@@ -761,7 +765,7 @@
-
+
7
0
@@ -769,12 +773,12 @@
0
1
- 136
+ 100
1000
- 9
- 40
+ 3
+ 9
1
@@ -785,16 +789,6 @@
-
- 83
-
-
-
-
- 85
-
-
-
86
@@ -805,13 +799,28 @@
+
+ 83
+
+
+
+
+ 63
+
+
+
+
+ 93
+
+
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
-
+
@@ -858,22 +867,22 @@
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
-
-
+
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
- 87
+ 95
@@ -908,7 +917,6 @@
NSButton
NSButton
NSButton
- NSLayoutConstraint
NSLayoutConstraint
@@ -944,10 +952,6 @@
filterUsernameButton
NSButton
-
- tableToBottom
- NSLayoutConstraint
-
tableToTop
NSLayoutConstraint
diff --git a/MacPass/MPDocumentWindowController.h b/MacPass/MPDocumentWindowController.h
index 40e67825..f8e44d1c 100644
--- a/MacPass/MPDocumentWindowController.h
+++ b/MacPass/MPDocumentWindowController.h
@@ -26,6 +26,7 @@
@property (readonly, retain) MPInspectorViewController *inspectorTabViewController;
@property (readonly, retain) MPCreationViewController *creationViewController;
+
- (void)showEntries;
- (void)showPasswordInput;
- (void)performFindPanelAction:(id)sender;
diff --git a/MacPass/MPDocumentWindowController.m b/MacPass/MPDocumentWindowController.m
index 53a23d0c..28a15afa 100644
--- a/MacPass/MPDocumentWindowController.m
+++ b/MacPass/MPDocumentWindowController.m
@@ -184,7 +184,7 @@
NSView *entryView = [_entryViewController view];
NSDictionary *views = NSDictionaryOfVariableBindings(outlineView, inspectorView, entryView, _splitView);
- [self.splitView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[outlineView(>=150,<=250)]-1-[entryView(>=250)]-1-[inspectorView(>=200)]|"
+ [self.splitView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[outlineView(>=150,<=250)]-1-[entryView(>=300)]-1-[inspectorView(>=200)]|"
options:0
metrics:nil
views:views]];
diff --git a/MacPass/MPEntryViewController.h b/MacPass/MPEntryViewController.h
index 15650fe3..00f0dde1 100644
--- a/MacPass/MPEntryViewController.h
+++ b/MacPass/MPEntryViewController.h
@@ -28,11 +28,7 @@ typedef enum {
@class KdbEntry;
@class MPOutlineViewDelegate;
-@interface MPEntryViewController : MPViewController {
-@private
- BOOL _isFilterBarVisible;
-}
-
+@interface MPEntryViewController : MPViewController
@property (assign) KdbGroup *activeGroup;
@property (readonly, assign, nonatomic) KdbEntry *selectedEntry;
diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m
index 8cd025dd..6cfa7c0e 100644
--- a/MacPass/MPEntryViewController.m
+++ b/MacPass/MPEntryViewController.m
@@ -56,8 +56,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
@property (retain) NSArray *filteredEntries;
@property (retain) IBOutlet NSView *filterBar;
@property (assign) IBOutlet NSTableView *entryTable;
-@property (assign) IBOutlet NSLayoutConstraint *tableToTop;
-@property (assign) IBOutlet NSLayoutConstraint *tableToBottom;
+@property (retain) IBOutlet NSLayoutConstraint *tableToTop;
@property (assign) IBOutlet NSButton *filterDoneButton;
@property (assign) IBOutlet NSButton *filterTitleButton;
@@ -79,7 +78,9 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
- (BOOL)_shouldFilterUsernames;
- (BOOL)hasFilter;
+- (BOOL)_showsFilterBar;
- (void)updateFilter;
+- (void)updateFilterText:(id)sender;
- (void)setupFilterBar;
- (void)_setupEntryMenu;
/* Notification handling */
@@ -103,7 +104,6 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if(self) {
- _isFilterBarVisible = NO;
_filterMode = MPFilterTitles;
_filterButtonToMode = [@{ _toggleFilterUsernameButton : @(MPFilterUsernames),
_toggleFilterTitleButton : @(MPFilterTitles),
@@ -229,8 +229,9 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
#pragma mark Notifications
- (void)_didChangeGroupSelectionInOutlineView:(NSNotification *)notification {
- if([self hasFilter]) {
- [self.filterSearchField setStringValue:@""];
+ if([self _showsFilterBar]) {
+ //[self.filterSearchField setStringValue:@""];
+ [self clearFilter:nil];
}
MPOutlineViewDelegate *delegate = [notification object];
self.activeGroup = delegate.selectedGroup;
@@ -274,6 +275,9 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
- (void)updateFilter {
[self _showFilterBarAnimated:YES];
+ if(![self hasFilter]) {
+ return;
+ }
dispatch_queue_t backgroundQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(backgroundQueue, ^{
@@ -293,6 +297,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
self.filteredEntries = [[document.root childEntries] filteredArrayUsingPredicate:fullFilter];
dispatch_sync(dispatch_get_main_queue(), ^{
+ [self.entryArrayController unbind:NSContentArrayBinding];
[self.entryArrayController setContent:self.filteredEntries];
[[self.entryTable tableColumnWithIdentifier:MPEntryTableParentColumnIdentifier] setHidden:NO];
});
@@ -300,6 +305,10 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
}
+- (void)updateFilterText:(id)sender {
+ self.filter = [self.filterSearchField stringValue];
+}
+
- (void)setupFilterBar {
if(!self.filterBar) {
[[NSBundle mainBundle] loadNibNamed:@"FilterBar" owner:self topLevelObjects:nil];
@@ -310,12 +319,15 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
[self.filterDoneButton setAction:@selector(clearFilter:)];
[self.filterDoneButton setTarget:nil];
- [self.filterSearchField setAction:@selector(updateFilter:)];
+ [self.filterSearchField setAction:@selector(updateFilterText:)];
[[self.filterSearchField cell] setSendsSearchStringImmediately:NO];
-
}
}
+- (BOOL)_showsFilterBar {
+ return ( nil != [self.filterBar superview]);
+}
+
#pragma mark UI Feedback
- (void)_showFilterBarAnimated:(BOOL)animate {
@@ -332,19 +344,20 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
[self.filterURLButton setState:[self _shouldFilterURLs] ? NSOnState : NSOffState ];
[self.filterUsernameButton setState:[self _shouldFilterUsernames] ? NSOnState : NSOffState];
- if(_isFilterBarVisible) {
- return; // nothign to to
+ if([self _showsFilterBar]) {
+ return; // nothing to to
}
- [((MPDocumentWindowController *)[[self.view window] windowController]) clearOutlineSelection:nil];
- _isFilterBarVisible = YES;
- self.tableToTop.constant = [self.filterBar frame].size.height;
+ [[[self.view window] windowController] clearOutlineSelection:nil];
+ NSView *scrollView = [_entryTable enclosingScrollView];
+ NSDictionary *views = NSDictionaryOfVariableBindings(scrollView, _filterBar);
+ [self.view layout];
+ [self.view removeConstraint:self.tableToTop];
[self.view addSubview:self.filterBar];
- NSRect filterFrame = [self.filterBar frame];
- filterFrame.origin.y = [self.view frame].size.height - filterFrame.size.height;
- filterFrame.size.width = [self.view frame].size.width;
- [self.filterBar setFrame:filterFrame];
+ [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_filterBar]|" options:0 metrics:nil views:views]];
+ [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_filterBar(==30)]-0-[scrollView]" options:0 metrics:nil views:views]];
+
if(animate) {
[NSAnimationContext runAnimationGroup:^(NSAnimationContext* context) {
@@ -362,13 +375,12 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
animate = NO;
- if(!_isFilterBarVisible) {
+ if(![self _showsFilterBar]) {
return; // nothing to do;
}
- _isFilterBarVisible = NO;
- self.tableToTop.constant = -1;
[self.filterBar removeFromSuperview];
+ [self.view addConstraint:self.tableToTop];
if(animate) {
[NSAnimationContext runAnimationGroup:^(NSAnimationContext* context) {
diff --git a/MacPass/MacPass-Info.plist b/MacPass/MacPass-Info.plist
index 27fd8355..8eb022e2 100644
--- a/MacPass/MacPass-Info.plist
+++ b/MacPass/MacPass-Info.plist
@@ -48,7 +48,7 @@
CFBundleSignature
????
CFBundleVersion
- A6E
+ AAD
LSMinimumSystemVersion
${MACOSX_DEPLOYMENT_TARGET}
NSHumanReadableCopyright
diff --git a/MacPass/en.lproj/MainMenu.xib b/MacPass/en.lproj/MainMenu.xib
index 4521b152..c8c5617f 100644
--- a/MacPass/en.lproj/MainMenu.xib
+++ b/MacPass/en.lproj/MainMenu.xib
@@ -2,9 +2,9 @@
1070
- 12D78
+ 12E55
3084
- 1187.37
+ 1187.39
626.00
com.apple.InterfaceBuilder.CocoaPlugin
@@ -380,49 +380,15 @@
-
@@ -708,22 +674,6 @@
240
-
-
- performFindPanelAction:
-
-
-
- 241
-
-
-
- centerSelectionInVisibleArea:
-
-
-
- 245
-
saveDocument:
@@ -796,14 +746,6 @@
374
-
-
- performFindPanelAction:
-
-
-
- 489
-
showHelp:
@@ -828,6 +770,14 @@
1206
+
+
+ performFindPanelAction:
+
+
+
+ 241
+
showPreferences:
@@ -1001,7 +951,7 @@
-
+
@@ -1050,39 +1000,6 @@
-
- 218
-
-
-
-
-
-
-
- 220
-
-
-
-
-
-
-
-
-
- 210
-
-
-
-
- 221
-
-
-
-
- 209
-
-
-
57
@@ -1282,6 +1199,11 @@
+
+ 209
+
+
+
@@ -1318,13 +1240,9 @@
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
@@ -1383,15 +1301,10 @@
MPAppDelegate
NSObject
- id
id
id
-
- showMainWindow:
- id
-
showPasswordCreator:
id
@@ -1431,40 +1344,17 @@
id
-
- NSView
- NSView
- NSView
- NSSplitView
- NSTextField
- NSView
-
-
-
- contentView
- NSView
-
-
- inspectorView
- NSView
-
-
- outlineView
- NSView
-
-
+
+ splitView
+ NSSplitView
+
+
+ splitView
+
splitView
NSSplitView
-
- welcomeText
- NSTextField
-
-
- welcomeView
- NSView
-
-
+
IBProjectSource
./Classes/MPDocumentWindowController.h