From bd64bfec677ad0315b5839b8e0b4004fdd6803fc Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sun, 16 Jun 2013 13:48:51 -0400 Subject: [PATCH] Password window improvements. [FIXED] Password window closes initially. [FIXED] Site label more visible. --- MasterPassword/ObjC/Mac/MPMacAppDelegate.m | 7 -- .../ObjC/Mac/MPPasswordWindowController.h | 1 + .../ObjC/Mac/MPPasswordWindowController.m | 8 +- .../ObjC/Mac/MPPasswordWindowController.xib | 114 ++++++++++++------ 4 files changed, 81 insertions(+), 49 deletions(-) diff --git a/MasterPassword/ObjC/Mac/MPMacAppDelegate.m b/MasterPassword/ObjC/Mac/MPMacAppDelegate.m index 6643a190..23e00005 100644 --- a/MasterPassword/ObjC/Mac/MPMacAppDelegate.m +++ b/MasterPassword/ObjC/Mac/MPMacAppDelegate.m @@ -299,10 +299,6 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven - (void)setActiveUser:(MPUserEntity *)activeUser { - BOOL reopenPasswordWindow = [self.passwordWindow.window isVisible]; - - [self.passwordWindow close]; - self.passwordWindow = nil; [super setActiveUser:activeUser]; self.usersItem.state = NSMixedState; @@ -316,9 +312,6 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven }]; [MPMacConfig get].usedUserName = activeUser.name; - - if (reopenPasswordWindow) - [self showPasswordWindow:nil]; } - (void)updateMenuItems { diff --git a/MasterPassword/ObjC/Mac/MPPasswordWindowController.h b/MasterPassword/ObjC/Mac/MPPasswordWindowController.h index ac41e185..98a49c51 100644 --- a/MasterPassword/ObjC/Mac/MPPasswordWindowController.h +++ b/MasterPassword/ObjC/Mac/MPPasswordWindowController.h @@ -10,6 +10,7 @@ @interface MPPasswordWindowController : NSWindowController +@property(nonatomic, weak) IBOutlet NSTextField *siteLabel; @property(nonatomic, weak) IBOutlet NSTextField *siteField; @property(nonatomic, weak) IBOutlet NSTextField *contentField; @property(nonatomic, weak) IBOutlet NSTextField *tipField; diff --git a/MasterPassword/ObjC/Mac/MPPasswordWindowController.m b/MasterPassword/ObjC/Mac/MPPasswordWindowController.m index bf602c48..dfce1760 100644 --- a/MasterPassword/ObjC/Mac/MPPasswordWindowController.m +++ b/MasterPassword/ObjC/Mac/MPPasswordWindowController.m @@ -32,10 +32,14 @@ - (void)windowDidLoad { - if ([[MPMacConfig get].dialogStyleHUD boolValue]) + if ([[MPMacConfig get].dialogStyleHUD boolValue]) { self.window.styleMask = NSHUDWindowMask | NSTitledWindowMask | NSUtilityWindowMask | NSClosableWindowMask; - else + self.siteLabel.textColor = [NSColor whiteColor]; + } + else { self.window.styleMask = NSTexturedBackgroundWindowMask | NSResizableWindowMask | NSTitledWindowMask | NSClosableWindowMask; + self.siteLabel.textColor = [NSColor controlTextColor]; + } self.backgroundQueue = [NSOperationQueue new]; self.backgroundQueue.maxConcurrentOperationCount = 1; diff --git a/MasterPassword/ObjC/Mac/MPPasswordWindowController.xib b/MasterPassword/ObjC/Mac/MPPasswordWindowController.xib index e6bab72f..9a4ee5d4 100644 --- a/MasterPassword/ObjC/Mac/MPPasswordWindowController.xib +++ b/MasterPassword/ObjC/Mac/MPPasswordWindowController.xib @@ -3,12 +3,12 @@ 1080 12D78 - 3084 + 4457.6 1187.37 626.00 com.apple.InterfaceBuilder.CocoaPlugin - 3084 + 4457.6 IBNSLayoutConstraint @@ -115,7 +115,7 @@ 274 - {13, 21} + {13, 168} _NS:24 @@ -131,7 +131,7 @@ 75497472 0 - + LucidaGrande 12 16 @@ -203,9 +203,14 @@ 1 1 - - 3 - MCAwLjkAA + + 6 + System + controlShadowColor + + 3 + MC4zMzMzMzMzMzMzAA + _NS:1535 @@ -214,11 +219,7 @@ 67108928 138414144 Maarten Billemont's password for: - - LucidaGrande - 13 - 787 - + _NS:1535 @@ -227,10 +228,7 @@ controlColor - - 1 - MSAxIDEAA - + NO @@ -240,7 +238,6 @@ {{17, 20}, {446, 17}} - 1 1 @@ -255,15 +252,14 @@ 67108928 138414144 Hit enter to copy the password. - - LucidaGrande - 13 - 1558 - + _NS:1505 - + + 1 + MSAxIDEAA + NO @@ -280,11 +276,7 @@ -1804599231 138413120 apple.com - - LucidaGrande - 12 - 2586 - + Site name _NS:9 @@ -447,6 +439,14 @@ 263 + + + siteLabel + + + + 266 + delegate @@ -522,9 +522,10 @@ 1000 - 8 + 0 29 3 + NO @@ -538,9 +539,10 @@ 1000 - 8 + 0 29 3 + NO @@ -554,9 +556,10 @@ 1000 - 8 + 0 29 3 + NO @@ -570,9 +573,10 @@ 1000 - 8 + 0 29 3 + NO @@ -597,6 +601,7 @@ 6 24 2 + NO @@ -613,6 +618,7 @@ 6 24 3 + NO @@ -629,6 +635,7 @@ 6 24 2 + NO @@ -645,6 +652,7 @@ 5 22 2 + NO @@ -661,6 +669,7 @@ 6 24 2 + NO @@ -674,9 +683,10 @@ 1000 - 8 + 0 29 3 + NO @@ -690,9 +700,10 @@ 1000 - 8 + 0 29 3 + NO @@ -706,9 +717,10 @@ 1000 - 8 + 0 29 3 + NO @@ -722,9 +734,10 @@ 1000 - 8 + 0 29 3 + NO @@ -741,6 +754,7 @@ 3 9 3 + NO @@ -757,6 +771,7 @@ 6 24 3 + NO @@ -773,6 +788,7 @@ 6 24 3 + NO @@ -786,9 +802,10 @@ 1000 - 8 + 0 29 3 + NO @@ -802,9 +819,10 @@ 1000 - 8 + 0 29 3 + NO @@ -855,6 +873,7 @@ 3 9 1 + NO @@ -884,6 +903,7 @@ 3 9 1 + NO @@ -999,6 +1019,7 @@ 3 9 1 + NO @@ -1101,7 +1122,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin @@ -1151,7 +1172,7 @@ - 265 + 266 @@ -1163,6 +1184,7 @@ NSTextField NSProgressIndicator NSTextField + NSTextField NSTextField NSComboBox NSTextField @@ -1184,6 +1206,10 @@ siteField NSTextField + + siteLabel + NSTextField + tipField NSTextField @@ -1214,6 +1240,14 @@ 0 IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + YES 3 YES