diff --git a/MacPass/EntryView.xib b/MacPass/EntryView.xib index d5c01b5f..d2b0db86 100644 --- a/MacPass/EntryView.xib +++ b/MacPass/EntryView.xib @@ -2,10 +2,10 @@ 1080 - 12C3103 + 12E55 3084 - 1187.34 - 625.00 + 1187.39 + 626.00 com.apple.InterfaceBuilder.CocoaPlugin 3084 @@ -58,22 +58,21 @@ 256 - {624, 346} + {788, 511} - + _NS:13 YES NO YES - - + + 256 - {624, 17} - + {788, 17} + - _NS:16 @@ -150,7 +149,7 @@ Title Column - 137.22265625 + 144.1171875 40 3.4028234663852886e+38 @@ -177,7 +176,7 @@ Password Column - 116.6953125 + 118.73046875 10 3.4028234663852886e+38 @@ -230,7 +229,7 @@ - 137 + 292 10 3.4028234663852886e+38 @@ -293,14 +292,14 @@ 1 - {{0, 17}, {624, 346}} + {{0, 17}, {788, 511}} _NS:11 - 4 + 6 @@ -313,13 +312,12 @@ NO _doScroller: - 37 - 0.1947367936372757 + 0.99711815561959649 -2147483392 - {{0, 509}, {490, 16}} + {{0, 310}, {480, 16}} _NS:60 @@ -327,43 +325,44 @@ 1 _doScroller: - 0.9859154929577465 + 0.96579476861167002 - + 2304 - + - {624, 17} + {788, 17} - - _NS:15 - + + 4 - {624, 363} + {788, 528} - + _NS:9 133680 - + QSAAAEEgAABBmAAAQZgAAA 0.25 4 1 - {624, 363} + {788, 527} + + YES _NS:9 NSView @@ -406,7 +405,7 @@ 3 1 - 0.0 + -1 1000 @@ -500,7 +499,6 @@ {{3, 0}, {17, 17}} - _NS:11 YES @@ -522,7 +520,7 @@ 266 - {{25, 0}, {112, 17}} + {{25, 0}, {119, 17}} _NS:20 @@ -541,7 +539,7 @@ NO - {{109, 1}, {137, 17}} + {{109, 1}, {144, 17}} _NS:9 @@ -584,7 +582,7 @@ NO - {{369, 1}, {113, 17}} + {{378, 1}, {113, 17}} @@ -601,7 +599,7 @@ 266 - {117, 17} + {119, 17} {250, 750} @@ -618,7 +616,7 @@ NO - {{249, 1}, {117, 17}} + {{256, 1}, {119, 17}} @@ -635,7 +633,7 @@ 266 - {137, 17} + {292, 17} {250, 750} @@ -652,7 +650,7 @@ NO - {{485, 1}, {137, 17}} + {{494, 1}, {292, 17}} @@ -733,9 +731,9 @@ - + @@ -877,36 +875,52 @@ 297 - - + + 5 0 - - 5 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 6 + 0 + + 6 1 3 1000 - 9 - 40 + 8 + 29 3 - + - 3 + 10 0 - - 3 + + 10 1 0.0 1000 - 6 - 24 + 5 + 22 2 @@ -925,70 +939,38 @@ 24 2 - + - 5 + 3 0 - 6 - 1 - - 8 - - 1000 - - 9 - 40 - 3 - - - - 6 - 0 - - 6 - 1 - - 3 - - 1000 - - 9 - 40 - 3 - - - - 5 - 0 - - 6 - 1 - - 8 - - 1000 - - 9 - 40 - 3 - - - - 10 - 0 - - 10 + 3 1 0.0 1000 - 5 - 22 + 6 + 24 2 + + + 5 + 0 + + 5 + 1 + + 3 + + 1000 + + 8 + 29 + 3 + @@ -1046,21 +1028,6 @@ - - 329 - - - - - 328 - - - - - 317 - - - 314 @@ -1071,11 +1038,6 @@ - - 318 - - - 232 @@ -1095,11 +1057,6 @@ - - 57 - - - 58 @@ -1375,11 +1332,6 @@ - - 621 - - - 622 @@ -1395,6 +1347,31 @@ + + 676 + + + + + 677 + + + + + 678 + + + + + 679 + + + + + 621 + + + @@ -1432,14 +1409,13 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - + + - - - + + com.apple.InterfaceBuilder.CocoaPlugin ImageCell @@ -1455,10 +1431,6 @@ 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 @@ -1507,7 +1479,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -1529,12 +1500,16 @@ 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 - 675 + 681 diff --git a/MacPass/MPEntryViewController.h b/MacPass/MPEntryViewController.h index 4f5ebf95..15650fe3 100644 --- a/MacPass/MPEntryViewController.h +++ b/MacPass/MPEntryViewController.h @@ -28,7 +28,10 @@ typedef enum { @class KdbEntry; @class MPOutlineViewDelegate; -@interface MPEntryViewController : MPViewController +@interface MPEntryViewController : MPViewController { +@private + BOOL _isFilterBarVisible; +} @property (assign) KdbGroup *activeGroup; diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m index bff6e03f..6d13dc00 100644 --- a/MacPass/MPEntryViewController.m +++ b/MacPass/MPEntryViewController.m @@ -56,7 +56,6 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; @property (retain) NSArray *filteredEntries; @property (retain) IBOutlet NSView *filterBar; @property (assign) IBOutlet NSTableView *entryTable; -@property (assign) BOOL isStatusBarVisible; @property (assign) IBOutlet NSLayoutConstraint *tableToTop; @property (assign) IBOutlet NSLayoutConstraint *tableToBottom; @property (assign) IBOutlet NSButton *filterDoneButton; @@ -86,7 +85,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; /* Notification handling */ - (void)_didChangeGroupSelectionInOutlineView:(NSNotification *)notification; - (void)_showFilterBarAnimated:(BOOL)animate; -- (void)_hideStatusBarAnimated:(BOOL)animate; +- (void)_hideFilterBarAnimated:(BOOL)animate; - (void)_columnDoubleClick:(id)sender; - (void)_copyToPasteboard:(NSString *)data overlayInfo:(MPOVerlayInfoType)overlayInfoType; @@ -104,7 +103,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if(self) { - _isStatusBarVisible = YES; + _isFilterBarVisible = NO; _filterMode = MPFilterTitles; _filterButtonToMode = [@{ _toggleFilterUsernameButton : @(MPFilterUsernames), _toggleFilterTitleButton : @(MPFilterTitles), @@ -129,7 +128,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; - (void)didLoadView { [self.view setWantsLayer:YES]; - [self _hideStatusBarAnimated:NO]; + [self _hideFilterBarAnimated:NO]; MPDocumentWindowController *windowController = [self windowController]; [[NSNotificationCenter defaultCenter] addObserver:self @@ -174,16 +173,6 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; [self.entryTable bind:NSSortDescriptorsBinding toObject:self.entryArrayController withKeyPath:@"sortDescriptors" options:nil]; [parentColumn setHidden:YES]; - - - NSLayoutConstraint *widthConstraint = [NSLayoutConstraint constraintWithItem:[self view] - attribute:NSLayoutAttributeWidth - relatedBy:NSLayoutRelationGreaterThanOrEqual - toItem:nil - attribute:NSLayoutAttributeNotAnAttribute - multiplier:1 - constant:300]; - [[self view] addConstraint:widthConstraint]; } #pragma mark NSTableViewDelgate @@ -200,28 +189,27 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; if(isTitleColumn || isGroupColumn) { view = [tableView makeViewWithIdentifier:_MPTableImageCellView owner:self]; if( isTitleColumn ) { - [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"title" options:nil]; - //[[view textField] setStringValue:entry.title]; + [[view textField] bind:NSValueBinding toObject:entry withKeyPath:MPEntryTitleUndoableKey options:nil]; [[view imageView] setImage:[MPIconHelper icon:(MPIconType)entry.image]]; } else { - [[view textField] setStringValue:entry.parent.name]; + assert(entry.parent); + [[view textField] bind:NSValueBinding toObject:entry.parent withKeyPath:MPGroupNameUndoableKey options:nil]; [[view imageView] setImage:[MPIconHelper icon:(MPIconType)entry.parent.image]]; } } else if( isPasswordColum ) { view = [tableView makeViewWithIdentifier:_MPTAbleSecurCellView owner:self]; - [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"password" options:nil]; - [[view textField] setStringValue:entry.password]; + [[view textField] bind:NSValueBinding toObject:entry withKeyPath:MPEntryPasswordUndoableKey options:nil]; } else if( isUsernameColumn || isURLColumn ) { view = [tableView makeViewWithIdentifier:_MPTableStringCellView owner:self]; if(isURLColumn) { - [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"url" options:nil]; + [[view textField] bind:NSValueBinding toObject:entry withKeyPath:MPEntryUrlUndoableKey options:nil]; //[[view textField] setStringValue:entry.url]; } else { - [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"username" options:nil]; + [[view textField] bind:NSValueBinding toObject:entry withKeyPath:MPEntryUsernameUndoableKey options:nil]; //[[view textField] setStringValue:entry.username]; } } @@ -282,7 +270,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; - (void)clearFilter:(id)sender { self.filter = nil; [[self.entryTable tableColumnWithIdentifier:MPEntryTableParentColumnIdentifier] setHidden:YES]; - [self _hideStatusBarAnimated:YES]; + [self _hideFilterBarAnimated:YES]; } - (void)updateFilter { @@ -346,12 +334,12 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; [self.filterURLButton setState:[self _shouldFilterURLs] ? NSOnState : NSOffState ]; [self.filterUsernameButton setState:[self _shouldFilterUsernames] ? NSOnState : NSOffState]; - if(self.isStatusBarVisible) { + if(_isFilterBarVisible) { return; // nothign to to } [((MPDocumentWindowController *)[[self.view window] windowController]) clearOutlineSelection:nil]; - self.isStatusBarVisible = YES; + _isFilterBarVisible = YES; self.tableToTop.constant = [self.filterBar frame].size.height; [self.view addSubview:self.filterBar]; @@ -372,18 +360,17 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; } } -- (void)_hideStatusBarAnimated:(BOOL)animate { - +- (void)_hideFilterBarAnimated:(BOOL)animate { animate = NO; - if(!self.isStatusBarVisible) { + if(!_isFilterBarVisible) { return; // nothing to do; } - self.isStatusBarVisible = NO; + _isFilterBarVisible = NO; self.tableToTop.constant = -1; - [self.filterBar removeFromSuperviewWithoutNeedingDisplay]; + [self.filterBar removeFromSuperview]; if(animate) { [NSAnimationContext runAnimationGroup:^(NSAnimationContext* context) { diff --git a/MacPass/MacPass-Info.plist b/MacPass/MacPass-Info.plist index 5e3e5ee9..a8b6947b 100644 --- a/MacPass/MacPass-Info.plist +++ b/MacPass/MacPass-Info.plist @@ -48,7 +48,7 @@ CFBundleSignature ???? CFBundleVersion - 883 + 89E LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHumanReadableCopyright