diff --git a/MacPass/EntryView.xib b/MacPass/EntryView.xib
index fdd3330a..cd7e680c 100644
--- a/MacPass/EntryView.xib
+++ b/MacPass/EntryView.xib
@@ -45,7 +45,7 @@
NSApplication
@@ -331,7 +326,6 @@
{{0, 17}, {694, 548}}
-
_NS:11
@@ -343,7 +337,6 @@
-2147483392
{{224, 17}, {15, 102}}
-
_NS:58
NO
@@ -356,7 +349,6 @@
-2147483392
{{0, 310}, {480, 16}}
-
_NS:60
NO
@@ -373,7 +365,6 @@
{694, 17}
-
@@ -382,8 +373,7 @@
{{0, 30}, {694, 565}}
-
-
+
_NS:9
133680
@@ -397,8 +387,6 @@
{694, 594}
-
-
_NS:9
NSView
@@ -424,7 +412,23 @@
- tableToTop
+ bottomBar
+
+
+
+ 744
+
+
+
+ addEntryButton
+
+
+
+ 745
+
+
+
+ tableToTopConstraint
@@ -443,23 +447,7 @@
3
- 686
-
-
-
- bottomBar
-
-
-
- 744
-
-
-
- addEntryButton
-
-
-
- 745
+ 844
@@ -471,7 +459,7 @@
266
- {104.5, 17}
+ {105, 17}
{250, 750}
@@ -493,7 +481,7 @@
NO
- {{1, 1}, {104.5, 17}}
+ {{1, 1}, {105, 17}}
@@ -562,7 +550,7 @@
NO
- {{108.5, 1}, {144, 17}}
+ {{109, 1}, {144, 17}}
_NS:9
@@ -605,7 +593,7 @@
NO
- {{377, 1}, {113, 17}}
+ {{378, 1}, {113, 17}}
@@ -622,7 +610,7 @@
266
- {118.5, 17}
+ {119, 17}
{250, 750}
@@ -639,7 +627,7 @@
NO
- {{255.5, 1}, {118.5, 17}}
+ {{256, 1}, {119, 17}}
@@ -673,7 +661,7 @@
NO
- {{493, 1}, {198, 17}}
+ {{494, 1}, {198, 17}}
@@ -1741,7 +1729,7 @@
- 843
+ 844
diff --git a/MacPass/MPDatabaseSettingsWindowController.h b/MacPass/MPDatabaseSettingsWindowController.h
index 987a3163..bc0e75c7 100644
--- a/MacPass/MPDatabaseSettingsWindowController.h
+++ b/MacPass/MPDatabaseSettingsWindowController.h
@@ -18,7 +18,7 @@ typedef NS_ENUM(NSUInteger, MPDatabaseSettingsTab) {
};
@class MPDocument;
-@class HNHRoundendTextField;
+@class HNHRoundedTextField;
@class HNHRoundedSecureTextField;
@interface MPDatabaseSettingsWindowController : NSWindowController
@@ -58,7 +58,7 @@ typedef NS_ENUM(NSUInteger, MPDatabaseSettingsTab) {
/* Templates Tab */
-@property (weak) IBOutlet HNHRoundendTextField *defaultUsernameTextField;
+@property (weak) IBOutlet HNHRoundedTextField *defaultUsernameTextField;
@property (weak) IBOutlet NSPopUpButton *templateGroupPopUpButton;
diff --git a/MacPass/MPDatabaseSettingsWindowController.m b/MacPass/MPDatabaseSettingsWindowController.m
index eeafd4d6..fb4779f6 100644
--- a/MacPass/MPDatabaseSettingsWindowController.m
+++ b/MacPass/MPDatabaseSettingsWindowController.m
@@ -46,7 +46,7 @@
_document = document;
_showPassword = NO;
_hasValidPasswordOrKey = NO;
- _missingFeature = NSLocalizedString(@"KDBX_ONLX_FEATURE", "Feature only available in kdbx databases");
+ _missingFeature = NSLocalizedString(@"KDBX_ONLY_FEATURE", "Feature only available in kdbx databases");
}
return self;
}
@@ -156,7 +156,7 @@
- (void)showSettingsTab:(MPDatabaseSettingsTab)tab {
/*
We need to make sure the window is loaded
- so we just call the the getter and led teh loading commence
+ so we just call the the getter and led the loading commence
*/
if(![self window]) {
return;
@@ -315,7 +315,14 @@
}
- (void)_setupTemplatesTab:(Kdb4Tree *)tree {
-
+ if(tree) {
+ [self.defaultUsernameTextField setStringValue:tree.defaultUserName];
+ [self.defaultUsernameTextField setEditable:YES];
+ }
+ else {
+ [self.defaultUsernameTextField setStringValue:_missingFeature];
+ [self.defaultUsernameTextField setEditable:NO];
+ }
}
- (void)_updateFirstResponder {
diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m
index e628ce3b..283fb91a 100644
--- a/MacPass/MPEntryViewController.m
+++ b/MacPass/MPEntryViewController.m
@@ -32,7 +32,7 @@
#import "MPNotifications.h"
-#define STATUS_BAR_ANIMATION_TIME 0.2
+#define STATUS_BAR_ANIMATION_TIME 0.15
typedef NS_OPTIONS(NSUInteger, MPFilterModeType) {
MPFilterNone = 0,
@@ -71,7 +71,8 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
@property (strong) IBOutlet NSView *filterBar;
@property (strong) IBOutlet HNHGradientView *trashBar;
@property (weak) IBOutlet NSTableView *entryTable;
-@property (strong) IBOutlet NSLayoutConstraint *tableToTop;
+@property (strong) IBOutlet NSLayoutConstraint *tableToTopConstraint;
+@property (strong) NSLayoutConstraint *filterbarTopConstraint;
@property (weak) IBOutlet NSButton *filterDoneButton;
@property (weak) IBOutlet NSButton *filterTitleButton;
@@ -126,7 +127,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
- (void)didLoadView {
[self.view setWantsLayer:YES];
- [self _hideFilterBarAnimated:NO];
+ [self _hideFilterBarAnimated];
[_bottomBar setBorderType:HNHBorderTop];
[self.addEntryButton setAction:[MPActionHelper actionOfType:MPActionAddEntry]];
@@ -254,7 +255,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
}
/*
If a grup is the current item, see if we already show that group
- */
+ */
if(document.selectedItem == document.selectedGroup) {
/*
If we reselct the group, or just another group
@@ -284,7 +285,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
#pragma mark Filtering
- (void)showFilter:(id)sender {
- [self _showFilterBarAnimated:NO];
+ [self _showFilterBarAnimated];
}
- (BOOL)hasFilter {
@@ -302,13 +303,13 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
self.filter = nil;
[self.filterSearchField setStringValue:@""];
[[self.entryTable tableColumnWithIdentifier:MPEntryTableParentColumnIdentifier] setHidden:YES];
- [self _hideFilterBarAnimated:YES];
+ [self _hideFilterBarAnimated];
MPDocument *document = [[self windowController] document];
document.selectedGroup = document.selectedGroup;
}
- (void)updateFilter {
- [self _showFilterBarAnimated:YES];
+ [self _showFilterBarAnimated];
if(![self hasFilter]) {
return;
}
@@ -365,9 +366,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
#pragma mark UI Feedback
-- (void)_showFilterBarAnimated:(BOOL)animate {
-
- animate = NO;
+- (void)_showFilterBarAnimated {
if(!self.filterBar) {
[self setupFilterBar];
@@ -386,48 +385,49 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
NSView *scrollView = [_entryTable enclosingScrollView];
NSDictionary *views = NSDictionaryOfVariableBindings(scrollView, _filterBar);
[self.view layout];
- [self.view removeConstraint:self.tableToTop];
+
[self.view addSubview:self.filterBar];
[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]];
+ [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[_filterBar(==30)]-0-[scrollView]" options:0 metrics:nil views:views]];
+ [[self view] layoutSubtreeIfNeeded];
+ [self.view removeConstraint:self.tableToTopConstraint];
+ self.filterbarTopConstraint = [NSLayoutConstraint constraintWithItem:self.filterBar
+ attribute:NSLayoutAttributeTop
+ relatedBy:NSLayoutRelationEqual
+ toItem:[self view]
+ attribute:NSLayoutAttributeTop
+ multiplier:1
+ constant:0];
+ [[self view] addConstraint:self.filterbarTopConstraint];
- if(animate) {
- [NSAnimationContext runAnimationGroup:^(NSAnimationContext* context) {
- context.duration = STATUS_BAR_ANIMATION_TIME;
- context.allowsImplicitAnimation = YES;
- [self.view layoutSubtreeIfNeeded];
- } completionHandler:nil] ;
- }
- else {
+ [NSAnimationContext runAnimationGroup:^(NSAnimationContext* context) {
+ context.duration = STATUS_BAR_ANIMATION_TIME;
+ context.allowsImplicitAnimation = YES;
[self.view layoutSubtreeIfNeeded];
- }
+ } completionHandler:nil] ;
[[[self windowController] window] makeFirstResponder:self.filterSearchField];
}
-- (void)_hideFilterBarAnimated:(BOOL)animate {
-
- animate = NO;
+- (void)_hideFilterBarAnimated {
if(![self _showsFilterBar]) {
return; // nothing to do;
}
- [self.filterBar removeFromSuperview];
- [self.view addConstraint:self.tableToTop];
+ [[self view] removeConstraint:self.filterbarTopConstraint];
+ [self.view addConstraint:self.tableToTopConstraint];
- if(animate) {
- [NSAnimationContext runAnimationGroup:^(NSAnimationContext* context) {
- context.duration = STATUS_BAR_ANIMATION_TIME;
- context.allowsImplicitAnimation = YES;
- [self.view layoutSubtreeIfNeeded];
- } completionHandler:nil] ;
- }
- else {
+ [NSAnimationContext runAnimationGroup:^(NSAnimationContext* context) {
+ context.duration = STATUS_BAR_ANIMATION_TIME;
+ context.allowsImplicitAnimation = YES;
[self.view layoutSubtreeIfNeeded];
- }
+ } completionHandler:^{
+ [self.filterBar removeFromSuperview];
+ }] ;
}
+
- (void)_copyToPasteboard:(NSString *)data overlayInfo:(MPOVerlayInfoType)overlayInfoType name:(NSString *)name{
if(data) {
[[MPPasteBoardController defaultController] copyObjects:@[ data ]];
@@ -468,7 +468,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
NSView *scrollView = [_entryTable enclosingScrollView];
NSDictionary *views = NSDictionaryOfVariableBindings(scrollView, _trashBar);
[[self view] layout];
- [[self view] removeConstraint:self.tableToTop];
+ [[self view] removeConstraint:self.tableToTopConstraint];
[[self view] addSubview:self.trashBar];
[[self view] addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_trashBar]|" options:0 metrics:nil views:views]];
[[self view] addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_trashBar(==30)]-0-[scrollView]" options:0 metrics:nil views:views]];
@@ -490,7 +490,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
}
[self.trashBar removeFromSuperview];
- [[self view] addConstraint:self.tableToTop];
+ [[self view] addConstraint:self.tableToTopConstraint];
[[self view] layoutSubtreeIfNeeded];
}
diff --git a/MacPass/de.lproj/Localizable.strings b/MacPass/de.lproj/Localizable.strings
index be3ab848..260b0631 100644
Binary files a/MacPass/de.lproj/Localizable.strings and b/MacPass/de.lproj/Localizable.strings differ
diff --git a/MacPass/en.lproj/Localizable.strings b/MacPass/en.lproj/Localizable.strings
index d34d6880..5d960e04 100644
Binary files a/MacPass/en.lproj/Localizable.strings and b/MacPass/en.lproj/Localizable.strings differ