2
0

Password window improvements.

[FIXED]     Password window closes initially.
[FIXED]     Site label more visible.
This commit is contained in:
Maarten Billemont 2013-06-16 13:48:51 -04:00
parent 0813fb40d0
commit bd64bfec67
4 changed files with 81 additions and 49 deletions

View File

@ -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 {

View File

@ -10,6 +10,7 @@
@interface MPPasswordWindowController : NSWindowController<NSTextFieldDelegate, NSComboBoxDelegate>
@property(nonatomic, weak) IBOutlet NSTextField *siteLabel;
@property(nonatomic, weak) IBOutlet NSTextField *siteField;
@property(nonatomic, weak) IBOutlet NSTextField *contentField;
@property(nonatomic, weak) IBOutlet NSTextField *tipField;

View File

@ -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;

View File

@ -3,12 +3,12 @@
<data>
<int key="IBDocument.SystemTarget">1080</int>
<string key="IBDocument.SystemVersion">12D78</string>
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
<string key="IBDocument.InterfaceBuilderVersion">4457.6</string>
<string key="IBDocument.AppKitVersion">1187.37</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">3084</string>
<string key="NS.object.0">4457.6</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBNSLayoutConstraint</string>
@ -115,7 +115,7 @@
<object class="NSComboTableView" key="NSTableView" id="847503045">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{13, 21}</string>
<string key="NSFrameSize">{13, 168}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:24</string>
@ -131,7 +131,7 @@
<int key="NSCellFlags">75497472</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents"/>
<object class="NSFont" key="NSSupport">
<object class="NSFont" key="NSSupport" id="9487164">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">12</double>
<int key="NSfFlags">16</int>
@ -203,9 +203,14 @@
<object class="NSShadow" key="NSViewShadow">
<double key="NSShadowVert">1</double>
<double key="NSShadowBlurRadius">1</double>
<object class="NSColor" key="NSShadowColor" id="452100223">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwLjkAA</bytes>
<object class="NSColor" key="NSShadowColor" id="996503418">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlShadowColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC4zMzMzMzMzMzMzAA</bytes>
</object>
</object>
</object>
<string key="NSReuseIdentifierKey">_NS:1535</string>
@ -214,11 +219,7 @@
<int key="NSCellFlags">67108928</int>
<int key="NSCellFlags2">138414144</int>
<string key="NSContents">Maarten Billemont's password for:</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">787</int>
</object>
<reference key="NSSupport" ref="909078752"/>
<string key="NSCellIdentifier">_NS:1535</string>
<reference key="NSControlView" ref="642967193"/>
<object class="NSColor" key="NSBackgroundColor" id="245864165">
@ -227,10 +228,7 @@
<string key="NSColorName">controlColor</string>
<reference key="NSColor" ref="131605477"/>
</object>
<object class="NSColor" key="NSTextColor" id="980321139">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
<reference key="NSTextColor" ref="918660940"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
@ -240,7 +238,6 @@
<string key="NSFrame">{{17, 20}, {446, 17}}</string>
<reference key="NSSuperview" ref="1072816887"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<object class="NSShadow" key="NSViewShadow">
<double key="NSShadowVert">1</double>
<double key="NSShadowBlurRadius">1</double>
@ -255,15 +252,14 @@
<int key="NSCellFlags">67108928</int>
<int key="NSCellFlags2">138414144</int>
<string key="NSContents">Hit enter to copy the password.</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1558</int>
</object>
<reference key="NSSupport" ref="909078752"/>
<string key="NSCellIdentifier">_NS:1505</string>
<reference key="NSControlView" ref="49669222"/>
<reference key="NSBackgroundColor" ref="245864165"/>
<reference key="NSTextColor" ref="980321139"/>
<object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
@ -280,11 +276,7 @@
<int key="NSCellFlags">-1804599231</int>
<int key="NSCellFlags2">138413120</int>
<string key="NSContents">apple.com</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">12</double>
<int key="NSfFlags">2586</int>
</object>
<reference key="NSSupport" ref="9487164"/>
<string key="NSPlaceholderString">Site name</string>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="402376051"/>
@ -447,6 +439,14 @@
</object>
<int key="connectionID">263</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">siteLabel</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="642967193"/>
</object>
<int key="connectionID">266</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
@ -522,9 +522,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="258451033"/>
<int key="scoringType">8</int>
<int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="88899061">
<reference key="firstItem" ref="1072816887"/>
@ -538,9 +539,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="258451033"/>
<int key="scoringType">8</int>
<int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="265452638">
<reference key="firstItem" ref="1072816887"/>
@ -554,9 +556,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="258451033"/>
<int key="scoringType">8</int>
<int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="216428540">
<reference key="firstItem" ref="1072816887"/>
@ -570,9 +573,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="258451033"/>
<int key="scoringType">8</int>
<int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<reference ref="1072816887"/>
</array>
@ -597,6 +601,7 @@
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">2</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="871913200">
<reference key="firstItem" ref="599228032"/>
@ -613,6 +618,7 @@
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="671970801">
<reference key="firstItem" ref="104294954"/>
@ -629,6 +635,7 @@
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">2</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="289992556">
<reference key="firstItem" ref="104294954"/>
@ -645,6 +652,7 @@
<int key="scoringType">5</int>
<float key="scoringTypeFloat">22</float>
<int key="contentType">2</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="451791256">
<reference key="firstItem" ref="104294954"/>
@ -661,6 +669,7 @@
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">2</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="314583816">
<reference key="firstItem" ref="1072816887"/>
@ -674,9 +683,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="1072816887"/>
<int key="scoringType">8</int>
<int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="602857839">
<reference key="firstItem" ref="1072816887"/>
@ -690,9 +700,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="1072816887"/>
<int key="scoringType">8</int>
<int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="63384401">
<reference key="firstItem" ref="49669222"/>
@ -706,9 +717,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="1072816887"/>
<int key="scoringType">8</int>
<int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="645313537">
<reference key="firstItem" ref="642967193"/>
@ -722,9 +734,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="1072816887"/>
<int key="scoringType">8</int>
<int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="232766502">
<reference key="firstItem" ref="402376051"/>
@ -741,6 +754,7 @@
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="884917592">
<reference key="firstItem" ref="402376051"/>
@ -757,6 +771,7 @@
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="566883659">
<reference key="firstItem" ref="139778114"/>
@ -773,6 +788,7 @@
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="831384658">
<reference key="firstItem" ref="1072816887"/>
@ -786,9 +802,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="1072816887"/>
<int key="scoringType">8</int>
<int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="865006730">
<reference key="firstItem" ref="139778114"/>
@ -802,9 +819,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="1072816887"/>
<int key="scoringType">8</int>
<int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
<bool key="placeholder">NO</bool>
</object>
<reference ref="49669222"/>
<reference ref="642967193"/>
@ -855,6 +873,7 @@
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
<bool key="placeholder">NO</bool>
</object>
</array>
<reference key="parent" ref="1072816887"/>
@ -884,6 +903,7 @@
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
<bool key="placeholder">NO</bool>
</object>
</array>
<reference key="parent" ref="1072816887"/>
@ -999,6 +1019,7 @@
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
<bool key="placeholder">NO</bool>
</object>
</array>
<reference key="parent" ref="1072816887"/>
@ -1101,7 +1122,7 @@
<boolean value="NO" key="216.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="216.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<real value="1" key="216.IBViewIntegration.shadowBlurRadius"/>
<reference key="216.IBViewIntegration.shadowColor" ref="452100223"/>
<reference key="216.IBViewIntegration.shadowColor" ref="996503418"/>
<real value="1" key="216.IBViewIntegration.shadowOffsetHeight"/>
<real value="0.0" key="216.IBViewIntegration.shadowOffsetWidth"/>
<string key="217.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@ -1151,7 +1172,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">265</int>
<int key="maxID">266</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -1163,6 +1184,7 @@
<string key="contentField">NSTextField</string>
<string key="progressView">NSProgressIndicator</string>
<string key="siteField">NSTextField</string>
<string key="siteLabel">NSTextField</string>
<string key="tipField">NSTextField</string>
<string key="typeField">NSComboBox</string>
<string key="userLabel">NSTextField</string>
@ -1184,6 +1206,10 @@
<string key="name">siteField</string>
<string key="candidateClassName">NSTextField</string>
</object>
<object class="IBToOneOutletInfo" key="siteLabel">
<string key="name">siteLabel</string>
<string key="candidateClassName">NSTextField</string>
</object>
<object class="IBToOneOutletInfo" key="tipField">
<string key="name">tipField</string>
<string key="candidateClassName">NSTextField</string>
@ -1214,6 +1240,14 @@
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
<real value="1080" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="4600" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<bool key="IBDocument.UseAutolayout">YES</bool>