mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 22:52:26 +00:00
Ui for the password wizzard now works more or less.
Password creation needs to be finalized
This commit is contained in:
2
HNHUi
2
HNHUi
Submodule HNHUi updated: 23b62dd2c5...253f23e7c9
@@ -30,6 +30,7 @@
|
||||
4C46B88517063A070046109A /* NSString+MPPasswordCreation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C46B88417063A070046109A /* NSString+MPPasswordCreation.m */; };
|
||||
4C46B88817063A170046109A /* NSString+MPPasswordAnalysis.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C46B88717063A170046109A /* NSString+MPPasswordAnalysis.m */; };
|
||||
4C46B88B1706D16E0046109A /* NSData+MPRandomBytes.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C46B88A1706D16E0046109A /* NSData+MPRandomBytes.m */; };
|
||||
4C46E09E17673A0A00DA62E8 /* HNHShadowBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C46E09D17673A0A00DA62E8 /* HNHShadowBox.m */; };
|
||||
4C4A100F176286FD00BBF2CA /* MPTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4A100E176286FD00BBF2CA /* MPTableView.m */; };
|
||||
4C4A101217629DA900BBF2CA /* KdbGroup+KVOAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4A101117629DA900BBF2CA /* KdbGroup+KVOAdditions.m */; };
|
||||
4C569D9E17652B0600595B62 /* MPConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C569D9D17652B0600595B62 /* MPConstants.m */; };
|
||||
@@ -174,6 +175,8 @@
|
||||
4C46B88717063A170046109A /* NSString+MPPasswordAnalysis.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+MPPasswordAnalysis.m"; sourceTree = "<group>"; };
|
||||
4C46B8891706D16E0046109A /* NSData+MPRandomBytes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+MPRandomBytes.h"; sourceTree = "<group>"; };
|
||||
4C46B88A1706D16E0046109A /* NSData+MPRandomBytes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+MPRandomBytes.m"; sourceTree = "<group>"; };
|
||||
4C46E09C17673A0A00DA62E8 /* HNHShadowBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHShadowBox.h; sourceTree = "<group>"; };
|
||||
4C46E09D17673A0A00DA62E8 /* HNHShadowBox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHShadowBox.m; sourceTree = "<group>"; };
|
||||
4C4A100D176286FD00BBF2CA /* MPTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTableView.h; sourceTree = "<group>"; };
|
||||
4C4A100E176286FD00BBF2CA /* MPTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTableView.m; sourceTree = "<group>"; };
|
||||
4C4A101017629DA900BBF2CA /* KdbGroup+KVOAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbGroup+KVOAdditions.h"; sourceTree = "<group>"; };
|
||||
@@ -795,6 +798,8 @@
|
||||
4CC3AAB6175F4983003EF01B /* HNHUi */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4C46E09C17673A0A00DA62E8 /* HNHShadowBox.h */,
|
||||
4C46E09D17673A0A00DA62E8 /* HNHShadowBox.m */,
|
||||
4CC3AAB8175F4983003EF01B /* HNHRoundedTextFieldCell.h */,
|
||||
4CC3AAB9175F4983003EF01B /* HNHRoundedTextFieldCell.m */,
|
||||
4C79DF28176685870083708F /* HNHRoundedTextField.h */,
|
||||
@@ -1062,6 +1067,7 @@
|
||||
4C569DA117652BFE00595B62 /* MPEntryTableDataSource.m in Sources */,
|
||||
4C569DA417653F3500595B62 /* KdbEntry+MPTreeTools.m in Sources */,
|
||||
4C79DF2A176685870083708F /* HNHRoundedTextField.m in Sources */,
|
||||
4C46E09E17673A0A00DA62E8 /* HNHShadowBox.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBNSLayoutConstraint</string>
|
||||
<string>NSButton</string>
|
||||
<string>NSButtonCell</string>
|
||||
<string>NSCustomObject</string>
|
||||
<string>NSCustomView</string>
|
||||
<string>NSImageCell</string>
|
||||
<string>NSImageView</string>
|
||||
<string>NSLevelIndicator</string>
|
||||
<string>NSLevelIndicatorCell</string>
|
||||
<string>NSTextField</string>
|
||||
<string>NSTextFieldCell</string>
|
||||
<string>NSView</string>
|
||||
@@ -46,7 +46,7 @@
|
||||
<object class="NSTextField" id="524369596">
|
||||
<reference key="NSNextResponder" ref="87082330"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{40, 372}, {35, 14}}</string>
|
||||
<string key="NSFrame">{{40, 350}, {35, 14}}</string>
|
||||
<reference key="NSSuperview" ref="87082330"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="290763686"/>
|
||||
@@ -87,7 +87,7 @@
|
||||
<object class="NSTextField" id="290763686">
|
||||
<reference key="NSNextResponder" ref="87082330"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{80, 368}, {124, 22}}</string>
|
||||
<string key="NSFrame">{{80, 346}, {124, 22}}</string>
|
||||
<reference key="NSSuperview" ref="87082330"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="582897606"/>
|
||||
@@ -129,7 +129,7 @@
|
||||
<object class="NSTextField" id="582897606">
|
||||
<reference key="NSNextResponder" ref="87082330"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 340}, {58, 14}}</string>
|
||||
<string key="NSFrame">{{17, 318}, {58, 14}}</string>
|
||||
<reference key="NSSuperview" ref="87082330"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="38182485"/>
|
||||
@@ -150,7 +150,7 @@
|
||||
<object class="NSTextField" id="38182485">
|
||||
<reference key="NSNextResponder" ref="87082330"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{80, 336}, {124, 22}}</string>
|
||||
<string key="NSFrame">{{80, 314}, {124, 22}}</string>
|
||||
<reference key="NSSuperview" ref="87082330"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="738135925"/>
|
||||
@@ -172,7 +172,7 @@
|
||||
<object class="NSTextField" id="681190446">
|
||||
<reference key="NSNextResponder" ref="87082330"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{80, 304}, {124, 22}}</string>
|
||||
<string key="NSFrame">{{80, 282}, {124, 22}}</string>
|
||||
<reference key="NSSuperview" ref="87082330"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="333573736"/>
|
||||
@@ -194,7 +194,7 @@
|
||||
<object class="NSTextField" id="738135925">
|
||||
<reference key="NSNextResponder" ref="87082330"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{50, 308}, {25, 14}}</string>
|
||||
<string key="NSFrame">{{50, 286}, {25, 14}}</string>
|
||||
<reference key="NSSuperview" ref="87082330"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="681190446"/>
|
||||
@@ -215,7 +215,7 @@
|
||||
<object class="NSTextField" id="333573736">
|
||||
<reference key="NSNextResponder" ref="87082330"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{20, 247}, {55, 14}}</string>
|
||||
<string key="NSFrame">{{20, 225}, {55, 14}}</string>
|
||||
<reference key="NSSuperview" ref="87082330"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="438007584"/>
|
||||
@@ -244,7 +244,7 @@
|
||||
<string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
|
||||
<string>NeXT TIFF v4.0 pasteboard type</string>
|
||||
</set>
|
||||
<string key="NSFrame">{{20, 419}, {48, 48}}</string>
|
||||
<string key="NSFrame">{{20, 397}, {48, 48}}</string>
|
||||
<reference key="NSSuperview" ref="87082330"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="787130496"/>
|
||||
@@ -269,7 +269,7 @@
|
||||
<object class="NSTextField" id="787130496">
|
||||
<reference key="NSNextResponder" ref="87082330"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{73, 435}, {134, 17}}</string>
|
||||
<string key="NSFrame">{{73, 413}, {134, 17}}</string>
|
||||
<reference key="NSSuperview" ref="87082330"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="152677463"/>
|
||||
@@ -296,7 +296,7 @@
|
||||
<object class="NSCustomView" id="152677463">
|
||||
<reference key="NSNextResponder" ref="87082330"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{20, 409}, {184, 2}}</string>
|
||||
<string key="NSFrame">{{20, 387}, {184, 2}}</string>
|
||||
<reference key="NSSuperview" ref="87082330"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="524369596"/>
|
||||
@@ -306,10 +306,10 @@
|
||||
<object class="NSTextField" id="438007584">
|
||||
<reference key="NSNextResponder" ref="87082330"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{80, 243}, {124, 22}}</string>
|
||||
<string key="NSFrame">{{80, 221}, {124, 22}}</string>
|
||||
<reference key="NSSuperview" ref="87082330"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="432625169"/>
|
||||
<reference key="NSNextKeyView" ref="945692232"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="11759019">
|
||||
@@ -332,34 +332,40 @@
|
||||
<string key="NSFrameSize">{224, 30}</string>
|
||||
<reference key="NSSuperview" ref="87082330"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<string key="NSClassName">HNHGradientView</string>
|
||||
</object>
|
||||
<object class="NSLevelIndicator" id="432625169">
|
||||
<object class="NSButton" id="945692232">
|
||||
<reference key="NSNextResponder" ref="87082330"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{80, 217}, {124, 18}}</string>
|
||||
<string key="NSFrame">{{80, 194}, {124, 19}}</string>
|
||||
<reference key="NSSuperview" ref="87082330"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="816254670"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSLevelIndicatorCell" key="NSCell" id="357687486">
|
||||
<int key="NSCellFlags">0</int>
|
||||
<int key="NSCellFlags2">262144</int>
|
||||
<object class="NSButtonCell" key="NSCell" id="546653327">
|
||||
<int key="NSCellFlags">-2080374784</int>
|
||||
<int key="NSCellFlags2">134217728</int>
|
||||
<string key="NSContents">Generate</string>
|
||||
<object class="NSFont" key="NSSupport">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<double key="NSSize">12</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<string key="NSCellIdentifier">_NS:9</string>
|
||||
<reference key="NSControlView" ref="432625169"/>
|
||||
<double key="NSValue">2</double>
|
||||
<double key="NSMaxValue">2</double>
|
||||
<double key="NSWarningValue">2</double>
|
||||
<double key="NSCriticalValue">2</double>
|
||||
<int key="NSIndicatorStyle">2</int>
|
||||
<reference key="NSControlView" ref="945692232"/>
|
||||
<int key="NSButtonFlags">-2038153216</int>
|
||||
<int key="NSButtonFlags2">164</int>
|
||||
<string key="NSAlternateContents"/>
|
||||
<string key="NSKeyEquivalent"/>
|
||||
<int key="NSPeriodicDelay">400</int>
|
||||
<int key="NSPeriodicInterval">75</int>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{224, 487}</string>
|
||||
<string key="NSFrameSize">{224, 465}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="1013751338"/>
|
||||
@@ -432,6 +438,14 @@
|
||||
</object>
|
||||
<int key="connectionID">644</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">_popUpPasswordGenerator:</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="945692232"/>
|
||||
</object>
|
||||
<int key="connectionID">710</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
@@ -511,24 +525,8 @@
|
||||
<float key="scoringTypeFloat">29</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="438211321">
|
||||
<reference key="firstItem" ref="87082330"/>
|
||||
<int key="firstAttribute">6</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="432625169"/>
|
||||
<int key="secondAttribute">6</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
||||
<double key="value">20</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="87082330"/>
|
||||
<int key="scoringType">8</int>
|
||||
<float key="scoringTypeFloat">29</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="427195617">
|
||||
<reference key="firstItem" ref="432625169"/>
|
||||
<reference key="firstItem" ref="945692232"/>
|
||||
<int key="firstAttribute">5</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="438007584"/>
|
||||
@@ -543,8 +541,24 @@
|
||||
<float key="scoringTypeFloat">24</float>
|
||||
<int key="contentType">2</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="475693129">
|
||||
<reference key="firstItem" ref="432625169"/>
|
||||
<object class="IBNSLayoutConstraint" id="346991733">
|
||||
<reference key="firstItem" ref="87082330"/>
|
||||
<int key="firstAttribute">6</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="945692232"/>
|
||||
<int key="secondAttribute">6</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
||||
<double key="value">20</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="87082330"/>
|
||||
<int key="scoringType">8</int>
|
||||
<float key="scoringTypeFloat">29</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="986603899">
|
||||
<reference key="firstItem" ref="945692232"/>
|
||||
<int key="firstAttribute">3</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="438007584"/>
|
||||
@@ -623,21 +637,21 @@
|
||||
<float key="scoringTypeFloat">24</float>
|
||||
<int key="contentType">2</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="1047354211">
|
||||
<reference key="firstItem" ref="438007584"/>
|
||||
<int key="firstAttribute">3</int>
|
||||
<object class="IBNSLayoutConstraint" id="62724603">
|
||||
<reference key="firstItem" ref="333573736"/>
|
||||
<int key="firstAttribute">10</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="87082330"/>
|
||||
<int key="secondAttribute">3</int>
|
||||
<int key="secondAttribute">10</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">222</double>
|
||||
<double key="value">0.0</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="87082330"/>
|
||||
<int key="scoringType">3</int>
|
||||
<float key="scoringTypeFloat">9</float>
|
||||
<int key="contentType">3</int>
|
||||
<int key="scoringType">5</int>
|
||||
<float key="scoringTypeFloat">22</float>
|
||||
<int key="contentType">2</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="932354730">
|
||||
<reference key="firstItem" ref="681190446"/>
|
||||
@@ -1019,7 +1033,7 @@
|
||||
<reference ref="333573736"/>
|
||||
<reference ref="438007584"/>
|
||||
<reference ref="816254670"/>
|
||||
<reference ref="432625169"/>
|
||||
<reference ref="945692232"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
@@ -1144,6 +1158,22 @@
|
||||
<reference key="object" ref="582897606"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="836710998"/>
|
||||
<object class="IBNSLayoutConstraint" id="806484554">
|
||||
<reference key="firstItem" ref="582897606"/>
|
||||
<int key="firstAttribute">7</int>
|
||||
<int key="relation">0</int>
|
||||
<nil key="secondItem"/>
|
||||
<int key="secondAttribute">0</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">52</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="582897606"/>
|
||||
<int key="scoringType">3</int>
|
||||
<float key="scoringTypeFloat">9</float>
|
||||
<int key="contentType">1</int>
|
||||
</object>
|
||||
</array>
|
||||
<reference key="parent" ref="87082330"/>
|
||||
</object>
|
||||
@@ -1297,11 +1327,6 @@
|
||||
<reference key="object" ref="938968096"/>
|
||||
<reference key="parent" ref="87082330"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">638</int>
|
||||
<reference key="object" ref="1047354211"/>
|
||||
<reference key="parent" ref="87082330"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">636</int>
|
||||
<reference key="object" ref="11759019"/>
|
||||
@@ -1407,32 +1432,42 @@
|
||||
<reference key="parent" ref="816254670"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">684</int>
|
||||
<reference key="object" ref="432625169"/>
|
||||
<int key="objectID">702</int>
|
||||
<reference key="object" ref="62724603"/>
|
||||
<reference key="parent" ref="87082330"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">703</int>
|
||||
<reference key="object" ref="945692232"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="357687486"/>
|
||||
<reference ref="546653327"/>
|
||||
</array>
|
||||
<reference key="parent" ref="87082330"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">685</int>
|
||||
<reference key="object" ref="357687486"/>
|
||||
<reference key="parent" ref="432625169"/>
|
||||
<int key="objectID">704</int>
|
||||
<reference key="object" ref="546653327"/>
|
||||
<reference key="parent" ref="945692232"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">686</int>
|
||||
<reference key="object" ref="475693129"/>
|
||||
<int key="objectID">705</int>
|
||||
<reference key="object" ref="986603899"/>
|
||||
<reference key="parent" ref="87082330"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">687</int>
|
||||
<int key="objectID">706</int>
|
||||
<reference key="object" ref="346991733"/>
|
||||
<reference key="parent" ref="87082330"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">707</int>
|
||||
<reference key="object" ref="427195617"/>
|
||||
<reference key="parent" ref="87082330"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">689</int>
|
||||
<reference key="object" ref="438211321"/>
|
||||
<reference key="parent" ref="87082330"/>
|
||||
<int key="objectID">708</int>
|
||||
<reference key="object" ref="806484554"/>
|
||||
<reference key="parent" ref="582897606"/>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
@@ -1444,7 +1479,7 @@
|
||||
<string key="100.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="101.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="109.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<array class="NSMutableArray" key="455.IBNSViewMetadataConstraints">
|
||||
<array key="455.IBNSViewMetadataConstraints">
|
||||
<reference ref="222939184"/>
|
||||
<reference ref="1058743908"/>
|
||||
<reference ref="850299237"/>
|
||||
@@ -1468,14 +1503,14 @@
|
||||
<reference ref="876688849"/>
|
||||
<reference ref="378589016"/>
|
||||
<reference ref="932354730"/>
|
||||
<reference ref="1047354211"/>
|
||||
<reference ref="62724603"/>
|
||||
<reference ref="938968096"/>
|
||||
<reference ref="392529850"/>
|
||||
<reference ref="522224579"/>
|
||||
<reference ref="246479646"/>
|
||||
<reference ref="475693129"/>
|
||||
<reference ref="986603899"/>
|
||||
<reference ref="346991733"/>
|
||||
<reference ref="427195617"/>
|
||||
<reference ref="438211321"/>
|
||||
<reference ref="112302846"/>
|
||||
<reference ref="313215172"/>
|
||||
<reference ref="26385821"/>
|
||||
@@ -1489,6 +1524,9 @@
|
||||
<string key="461.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<boolean value="NO" key="462.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||
<string key="462.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<array key="463.IBNSViewMetadataConstraints">
|
||||
<reference ref="806484554"/>
|
||||
</array>
|
||||
<boolean value="NO" key="463.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||
<string key="463.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="464.CustomClassName">HNHRoundedTextField</string>
|
||||
@@ -1545,7 +1583,6 @@
|
||||
<string key="635.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="636.CustomClassName">HNHRoundedSecureTextFieldCell</string>
|
||||
<string key="636.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="638.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="639.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="640.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="642.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
@@ -1564,19 +1601,20 @@
|
||||
<string key="665.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="667.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="669.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<boolean value="NO" key="684.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||
<string key="684.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="685.CustomClassName">HNHLevelIndicatorCell</string>
|
||||
<string key="685.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="686.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="687.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="689.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="702.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<boolean value="NO" key="703.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||
<string key="703.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="704.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="705.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="706.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="707.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="708.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">694</int>
|
||||
<int key="maxID">710</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
@@ -1588,14 +1626,6 @@
|
||||
<string key="minorKey">./Classes/HNHGradientView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">HNHLevelIndicatorCell</string>
|
||||
<string key="superclassName">NSLevelIndicatorCell</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/HNHLevelIndicatorCell.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">HNHRoundedSecureTextFieldCell</string>
|
||||
<string key="superclassName">HNHRoundedTextFieldCell</string>
|
||||
@@ -1631,13 +1661,22 @@
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MPInspectorViewController</string>
|
||||
<string key="superclassName">MPViewController</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<string key="NS.key.0">_popUpPasswordGenerator:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<string key="NS.key.0">_popUpPasswordGenerator:</string>
|
||||
<object class="IBActionInfo" key="NS.object.0">
|
||||
<string key="name">_popUpPasswordGenerator:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="URLTextField">NSTextField</string>
|
||||
<string key="itemImageView">MPPopupImageView</string>
|
||||
<string key="itemNameTextfield">NSTextField</string>
|
||||
<string key="openURLButton">NSButton</string>
|
||||
<string key="passwordTextField">NSTextField</string>
|
||||
<string key="showPasswordCreator">NSButton</string>
|
||||
<string key="titleOrNameLabel">NSTextField</string>
|
||||
<string key="titleTextField">NSTextField</string>
|
||||
<string key="usernameTextField">NSTextField</string>
|
||||
@@ -1655,18 +1694,10 @@
|
||||
<string key="name">itemNameTextfield</string>
|
||||
<string key="candidateClassName">NSTextField</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="openURLButton">
|
||||
<string key="name">openURLButton</string>
|
||||
<string key="candidateClassName">NSButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="passwordTextField">
|
||||
<string key="name">passwordTextField</string>
|
||||
<string key="candidateClassName">NSTextField</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="showPasswordCreator">
|
||||
<string key="name">showPasswordCreator</string>
|
||||
<string key="candidateClassName">NSButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="titleOrNameLabel">
|
||||
<string key="name">titleOrNameLabel</string>
|
||||
<string key="candidateClassName">NSTextField</string>
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{125, 175}, {113, 17}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="662046682"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
@@ -100,7 +99,6 @@
|
||||
</set>
|
||||
<string key="NSFrame">{{157, 200}, {48, 48}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="660673733"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
@@ -129,7 +127,6 @@
|
||||
</set>
|
||||
<string key="NSFrame">{{83, 94}, {197, 22}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="769513826"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
@@ -154,7 +151,6 @@
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{86, 123}, {191, 22}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="333885704"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
@@ -192,7 +188,6 @@
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 126}, {64, 17}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="219521947"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
@@ -213,7 +208,6 @@
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{35, 99}, {46, 17}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="1034097047"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
@@ -234,8 +228,6 @@
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{200, 50}, {83, 32}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<string key="NSHuggingPriority">{250, 250}</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
@@ -258,7 +250,6 @@
|
||||
</array>
|
||||
<string key="NSFrameSize">{362, 268}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="204058255"/>
|
||||
<string key="NSAntiCompressionPriority">{751, 750}</string>
|
||||
<string key="NSClassName">NSView</string>
|
||||
@@ -1011,69 +1002,7 @@
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">296</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MPPasswordInputController</string>
|
||||
<string key="superclassName">MPViewController</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<string key="NS.key.0">_decrypt:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<string key="NS.key.0">_decrypt:</string>
|
||||
<object class="IBActionInfo" key="NS.object.0">
|
||||
<string key="name">_decrypt:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="errorImageView">NSImageView</string>
|
||||
<string key="errorInfoTextField">NSTextField</string>
|
||||
<string key="keyPathControl">NSPathControl</string>
|
||||
<string key="passwordTextField">NSSecureTextField</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="errorImageView">
|
||||
<string key="name">errorImageView</string>
|
||||
<string key="candidateClassName">NSImageView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="errorInfoTextField">
|
||||
<string key="name">errorInfoTextField</string>
|
||||
<string key="candidateClassName">NSTextField</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="keyPathControl">
|
||||
<string key="name">keyPathControl</string>
|
||||
<string key="candidateClassName">NSPathControl</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="passwordTextField">
|
||||
<string key="name">passwordTextField</string>
|
||||
<string key="candidateClassName">NSSecureTextField</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/MPPasswordInputController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MPViewController</string>
|
||||
<string key="superclassName">NSViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/MPViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSLayoutConstraint</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/NSLayoutConstraint.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
|
||||
@@ -57,8 +57,21 @@
|
||||
}
|
||||
if(!self.passwordCreatorController) {
|
||||
self.passwordCreatorController = [[[MPPasswordCreatorViewController alloc] init] autorelease];
|
||||
NSView *creatorView = [_passwordCreatorController view];
|
||||
//NSView *contentView = [_passwordCreatorWindow contentView];
|
||||
[self.passwordCreatorWindow setContentView:creatorView];
|
||||
//[contentView addSubview:creatorView];
|
||||
// [[_passwordCreatorWindow contentView] addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[creatorView]|"
|
||||
// options:0
|
||||
// metrics:nil
|
||||
// views:NSDictionaryOfVariableBindings(creatorView)]];
|
||||
// [[_passwordCreatorWindow contentView] addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[creatorView]|"
|
||||
// options:0
|
||||
// metrics:nil
|
||||
// views:NSDictionaryOfVariableBindings(creatorView)]];
|
||||
// [contentView layoutSubtreeIfNeeded];
|
||||
}
|
||||
[self.passwordCreatorWindow setContentView:[self.passwordCreatorController view]];
|
||||
|
||||
[self.passwordCreatorWindow makeKeyAndOrderFront:self.passwordCreatorWindow];
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
@property (assign) IBOutlet NSTextField *passwordTextField;
|
||||
@property (assign) IBOutlet NSTextField *titleOrNameLabel;
|
||||
|
||||
- (void)hideImagePopup:(id)sender;
|
||||
- (void)closeActivePopup:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#import "MPInspectorViewController.h"
|
||||
#import "MPEntryViewController.h"
|
||||
#import "MPOutlineViewDelegate.h"
|
||||
#import "MPPasswordCreatorViewController.h"
|
||||
#import "MPShadowBox.h"
|
||||
#import "MPIconHelper.h"
|
||||
#import "MPPopupImageView.h"
|
||||
@@ -25,7 +26,7 @@
|
||||
@property (assign, nonatomic) KdbGroup *selectedGroup;
|
||||
|
||||
@property (assign, nonatomic) BOOL showsEntry;
|
||||
@property (retain) NSPopover *iconPopup;
|
||||
@property (retain) NSPopover *activePopover;
|
||||
@property (retain) NSLayoutConstraint *showConstraint;
|
||||
@property (retain) NSLayoutConstraint *hideConstraint;
|
||||
|
||||
@@ -49,7 +50,7 @@
|
||||
|
||||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[_iconPopup release];
|
||||
[_activePopover release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@@ -153,20 +154,26 @@
|
||||
#pragma mark Actions
|
||||
|
||||
- (void)_showImagePopup:(id)sender {
|
||||
_iconPopup = [[NSPopover alloc] init];
|
||||
self.iconPopup.behavior = NSPopoverBehaviorTransient;
|
||||
self.iconPopup.contentViewController = [[[MPIconSelectViewController alloc] init] autorelease];
|
||||
[self.iconPopup showRelativeToRect:NSZeroRect ofView:self.itemImageView preferredEdge:NSMinYEdge];
|
||||
self.iconPopup = nil;
|
||||
[self _showPopopver:[[[MPIconSelectViewController alloc] init] autorelease] atView:self.itemImageView onEdge:NSMinYEdge];
|
||||
}
|
||||
|
||||
- (void)hideImagePopup:(id)sender {
|
||||
[self.iconPopup close];
|
||||
- (void)closeActivePopup:(id)sender {
|
||||
[_activePopover close];
|
||||
}
|
||||
|
||||
- (IBAction)_popUpPasswordGenerator:(id)sender {
|
||||
[self _showPopopver:[[[MPPasswordCreatorViewController alloc] init] autorelease] atView:self.passwordTextField onEdge:NSMinYEdge];
|
||||
}
|
||||
|
||||
- (void)_showPopopver:(NSViewController *)viewController atView:(NSView *)view onEdge:(NSRectEdge)edge {
|
||||
_activePopover = [[NSPopover alloc] init];
|
||||
_activePopover.behavior = NSPopoverBehaviorTransient;
|
||||
_activePopover.contentViewController = viewController;
|
||||
[_activePopover showRelativeToRect:NSZeroRect ofView:view preferredEdge:edge];
|
||||
_activePopover = nil;
|
||||
}
|
||||
|
||||
#pragma mark Notificiations
|
||||
|
||||
- (void)_didChangeSelectedEntry:(NSNotification *)notification {
|
||||
MPEntryViewController *entryViewController = [notification object];
|
||||
if(entryViewController) {
|
||||
|
||||
@@ -10,4 +10,6 @@
|
||||
|
||||
@interface MPPasswordCreatorViewController : MPViewController
|
||||
|
||||
@property (retain) NSString *password;
|
||||
|
||||
@end
|
||||
|
||||
@@ -7,20 +7,32 @@
|
||||
//
|
||||
|
||||
#import "MPPasswordCreatorViewController.h"
|
||||
#import "NSString+MPPasswordCreation.h"
|
||||
|
||||
#define MIN_PASSWORD_LENGTH 1
|
||||
#define MAX_PASSWORD_LENGTH 64
|
||||
|
||||
@interface MPPasswordCreatorViewController ()
|
||||
|
||||
@interface MPPasswordCreatorViewController () {
|
||||
MPPasswordCharacterFlags _characterFlags;
|
||||
}
|
||||
@property (assign) IBOutlet NSTextField *passwordTextField;
|
||||
@property (assign) IBOutlet NSTextField *passwordLengthTextField;
|
||||
@property (assign) IBOutlet NSTextField *customCharactersTextField;
|
||||
@property (assign) IBOutlet NSSlider *passwordLengthSlider;
|
||||
@property (assign) IBOutlet NSButton *addPasswordToPasteboardButton;
|
||||
@property (assign) IBOutlet NSButton *upperCaseButton;
|
||||
@property (assign) IBOutlet NSButton *lowerCaseButton;
|
||||
@property (assign) IBOutlet NSButton *numbersButton;
|
||||
@property (assign) IBOutlet NSButton *symbolsButton;
|
||||
@property (assign) IBOutlet NSButton *customButton;
|
||||
|
||||
@property (assign) NSUInteger passwordLength;
|
||||
@property (assign, nonatomic) BOOL useCustomString;
|
||||
@property (assign, nonatomic) NSUInteger passwordLength;
|
||||
|
||||
- (IBAction)_create:(id)sender;
|
||||
- (IBAction)_generatePassword:(id)sender;
|
||||
- (IBAction)_toggleCharacters:(id)sender;
|
||||
- (IBAction)_usePassword:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@@ -29,7 +41,10 @@
|
||||
- (id)init {
|
||||
self = [super initWithNibName:@"PasswordCreatorView" bundle:nil];
|
||||
if (self) {
|
||||
_password = @"";
|
||||
_passwordLength = 12;
|
||||
_characterFlags = MPPasswordCharactersAll;
|
||||
_useCustomString = NO;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -41,12 +56,75 @@
|
||||
/* Value Transformer */
|
||||
[self.passwordLengthSlider bind:NSValueBinding toObject:self withKeyPath:@"passwordLength" options:nil];
|
||||
[self.passwordLengthTextField bind:NSValueBinding toObject:self withKeyPath:@"passwordLength" options:nil];
|
||||
[self.passwordTextField bind:NSValueBinding toObject:self withKeyPath:@"password" options:nil];
|
||||
|
||||
[_customButton bind:NSValueBinding toObject:self withKeyPath:@"useCustomString" options:nil];
|
||||
[_numbersButton setTag:MPPasswordCharactersNumbers];
|
||||
[_upperCaseButton setTag:MPPasswordCharactersUpperCase];
|
||||
[_lowerCaseButton setTag:MPPasswordCharactersLowerCase];
|
||||
[_symbolsButton setTag:MPPasswordCharactersSymbols];
|
||||
|
||||
[self _resetCharacters];
|
||||
}
|
||||
|
||||
- (IBAction)_create:(id)sender {
|
||||
|
||||
- (IBAction)_generatePassword:(id)sender {
|
||||
if(_useCustomString) {
|
||||
if([[_customCharactersTextField stringValue] length] > 0) {
|
||||
self.password = [[_customCharactersTextField stringValue] passwordWithLength:_passwordLength];
|
||||
}
|
||||
}
|
||||
else {
|
||||
self.password = [NSString passwordWithCharactersets:_characterFlags length:_passwordLength];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)_toggleCharacters:(id)sender {
|
||||
_characterFlags ^= [sender tag];
|
||||
self.useCustomString = NO;
|
||||
[self _resetCharacters];
|
||||
}
|
||||
|
||||
- (IBAction)_usePassword:(id)sender {
|
||||
}
|
||||
|
||||
- (void)setUseCustomString:(BOOL)useCustomString {
|
||||
if(_useCustomString != useCustomString) {
|
||||
_useCustomString = useCustomString;
|
||||
[self _resetCharacters];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setPasswordLength:(NSUInteger)passwordLength {
|
||||
if(_passwordLength != passwordLength) {
|
||||
_passwordLength = passwordLength;
|
||||
[self _generatePassword:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)_resetCharacters {
|
||||
if(_useCustomString) {
|
||||
[_customButton setState:NSOnState];
|
||||
}
|
||||
[_customCharactersTextField setEnabled:_useCustomString];
|
||||
[_upperCaseButton setEnabled:!_useCustomString];
|
||||
[_lowerCaseButton setEnabled:!_useCustomString];
|
||||
[_numbersButton setEnabled:!_useCustomString];
|
||||
[_symbolsButton setEnabled:!_useCustomString];
|
||||
|
||||
/* Set to defualts, if we got nothing */
|
||||
if(_characterFlags == 0) {
|
||||
_characterFlags = MPPasswordCharactersAll;
|
||||
}
|
||||
|
||||
const BOOL userLowercase = ( 0 != (MPPasswordCharactersLowerCase & _characterFlags));
|
||||
const BOOL useUppercase = ( 0 != (MPPasswordCharactersUpperCase & _characterFlags) );
|
||||
const BOOL useNumbers = ( 0 != (MPPasswordCharactersNumbers & _characterFlags) );
|
||||
const BOOL useSymbols = ( 0 != (MPPasswordCharactersSymbols & _characterFlags) );
|
||||
|
||||
[_upperCaseButton setState:useUppercase ? NSOnState : NSOffState];
|
||||
[_lowerCaseButton setState:userLowercase ? NSOnState : NSOffState];
|
||||
[_numbersButton setState:useNumbers ? NSOnState : NSOffState];
|
||||
[_symbolsButton setState:useSymbols ? NSOnState : NSOffState];
|
||||
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>C60</string>
|
||||
<string>CC5</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
@@ -12,7 +12,8 @@ typedef enum {
|
||||
MPPasswordCharactersUpperCase = (1<<0), // NSCharacterset lowerCaseCharacterSet
|
||||
MPPasswordCharactersLowerCase = (1<<1), // NSCharacterSet upperCaseCharacterSet
|
||||
MPPasswordCharactersNumbers = (1<<2), // NSCharacterSet numberCharacterSet
|
||||
MPPasswordCharactersSymbols = (1<<3) // NSCharacterSet symbolCharacterSet
|
||||
MPPasswordCharactersSymbols = (1<<3), // NSCharacterSet symbolCharacterSet
|
||||
MPPasswordCharactersAll = MPPasswordCharactersUpperCase | MPPasswordCharactersLowerCase | MPPasswordCharactersNumbers | MPPasswordCharactersSymbols
|
||||
} MPPasswordCharacterFlags;
|
||||
|
||||
/*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,9 +2,9 @@
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1080</int>
|
||||
<string key="IBDocument.SystemVersion">12D78</string>
|
||||
<string key="IBDocument.SystemVersion">12E55</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
|
||||
<string key="IBDocument.AppKitVersion">1187.37</string>
|
||||
<string key="IBDocument.AppKitVersion">1187.39</string>
|
||||
<string key="IBDocument.HIToolboxVersion">626.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
@@ -36,7 +36,7 @@
|
||||
<int key="NSWindowStyleMask">15</int>
|
||||
<int key="NSWindowBacking">2</int>
|
||||
<string key="NSWindowRect">{{196, 240}, {338, 216}}</string>
|
||||
<int key="NSWTFlags">544735232</int>
|
||||
<int key="NSWTFlags">1618477056</int>
|
||||
<string key="NSWindowTitle">Window</string>
|
||||
<string key="NSWindowClass">NSWindow</string>
|
||||
<nil key="NSViewClass"/>
|
||||
@@ -48,7 +48,7 @@
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
|
||||
<string key="NSScreenRect">{{0, 0}, {1920, 1058}}</string>
|
||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||
<bool key="NSWindowIsRestorable">YES</bool>
|
||||
</object>
|
||||
|
||||
Reference in New Issue
Block a user