Updated to new HNHRoundedSecureTextField

This commit is contained in:
michael starke
2013-07-09 03:04:55 +02:00
parent 79a8c05e95
commit 6ba8b1445d
7 changed files with 323 additions and 189 deletions

View File

@@ -32,6 +32,7 @@
#import "HNHGradientView.h"
#import "HNHTableRowView.h"
#import "HNHRoundedSecureTextField.h"
enum {
MPGeneralTab,
@@ -53,6 +54,8 @@ enum {
@property (nonatomic, weak) NSDate *modificationDate;
@property (nonatomic, weak) NSDate *creationDate;
@property (nonatomic, assign) BOOL showPassword;
@property (nonatomic, assign) NSUInteger activeTab;
@property (weak) IBOutlet NSTabView *tabView;
@property (strong) NSArrayController *attachmentsController;
@@ -75,6 +78,7 @@ enum {
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
_showPassword = NO;
_selectedEntry = nil;
_selectedGroup = nil;
_attachmentsController = [[NSArrayController alloc] init];
@@ -106,6 +110,9 @@ enum {
[_customFieldsTableView bind:NSContentBinding toObject:self.customFieldsController withKeyPath:@"arrangedObjects" options:nil];
[_customFieldsTableView setDelegate:self];
[self.passwordTextField bind:@"showPassword" toObject:self withKeyPath:@"showPassword" options:nil];
[self.togglePassword bind:NSValueBinding toObject:self withKeyPath:@"showPassword" options:nil];
[self _clearContent];
}
@@ -255,6 +262,7 @@ enum {
enabled &= (self.selectedEntry != nil);
[self.passwordTextField setEnabled:enabled];
[self.togglePassword setEnabled:enabled];
[self.usernameTextField setEnabled:enabled];
[self.URLTextField setEnabled:enabled];
[self.generatePasswordButton setEnabled:enabled];