diff --git a/HNHUi b/HNHUi index 3cce12f4..5655cb45 160000 --- a/HNHUi +++ b/HNHUi @@ -1 +1 @@ -Subproject commit 3cce12f4bc026948e4d31e16fa995e7898996d91 +Subproject commit 5655cb45194b9542cf2abf58cad6fb6508c22773 diff --git a/MacPass/Base.lproj/PasswordInputView.xib b/MacPass/Base.lproj/PasswordInputView.xib index c12b721e..b018a6eb 100644 --- a/MacPass/Base.lproj/PasswordInputView.xib +++ b/MacPass/Base.lproj/PasswordInputView.xib @@ -46,48 +46,75 @@ 268 - + 268 - {{318, 132}, {61, 18}} + {{366, 108}, {31, 25}} - _NS:9 + + _NS:22 YES - + -2080374784 - 268435456 - Check + 134217728 + LucidaGrande 13 1044 - _NS:9 - - 1211912448 - 2 + _NS:22 + + -2033958912 + 163 NSImage - NSSwitch - - - NSSwitch + NSStopProgressTemplate - 200 - 25 + 400 + 75 + + NO + + + + 268 + {{366, 139}, {31, 25}} + + + + _NS:22 + YES + + 67108864 + 134217728 + + + _NS:22 + + -1228652544 + 163 + + NSImage + NSQuickLookTemplate + + + + 400 + 75 NO 268 - {{121, 130}, {191, 22}} + {{167, 141}, {191, 22}} - + _NS:9 YES @@ -125,7 +152,7 @@ 268 - {{160, 160}, {113, 17}} + {{206, 171}, {113, 17}} @@ -167,7 +194,7 @@ NeXT Encapsulated PostScript v1.2 pasteboard type NeXT TIFF v4.0 pasteboard type - {{193, 185}, {48, 48}} + {{238, 196}, {48, 48}} @@ -196,20 +223,16 @@ Apple URL pasteboard type NSFilenamesPboardType - {{118, 101}, {197, 22}} + {{164, 109}, {197, 26}} - + _NS:9 YES 337641473 - 131072 - - LucidaGrande - 11 - 3100 - + 0 + _NS:9 @@ -221,7 +244,7 @@ 268 - {{52, 132}, {64, 17}} + {{98, 143}, {64, 17}} @@ -242,7 +265,7 @@ 268 - {{70, 105}, {46, 17}} + {{116, 113}, {46, 17}} @@ -263,7 +286,7 @@ 268 - {{235, 57}, {83, 32}} + {{281, 65}, {83, 32}} _NS:9 @@ -286,7 +309,7 @@ NO - {434, 282} + {524, 303} @@ -353,12 +376,28 @@ 295 - - toggleDisplayType: - - + + togglePasswordButton + + - 407 + 493 + + + + _clearKey: + + + + 494 + + + + passwordTextField + + + + 495 @@ -391,12 +430,12 @@ 1 - - - 10 + + + 5 0 - - 10 + + 5 1 0.0 @@ -408,7 +447,55 @@ 2 - + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + 5 0 @@ -423,6 +510,22 @@ 24 3 + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + 3 @@ -439,6 +542,22 @@ 24 3 + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + 4 @@ -455,22 +574,6 @@ 40 3 - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - 9 @@ -503,38 +606,6 @@ 40 3 - - - 5 - 0 - - 6 - 1 - - 8 - - 1000 - - 6 - 24 - 3 - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - 3 @@ -551,6 +622,54 @@ 24 3 + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 9 + 0 + + 9 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + 3 @@ -567,8 +686,24 @@ 24 3 - - + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + 9 0 @@ -579,8 +714,8 @@ 1000 - 6 - 24 + 9 + 40 2 @@ -599,54 +734,6 @@ 24 3 - - - 5 - 0 - - 6 - 1 - - 8 - - 1000 - - 6 - 24 - 3 - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - 10 @@ -663,12 +750,12 @@ 40 2 - + - 3 + 4 0 - 3 + 4 1 0.0 @@ -711,14 +798,15 @@ 40 3 + + - + + - - @@ -847,21 +935,11 @@ - - 274 - - - 276 - - 286 - - - 338 @@ -891,64 +969,92 @@ - - 367 - - - - - 373 - - - - - 378 - - - - - 379 - - - 386 - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - 396 - 398 - + 402 + + + + + 408 + + + + + + + + 409 + + + + + 411 + + + + + 389 + + + + + 454 + + + + + 456 + + + + + 459 + + + + + 462 + + + + + 465 + + + + + 286 + + + + + 476 + + + + + 478 + + + + + 479 + + + + + 447 + @@ -957,36 +1063,46 @@ - 401 - + 484 + - 402 - + 485 + - 403 - + 486 + - + - 404 - - + 487 + + - 405 + 488 + + + + + 489 - 406 - + 490 + + + + + 492 + @@ -998,24 +1114,27 @@ - + - - - - + + + + + - - - + + + + + - + @@ -1030,7 +1149,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + @@ -1041,7 +1160,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 @@ -1055,32 +1173,39 @@ 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 - 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 + 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 + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - 407 + 495 @@ -1088,13 +1213,13 @@ HNHRoundedSecureTextField NSSecureTextField - toggleDisplayType: + toggleDisplay: id - toggleDisplayType: + toggleDisplay: - toggleDisplayType: + toggleDisplay: id @@ -1106,22 +1231,26 @@ MPPasswordInputController MPViewController - - _decrypt: - id - - - _decrypt: - + + id + id + + + + _clearKey: + id + + _decrypt: id - + NSImageView NSTextField NSPathControl - NSTextField + HNHRoundedSecureTextField + NSButton @@ -1138,7 +1267,11 @@ passwordTextField - NSTextField + HNHRoundedSecureTextField + + + togglePasswordButton + NSButton @@ -1170,7 +1303,8 @@ 3 {128, 128} - {15, 15} + {21, 16} + {11, 11} YES diff --git a/MacPass/DatabaseSettingsWindow.xib b/MacPass/DatabaseSettingsWindow.xib index d7559d2b..638312ed 100644 --- a/MacPass/DatabaseSettingsWindow.xib +++ b/MacPass/DatabaseSettingsWindow.xib @@ -23,6 +23,8 @@ NSPopUpButtonCell NSScrollView NSScroller + NSSecureTextField + NSSecureTextFieldCell NSStepper NSStepperCell NSTabView @@ -355,7 +357,7 @@ {{69, 126}, {68, 17}} - + _NS:1535 YES @@ -370,28 +372,6 @@ NO - - - 268 - {{142, 124}, {164, 22}} - - - - _NS:9 - YES - - -1804599231 - 272630784 - - - _NS:9 - - YES - - - - NO - 268 @@ -399,20 +379,16 @@ Apple URL pasteboard type NSFilenamesPboardType - {{139, 95}, {170, 22}} + {{139, 92}, {170, 26}} - + _NS:9 YES 337641473 - 131072 - - LucidaGrande - 11 - 3100 - + 0 + _NS:9 @@ -428,7 +404,7 @@ 268 - {{86, 99}, {51, 17}} + {{86, 96}, {51, 17}} @@ -449,7 +425,7 @@ 268 - {{142, 72}, {164, 19}} + {{142, 69}, {164, 19}} @@ -459,7 +435,7 @@ -1543503872 134217728 Generate Keyfile - + LucidaGrande 12 16 @@ -475,24 +451,28 @@ NO - + 268 - {{314, 97}, {44, 19}} + {{314, 122}, {31, 25}} - - _NS:9 + + _NS:22 YES - - -2080374784 + + 67108864 134217728 - Clear - - _NS:9 - - -2038153216 - 164 + + + _NS:22 + + -1228652544 + 163 + + NSImage + NSQuickLookTemplate + 400 @@ -500,6 +480,60 @@ NO + + + 268 + {{314, 91}, {31, 25}} + + + + _NS:22 + YES + + -2080374784 + 134217728 + + + _NS:22 + + -2033958912 + 163 + + NSImage + NSStopProgressTemplate + + + + 400 + 75 + + NO + + + + 268 + {{142, 124}, {164, 22}} + + + + _NS:9 + YES + + 342884416 + 272630848 + + + _NS:9 + + YES + + + + NSAllRomanInputSourcesLocaleIdentifier + + + NO + {{10, 33}, {421, 200}} @@ -1036,14 +1070,6 @@ 655 - - - passwordTextField - - - - 658 - keyfilePathControl @@ -1132,14 +1158,6 @@ 815 - - - clearKey: - - - - 954 - generateKey: @@ -1164,6 +1182,30 @@ 962 + + + passwordTextField + + + + 1048 + + + + clearKey: + + + + 1049 + + + + togglePasswordButton + + + + 1050 + @@ -2510,24 +2552,40 @@ 620 - - - 10 + + + 11 0 - - 10 + + 11 1 - -7 + 0.0 1000 - 5 - 22 + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 2 - + 5 0 @@ -2542,12 +2600,44 @@ 24 3 - - - 11 + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 0 - 11 + 6 1 0.0 @@ -2574,7 +2664,7 @@ 24 3 - + 5 0 @@ -2590,7 +2680,23 @@ 24 2 - + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + 5 0 @@ -2606,72 +2712,24 @@ 24 3 - - + + 3 0 - - 4 + + 3 1 - - 8 + + 54 1000 - 6 - 24 + 3 + 9 3 - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - + + 5 0 @@ -2686,11 +2744,27 @@ 24 3 - - - 3 + + + 5 0 + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 3 + 0 + 3 1 @@ -2702,11 +2776,11 @@ 24 2 - - + + 11 0 - + 11 1 @@ -2718,6 +2792,22 @@ 24 2 + + + 4 + 0 + + 4 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + 5 @@ -2734,12 +2824,13 @@ 9 3 - - - - - + + + + + + @@ -2902,40 +2993,6 @@ - - 625 - - - - - - 7 - 0 - - 0 - 1 - - 164 - - 1000 - - 3 - 9 - 1 - - - - - - 762 - - - - - 626 - - - 685 @@ -3011,84 +3068,6 @@ - - 871 - - - - - 906 - - - - - 923 - - - - - 927 - - - - - 928 - - - - - 942 - - - - - 944 - - - - - 945 - - - - - 949 - - - - - 950 - - - - - 884 - - - - - - - - 948 - - - - - 947 - - - - - 946 - - - - - 885 - - - 956 @@ -3117,6 +3096,146 @@ + + 967 + + + + + + + + 968 + + + + + 1003 + + + + + + + + 1004 + + + + + 1015 + + + + + 1016 + + + + + 1023 + + + + + 1024 + + + + + 1026 + + + + + 1027 + + + + + 1028 + + + + + 1029 + + + + + 1031 + + + + + 1037 + + + + + + 7 + 0 + + 0 + 1 + + 164 + + 1000 + + 3 + 9 + 1 + + + + + + 1038 + + + + + 1040 + + + + + 1041 + + + + + 1042 + + + + + 1043 + + + + + 1044 + + + + + 1045 + + + + + 1046 + + + + + 1047 + + + @@ -3126,6 +3245,33 @@ com.apple.InterfaceBuilder.CocoaPlugin {{357, 418}, {480, 270}} + + 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 + HNHRoundedSecureTextField + + + + + 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 @@ -3289,33 +3435,29 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + - + + - - - - - - - + + + + + + - + + + - + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - HNHRoundedTextField - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3347,7 +3489,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 @@ -3359,43 +3500,41 @@ 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 - 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 - 962 + 1050 - HNHRoundedTextField - NSTextField + HNHRoundedSecureTextField + NSSecureTextField + + toggleDisplay: + id + + + toggleDisplay: + + toggleDisplay: + id + + IBProjectSource - ./Classes/HNHRoundedTextField.h + ./Classes/HNHRoundedSecureTextField.h @@ -3421,7 +3560,7 @@ NSButton NSButton NSPathControl - NSTextField + HNHRoundedSecureTextField NSButton NSButton NSButton @@ -3429,6 +3568,7 @@ NSButton NSTabView NSPopUpButton + NSButton @@ -3453,7 +3593,7 @@ passwordTextField - NSTextField + HNHRoundedSecureTextField protectNotesCheckButton @@ -3483,6 +3623,10 @@ selectRecycleBinGroupPopUpButton NSPopUpButton + + togglePasswordButton + NSButton + IBProjectSource @@ -3506,6 +3650,8 @@ {11, 11} {10, 3} + {21, 16} + {11, 11} {15, 15} YES diff --git a/MacPass/MPDatabaseSettingsWindowController.h b/MacPass/MPDatabaseSettingsWindowController.h index 2377839c..dc5593f8 100644 --- a/MacPass/MPDatabaseSettingsWindowController.h +++ b/MacPass/MPDatabaseSettingsWindowController.h @@ -16,10 +16,10 @@ typedef NS_ENUM(NSUInteger, MPDatabaseSettingsTab) { }; @class MPDocument; +@class HNHRoundedSecureTextField; @interface MPDatabaseSettingsWindowController : NSWindowController - @property (weak) IBOutlet NSTabView *sectionTabView; /* General Tab */ @@ -27,8 +27,9 @@ typedef NS_ENUM(NSUInteger, MPDatabaseSettingsTab) { @property (unsafe_unretained) IBOutlet NSTextView *databaseDescriptionTextView; /* Protection */ -@property (weak) IBOutlet NSTextField *passwordTextField; +@property (weak) IBOutlet HNHRoundedSecureTextField *passwordTextField; @property (weak) IBOutlet NSPathControl *keyfilePathControl; +@property (weak) IBOutlet NSButton *togglePasswordButton; - (IBAction)clearKey:(id)sender; - (IBAction)generateKey:(id)sender; diff --git a/MacPass/MPDatabaseSettingsWindowController.m b/MacPass/MPDatabaseSettingsWindowController.m index 39091446..917c912e 100644 --- a/MacPass/MPDatabaseSettingsWindowController.m +++ b/MacPass/MPDatabaseSettingsWindowController.m @@ -12,6 +12,8 @@ #import "MPDatabaseVersion.h" #import "MPIconHelper.h" +#import "HNHRoundedSecureTextField.h" + #import "Kdb.h" #import "Kdb4Node.h" #import "KdbGroup+MPAdditions.h" @@ -21,6 +23,7 @@ } @property (nonatomic,assign) BOOL trashEnabled; +@property (nonatomic,assign) BOOL showPassword; @end @@ -34,6 +37,7 @@ self = [super initWithWindowNibName:@"DatabaseSettingsWindow"]; if(self) { _document = document; + _showPassword = NO; } return self; } @@ -101,6 +105,7 @@ } - (void)showSettingsTab:(MPDatabaseSettingsTab)tab { + self.showPassword = NO; [self.sectionTabView selectTabViewItemAtIndex:tab]; } @@ -136,6 +141,9 @@ - (void)_setupPasswordTab:(Kdb4Tree *)tree { [self.passwordTextField setStringValue:_document.password ? _document.password : @""]; [self.keyfilePathControl setURL:_document.key]; + + [self.passwordTextField bind:@"showPassword" toObject:self withKeyPath:@"showPassword" options:nil]; + [self.togglePasswordButton bind:NSValueBinding toObject:self withKeyPath:@"showPassword" options:nil]; } - (void)_updateTrashFolders:(Kdb4Tree *)tree { diff --git a/MacPass/MPPasswordInputController.m b/MacPass/MPPasswordInputController.m index 51c0bcfc..99ac8635 100644 --- a/MacPass/MPPasswordInputController.m +++ b/MacPass/MPPasswordInputController.m @@ -11,15 +11,20 @@ #import "MPDocument.h" #import "MPKeyfilePathControlDelegate.h" +#import "HNHRoundedSecureTextField.h" + @interface MPPasswordInputController () -@property (weak) IBOutlet NSTextField *passwordTextField; +@property (weak) IBOutlet HNHRoundedSecureTextField *passwordTextField; @property (weak) IBOutlet NSPathControl *keyPathControl; @property (strong) MPKeyfilePathControlDelegate *pathControlDelegate; @property (weak) IBOutlet NSImageView *errorImageView; @property (weak) IBOutlet NSTextField *errorInfoTextField; +@property (weak) IBOutlet NSButton *togglePasswordButton; +@property (assign) BOOL showPassword; - (IBAction)_decrypt:(id)sender; +- (IBAction)_clearKey:(id)sender; @end @@ -33,6 +38,8 @@ - (void)didLoadView { [self.keyPathControl setDelegate:self.pathControlDelegate]; [self.errorImageView setImage:[NSImage imageNamed:NSImageNameCaution]]; + [self.passwordTextField bind:@"showPassword" toObject:self withKeyPath:@"showPassword" options:nil]; + [self.togglePasswordButton bind:NSValueBinding toObject:self withKeyPath:@"showPassword" options:nil]; [self _reset]; } @@ -72,7 +79,13 @@ } } } + +- (IBAction)_clearKey:(id)sender { + [self.keyPathControl setURL:nil]; +} + - (void)_reset { + self.showPassword = NO; [self.passwordTextField setStringValue:@""]; [self.keyPathControl setURL:nil]; [self.errorInfoTextField setHidden:YES]; diff --git a/MacPass/MacPass-Info.plist b/MacPass/MacPass-Info.plist index 876b7e0b..af1bf220 100644 --- a/MacPass/MacPass-Info.plist +++ b/MacPass/MacPass-Info.plist @@ -48,7 +48,7 @@ CFBundleSignature ???? CFBundleVersion - 2238 + 2288 LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHumanReadableCopyright