mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 11:42:30 +00:00
Settings now work with KDB1 Files and do not trap the Application in the modal dialog
Added user base settings to hide/show passwords at KDB1 field. The settings are stored but not considered ;)
This commit is contained in:
@@ -100,7 +100,7 @@
|
|||||||
<string key="NSFrame">{{13, 41}, {520, 246}}</string>
|
<string key="NSFrame">{{13, 41}, {520, 246}}</string>
|
||||||
<reference key="NSSuperview" ref="1006"/>
|
<reference key="NSSuperview" ref="1006"/>
|
||||||
<reference key="NSWindow"/>
|
<reference key="NSWindow"/>
|
||||||
<reference key="NSNextKeyView" ref="830804879"/>
|
<reference key="NSNextKeyView" ref="777708215"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||||
<array class="NSMutableArray" key="NSTabViewItems">
|
<array class="NSMutableArray" key="NSTabViewItems">
|
||||||
<object class="NSTabViewItem" id="993610707">
|
<object class="NSTabViewItem" id="993610707">
|
||||||
@@ -212,7 +212,7 @@
|
|||||||
<int key="NSvFlags">2322</int>
|
<int key="NSvFlags">2322</int>
|
||||||
<string key="NSFrameSize">{278, 121}</string>
|
<string key="NSFrameSize">{278, 121}</string>
|
||||||
<reference key="NSSuperview" ref="401924003"/>
|
<reference key="NSSuperview" ref="401924003"/>
|
||||||
<reference key="NSNextKeyView" ref="580592620"/>
|
<reference key="NSNextKeyView" ref="670917793"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:13</string>
|
<string key="NSReuseIdentifierKey">_NS:13</string>
|
||||||
<object class="NSTextContainer" key="NSTextContainer" id="411354001">
|
<object class="NSTextContainer" key="NSTextContainer" id="411354001">
|
||||||
<object class="NSLayoutManager" key="NSLayoutManager">
|
<object class="NSLayoutManager" key="NSLayoutManager">
|
||||||
@@ -304,7 +304,7 @@
|
|||||||
<int key="NSvFlags">256</int>
|
<int key="NSvFlags">256</int>
|
||||||
<string key="NSFrame">{{263, 1}, {16, 121}}</string>
|
<string key="NSFrame">{{263, 1}, {16, 121}}</string>
|
||||||
<reference key="NSSuperview" ref="781083309"/>
|
<reference key="NSSuperview" ref="781083309"/>
|
||||||
<reference key="NSNextKeyView" ref="86072074"/>
|
<reference key="NSNextKeyView" ref="115846238"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:83</string>
|
<string key="NSReuseIdentifierKey">_NS:83</string>
|
||||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||||
<reference key="NSTarget" ref="781083309"/>
|
<reference key="NSTarget" ref="781083309"/>
|
||||||
@@ -328,7 +328,7 @@
|
|||||||
</array>
|
</array>
|
||||||
<string key="NSFrame">{{136, 17}, {280, 123}}</string>
|
<string key="NSFrame">{{136, 17}, {280, 123}}</string>
|
||||||
<reference key="NSSuperview" ref="161117556"/>
|
<reference key="NSSuperview" ref="161117556"/>
|
||||||
<reference key="NSNextKeyView" ref="401924003"/>
|
<reference key="NSNextKeyView" ref="580592620"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||||
<int key="NSsFlags">133138</int>
|
<int key="NSsFlags">133138</int>
|
||||||
<reference key="NSVScroller" ref="670917793"/>
|
<reference key="NSVScroller" ref="670917793"/>
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<object class="NSTabViewItem" id="961038136">
|
<object class="NSTabViewItem" id="961038136">
|
||||||
<object class="NSView" key="NSView" id="830804879">
|
<object class="NSView" key="NSView" id="830804879">
|
||||||
<reference key="NSNextResponder" ref="86072074"/>
|
<nil key="NSNextResponder"/>
|
||||||
<int key="NSvFlags">256</int>
|
<int key="NSvFlags">256</int>
|
||||||
<array class="NSMutableArray" key="NSSubviews">
|
<array class="NSMutableArray" key="NSSubviews">
|
||||||
<object class="NSTextField" id="156220187">
|
<object class="NSTextField" id="156220187">
|
||||||
@@ -357,7 +357,6 @@
|
|||||||
<int key="NSvFlags">268</int>
|
<int key="NSvFlags">268</int>
|
||||||
<string key="NSFrame">{{111, 140}, {68, 17}}</string>
|
<string key="NSFrame">{{111, 140}, {68, 17}}</string>
|
||||||
<reference key="NSSuperview" ref="830804879"/>
|
<reference key="NSSuperview" ref="830804879"/>
|
||||||
<reference key="NSWindow"/>
|
|
||||||
<reference key="NSNextKeyView" ref="2005807"/>
|
<reference key="NSNextKeyView" ref="2005807"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
||||||
<bool key="NSEnabled">YES</bool>
|
<bool key="NSEnabled">YES</bool>
|
||||||
@@ -382,7 +381,6 @@
|
|||||||
</set>
|
</set>
|
||||||
<string key="NSFrame">{{181, 74}, {170, 26}}</string>
|
<string key="NSFrame">{{181, 74}, {170, 26}}</string>
|
||||||
<reference key="NSSuperview" ref="830804879"/>
|
<reference key="NSSuperview" ref="830804879"/>
|
||||||
<reference key="NSWindow"/>
|
|
||||||
<reference key="NSNextKeyView" ref="118397594"/>
|
<reference key="NSNextKeyView" ref="118397594"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||||
<bool key="NSEnabled">YES</bool>
|
<bool key="NSEnabled">YES</bool>
|
||||||
@@ -407,7 +405,6 @@
|
|||||||
<int key="NSvFlags">268</int>
|
<int key="NSvFlags">268</int>
|
||||||
<string key="NSFrame">{{128, 78}, {51, 17}}</string>
|
<string key="NSFrame">{{128, 78}, {51, 17}}</string>
|
||||||
<reference key="NSSuperview" ref="830804879"/>
|
<reference key="NSSuperview" ref="830804879"/>
|
||||||
<reference key="NSWindow"/>
|
|
||||||
<reference key="NSNextKeyView" ref="562503982"/>
|
<reference key="NSNextKeyView" ref="562503982"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
||||||
<bool key="NSEnabled">YES</bool>
|
<bool key="NSEnabled">YES</bool>
|
||||||
@@ -428,8 +425,7 @@
|
|||||||
<int key="NSvFlags">268</int>
|
<int key="NSvFlags">268</int>
|
||||||
<string key="NSFrame">{{184, 51}, {164, 19}}</string>
|
<string key="NSFrame">{{184, 51}, {164, 19}}</string>
|
||||||
<reference key="NSSuperview" ref="830804879"/>
|
<reference key="NSSuperview" ref="830804879"/>
|
||||||
<reference key="NSWindow"/>
|
<reference key="NSNextKeyView" ref="115846238"/>
|
||||||
<reference key="NSNextKeyView"/>
|
|
||||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||||
<bool key="NSEnabled">YES</bool>
|
<bool key="NSEnabled">YES</bool>
|
||||||
<object class="NSButtonCell" key="NSCell" id="861795155">
|
<object class="NSButtonCell" key="NSCell" id="861795155">
|
||||||
@@ -457,7 +453,6 @@
|
|||||||
<int key="NSvFlags">268</int>
|
<int key="NSvFlags">268</int>
|
||||||
<string key="NSFrame">{{356, 136}, {31, 25}}</string>
|
<string key="NSFrame">{{356, 136}, {31, 25}}</string>
|
||||||
<reference key="NSSuperview" ref="830804879"/>
|
<reference key="NSSuperview" ref="830804879"/>
|
||||||
<reference key="NSWindow"/>
|
|
||||||
<reference key="NSNextKeyView" ref="813042737"/>
|
<reference key="NSNextKeyView" ref="813042737"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:22</string>
|
<string key="NSReuseIdentifierKey">_NS:22</string>
|
||||||
<bool key="NSEnabled">YES</bool>
|
<bool key="NSEnabled">YES</bool>
|
||||||
@@ -486,7 +481,6 @@
|
|||||||
<int key="NSvFlags">268</int>
|
<int key="NSvFlags">268</int>
|
||||||
<string key="NSFrame">{{356, 75}, {31, 25}}</string>
|
<string key="NSFrame">{{356, 75}, {31, 25}}</string>
|
||||||
<reference key="NSSuperview" ref="830804879"/>
|
<reference key="NSSuperview" ref="830804879"/>
|
||||||
<reference key="NSWindow"/>
|
|
||||||
<reference key="NSNextKeyView" ref="484114537"/>
|
<reference key="NSNextKeyView" ref="484114537"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:22</string>
|
<string key="NSReuseIdentifierKey">_NS:22</string>
|
||||||
<bool key="NSEnabled">YES</bool>
|
<bool key="NSEnabled">YES</bool>
|
||||||
@@ -515,7 +509,6 @@
|
|||||||
<int key="NSvFlags">268</int>
|
<int key="NSvFlags">268</int>
|
||||||
<string key="NSFrame">{{184, 138}, {164, 22}}</string>
|
<string key="NSFrame">{{184, 138}, {164, 22}}</string>
|
||||||
<reference key="NSSuperview" ref="830804879"/>
|
<reference key="NSSuperview" ref="830804879"/>
|
||||||
<reference key="NSWindow"/>
|
|
||||||
<reference key="NSNextKeyView" ref="548323424"/>
|
<reference key="NSNextKeyView" ref="548323424"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||||
<bool key="NSEnabled">YES</bool>
|
<bool key="NSEnabled">YES</bool>
|
||||||
@@ -540,7 +533,6 @@
|
|||||||
<int key="NSvFlags">268</int>
|
<int key="NSvFlags">268</int>
|
||||||
<string key="NSFrame">{{127, 108}, {52, 17}}</string>
|
<string key="NSFrame">{{127, 108}, {52, 17}}</string>
|
||||||
<reference key="NSSuperview" ref="830804879"/>
|
<reference key="NSSuperview" ref="830804879"/>
|
||||||
<reference key="NSWindow"/>
|
|
||||||
<reference key="NSNextKeyView" ref="113779232"/>
|
<reference key="NSNextKeyView" ref="113779232"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
||||||
<bool key="NSEnabled">YES</bool>
|
<bool key="NSEnabled">YES</bool>
|
||||||
@@ -561,7 +553,6 @@
|
|||||||
<int key="NSvFlags">268</int>
|
<int key="NSvFlags">268</int>
|
||||||
<string key="NSFrame">{{184, 106}, {164, 22}}</string>
|
<string key="NSFrame">{{184, 106}, {164, 22}}</string>
|
||||||
<reference key="NSSuperview" ref="830804879"/>
|
<reference key="NSSuperview" ref="830804879"/>
|
||||||
<reference key="NSWindow"/>
|
|
||||||
<reference key="NSNextKeyView" ref="323392534"/>
|
<reference key="NSNextKeyView" ref="323392534"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||||
<bool key="NSEnabled">YES</bool>
|
<bool key="NSEnabled">YES</bool>
|
||||||
@@ -586,7 +577,6 @@
|
|||||||
<int key="NSvFlags">268</int>
|
<int key="NSvFlags">268</int>
|
||||||
<string key="NSFrame">{{198, 168}, {137, 17}}</string>
|
<string key="NSFrame">{{198, 168}, {137, 17}}</string>
|
||||||
<reference key="NSSuperview" ref="830804879"/>
|
<reference key="NSSuperview" ref="830804879"/>
|
||||||
<reference key="NSWindow"/>
|
|
||||||
<reference key="NSNextKeyView" ref="156220187"/>
|
<reference key="NSNextKeyView" ref="156220187"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
||||||
<bool key="NSEnabled">YES</bool>
|
<bool key="NSEnabled">YES</bool>
|
||||||
@@ -611,8 +601,6 @@
|
|||||||
</object>
|
</object>
|
||||||
</array>
|
</array>
|
||||||
<string key="NSFrame">{{10, 33}, {500, 200}}</string>
|
<string key="NSFrame">{{10, 33}, {500, 200}}</string>
|
||||||
<reference key="NSSuperview" ref="86072074"/>
|
|
||||||
<reference key="NSWindow"/>
|
|
||||||
<reference key="NSNextKeyView" ref="682548872"/>
|
<reference key="NSNextKeyView" ref="682548872"/>
|
||||||
</object>
|
</object>
|
||||||
<string key="NSLabel">Password</string>
|
<string key="NSLabel">Password</string>
|
||||||
@@ -738,7 +726,7 @@
|
|||||||
<int key="NSvFlags">268</int>
|
<int key="NSvFlags">268</int>
|
||||||
<string key="NSFrame">{{138, 38}, {107, 18}}</string>
|
<string key="NSFrame">{{138, 38}, {107, 18}}</string>
|
||||||
<reference key="NSSuperview" ref="915152531"/>
|
<reference key="NSSuperview" ref="915152531"/>
|
||||||
<reference key="NSNextKeyView" ref="86072074"/>
|
<reference key="NSNextKeyView" ref="115846238"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||||
<bool key="NSEnabled">YES</bool>
|
<bool key="NSEnabled">YES</bool>
|
||||||
<object class="NSButtonCell" key="NSCell" id="621059375">
|
<object class="NSButtonCell" key="NSCell" id="621059375">
|
||||||
@@ -829,7 +817,7 @@
|
|||||||
<int key="NSvFlags">268</int>
|
<int key="NSvFlags">268</int>
|
||||||
<string key="NSFrame">{{112, 37}, {187, 18}}</string>
|
<string key="NSFrame">{{112, 37}, {187, 18}}</string>
|
||||||
<reference key="NSSuperview" ref="627437575"/>
|
<reference key="NSSuperview" ref="627437575"/>
|
||||||
<reference key="NSNextKeyView" ref="86072074"/>
|
<reference key="NSNextKeyView" ref="115846238"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||||
<bool key="NSEnabled">YES</bool>
|
<bool key="NSEnabled">YES</bool>
|
||||||
<object class="NSButtonCell" key="NSCell" id="310504693">
|
<object class="NSButtonCell" key="NSCell" id="310504693">
|
||||||
@@ -1049,14 +1037,129 @@
|
|||||||
<reference key="NSColor" ref="537570538"/>
|
<reference key="NSColor" ref="537570538"/>
|
||||||
<reference key="NSTabView" ref="86072074"/>
|
<reference key="NSTabView" ref="86072074"/>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="NSTabViewItem" id="1002849227">
|
||||||
|
<object class="NSView" key="NSView" id="777708215">
|
||||||
|
<reference key="NSNextResponder" ref="86072074"/>
|
||||||
|
<int key="NSvFlags">256</int>
|
||||||
|
<array class="NSMutableArray" key="NSSubviews">
|
||||||
|
<object class="NSTextField" id="823681835">
|
||||||
|
<reference key="NSNextResponder" ref="777708215"/>
|
||||||
|
<int key="NSvFlags">268</int>
|
||||||
|
<string key="NSFrame">{{97, 114}, {121, 17}}</string>
|
||||||
|
<reference key="NSSuperview" ref="777708215"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="551388189"/>
|
||||||
|
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
||||||
|
<bool key="NSEnabled">YES</bool>
|
||||||
|
<object class="NSTextFieldCell" key="NSCell" id="960215238">
|
||||||
|
<int key="NSCellFlags">68157504</int>
|
||||||
|
<int key="NSCellFlags2">272630784</int>
|
||||||
|
<string key="NSContents">Default Username:</string>
|
||||||
|
<reference key="NSSupport" ref="481048132"/>
|
||||||
|
<string key="NSCellIdentifier">_NS:1535</string>
|
||||||
|
<reference key="NSControlView" ref="823681835"/>
|
||||||
|
<reference key="NSBackgroundColor" ref="537570538"/>
|
||||||
|
<reference key="NSTextColor" ref="873531869"/>
|
||||||
|
</object>
|
||||||
|
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSTextField" id="551388189">
|
||||||
|
<reference key="NSNextResponder" ref="777708215"/>
|
||||||
|
<int key="NSvFlags">268</int>
|
||||||
|
<string key="NSFrame">{{223, 111}, {178, 22}}</string>
|
||||||
|
<reference key="NSSuperview" ref="777708215"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="849532305"/>
|
||||||
|
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||||
|
<bool key="NSEnabled">YES</bool>
|
||||||
|
<object class="NSTextFieldCell" key="NSCell" id="521558761">
|
||||||
|
<int key="NSCellFlags">-1804599231</int>
|
||||||
|
<int key="NSCellFlags2">272630784</int>
|
||||||
|
<string key="NSContents"/>
|
||||||
|
<reference key="NSSupport" ref="481048132"/>
|
||||||
|
<string key="NSCellIdentifier">_NS:9</string>
|
||||||
|
<reference key="NSControlView" ref="551388189"/>
|
||||||
|
<bool key="NSDrawsBackground">YES</bool>
|
||||||
|
<reference key="NSBackgroundColor" ref="572503014"/>
|
||||||
|
<reference key="NSTextColor" ref="791279855"/>
|
||||||
|
</object>
|
||||||
|
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSPopUpButton" id="849532305">
|
||||||
|
<reference key="NSNextResponder" ref="777708215"/>
|
||||||
|
<int key="NSvFlags">268</int>
|
||||||
|
<string key="NSFrame">{{220, 79}, {184, 26}}</string>
|
||||||
|
<reference key="NSSuperview" ref="777708215"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="412708114"/>
|
||||||
|
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||||
|
<bool key="NSEnabled">YES</bool>
|
||||||
|
<object class="NSPopUpButtonCell" key="NSCell" id="99236567">
|
||||||
|
<int key="NSCellFlags">-2076180416</int>
|
||||||
|
<int key="NSCellFlags2">2048</int>
|
||||||
|
<reference key="NSSupport" ref="481048132"/>
|
||||||
|
<string key="NSCellIdentifier">_NS:9</string>
|
||||||
|
<reference key="NSControlView" ref="849532305"/>
|
||||||
|
<int key="NSButtonFlags">109199360</int>
|
||||||
|
<int key="NSButtonFlags2">129</int>
|
||||||
|
<string key="NSAlternateContents"/>
|
||||||
|
<string key="NSKeyEquivalent"/>
|
||||||
|
<int key="NSPeriodicDelay">400</int>
|
||||||
|
<int key="NSPeriodicInterval">75</int>
|
||||||
|
<nil key="NSMenuItem"/>
|
||||||
|
<bool key="NSMenuItemRespectAlignment">YES</bool>
|
||||||
|
<object class="NSMenu" key="NSMenu" id="357478954">
|
||||||
|
<string key="NSTitle">OtherViews</string>
|
||||||
|
<array class="NSMutableArray" key="NSMenuItems"/>
|
||||||
|
<reference key="NSMenuFont" ref="481048132"/>
|
||||||
|
</object>
|
||||||
|
<int key="NSSelectedIndex">-1</int>
|
||||||
|
<int key="NSPreferredEdge">1</int>
|
||||||
|
<bool key="NSUsesItemFromMenu">YES</bool>
|
||||||
|
<bool key="NSAltersState">YES</bool>
|
||||||
|
<int key="NSArrowPosition">2</int>
|
||||||
|
</object>
|
||||||
|
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSTextField" id="412708114">
|
||||||
|
<reference key="NSNextResponder" ref="777708215"/>
|
||||||
|
<int key="NSvFlags">268</int>
|
||||||
|
<string key="NSFrame">{{107, 84}, {110, 17}}</string>
|
||||||
|
<reference key="NSSuperview" ref="777708215"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="115846238"/>
|
||||||
|
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
||||||
|
<bool key="NSEnabled">YES</bool>
|
||||||
|
<object class="NSTextFieldCell" key="NSCell" id="562890440">
|
||||||
|
<int key="NSCellFlags">68157504</int>
|
||||||
|
<int key="NSCellFlags2">272630784</int>
|
||||||
|
<string key="NSContents">Template Group:</string>
|
||||||
|
<reference key="NSSupport" ref="481048132"/>
|
||||||
|
<string key="NSCellIdentifier">_NS:1535</string>
|
||||||
|
<reference key="NSControlView" ref="412708114"/>
|
||||||
|
<reference key="NSBackgroundColor" ref="537570538"/>
|
||||||
|
<reference key="NSTextColor" ref="873531869"/>
|
||||||
|
</object>
|
||||||
|
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<string key="NSFrame">{{10, 33}, {500, 200}}</string>
|
||||||
|
<reference key="NSSuperview" ref="86072074"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="823681835"/>
|
||||||
|
</object>
|
||||||
|
<string key="NSLabel">Templates</string>
|
||||||
|
<reference key="NSColor" ref="537570538"/>
|
||||||
|
<reference key="NSTabView" ref="86072074"/>
|
||||||
|
</object>
|
||||||
</array>
|
</array>
|
||||||
<reference key="NSSelectedTabViewItem" ref="961038136"/>
|
<reference key="NSSelectedTabViewItem" ref="1002849227"/>
|
||||||
<reference key="NSFont" ref="481048132"/>
|
<reference key="NSFont" ref="481048132"/>
|
||||||
<int key="NSTvFlags">0</int>
|
<int key="NSTvFlags">0</int>
|
||||||
<bool key="NSAllowTruncatedLabels">YES</bool>
|
<bool key="NSAllowTruncatedLabels">YES</bool>
|
||||||
<bool key="NSDrawsBackground">YES</bool>
|
<bool key="NSDrawsBackground">YES</bool>
|
||||||
<array class="NSMutableArray" key="NSSubviews">
|
<array class="NSMutableArray" key="NSSubviews">
|
||||||
<reference ref="830804879"/>
|
<reference ref="777708215"/>
|
||||||
</array>
|
</array>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSButton" id="115846238">
|
<object class="NSButton" id="115846238">
|
||||||
@@ -1090,7 +1193,7 @@
|
|||||||
<reference key="NSWindow"/>
|
<reference key="NSWindow"/>
|
||||||
<reference key="NSNextKeyView" ref="86072074"/>
|
<reference key="NSNextKeyView" ref="86072074"/>
|
||||||
</object>
|
</object>
|
||||||
<string key="NSScreenRect">{{0, 0}, {1920, 1058}}</string>
|
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
|
||||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||||
<bool key="NSWindowIsRestorable">YES</bool>
|
<bool key="NSWindowIsRestorable">YES</bool>
|
||||||
</object>
|
</object>
|
||||||
@@ -1281,6 +1384,22 @@
|
|||||||
</object>
|
</object>
|
||||||
<int key="connectionID">1202</int>
|
<int key="connectionID">1202</int>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBOutletConnection" key="connection">
|
||||||
|
<string key="label">defaultUsernameTextField</string>
|
||||||
|
<reference key="source" ref="1001"/>
|
||||||
|
<reference key="destination" ref="551388189"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">1261</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBOutletConnection" key="connection">
|
||||||
|
<string key="label">templateGroupPopUpButton</string>
|
||||||
|
<reference key="source" ref="1001"/>
|
||||||
|
<reference key="destination" ref="849532305"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">1262</int>
|
||||||
|
</object>
|
||||||
</array>
|
</array>
|
||||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
<array key="orderedObjects">
|
<array key="orderedObjects">
|
||||||
@@ -1480,6 +1599,7 @@
|
|||||||
<reference ref="5938958"/>
|
<reference ref="5938958"/>
|
||||||
<reference ref="557419307"/>
|
<reference ref="557419307"/>
|
||||||
<reference ref="961038136"/>
|
<reference ref="961038136"/>
|
||||||
|
<reference ref="1002849227"/>
|
||||||
</array>
|
</array>
|
||||||
<reference key="parent" ref="1006"/>
|
<reference key="parent" ref="1006"/>
|
||||||
</object>
|
</object>
|
||||||
@@ -2540,11 +2660,6 @@
|
|||||||
<reference key="object" ref="604885400"/>
|
<reference key="object" ref="604885400"/>
|
||||||
<reference key="parent" ref="915152531"/>
|
<reference key="parent" ref="915152531"/>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">520</int>
|
|
||||||
<reference key="object" ref="759147937"/>
|
|
||||||
<reference key="parent" ref="915152531"/>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
<object class="IBObjectRecord">
|
||||||
<int key="objectID">488</int>
|
<int key="objectID">488</int>
|
||||||
<reference key="object" ref="270539620"/>
|
<reference key="object" ref="270539620"/>
|
||||||
@@ -3502,6 +3617,301 @@
|
|||||||
<reference key="object" ref="42085920"/>
|
<reference key="object" ref="42085920"/>
|
||||||
<reference key="parent" ref="830804879"/>
|
<reference key="parent" ref="830804879"/>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1209</int>
|
||||||
|
<reference key="object" ref="759147937"/>
|
||||||
|
<reference key="parent" ref="915152531"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1210</int>
|
||||||
|
<reference key="object" ref="1002849227"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="777708215"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="86072074"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1211</int>
|
||||||
|
<reference key="object" ref="777708215"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<object class="IBNSLayoutConstraint" id="109508741">
|
||||||
|
<reference key="firstItem" ref="849532305"/>
|
||||||
|
<int key="firstAttribute">5</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="412708114"/>
|
||||||
|
<int key="secondAttribute">6</int>
|
||||||
|
<float key="multiplier">1</float>
|
||||||
|
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
||||||
|
<double key="value">8</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="777708215"/>
|
||||||
|
<int key="scoringType">6</int>
|
||||||
|
<float key="scoringTypeFloat">24</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="810910961">
|
||||||
|
<reference key="firstItem" ref="849532305"/>
|
||||||
|
<int key="firstAttribute">6</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="551388189"/>
|
||||||
|
<int key="secondAttribute">6</int>
|
||||||
|
<float key="multiplier">1</float>
|
||||||
|
<object class="IBLayoutConstant" key="constant">
|
||||||
|
<double key="value">0.0</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="777708215"/>
|
||||||
|
<int key="scoringType">6</int>
|
||||||
|
<float key="scoringTypeFloat">24</float>
|
||||||
|
<int key="contentType">2</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="155929422">
|
||||||
|
<reference key="firstItem" ref="849532305"/>
|
||||||
|
<int key="firstAttribute">3</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="551388189"/>
|
||||||
|
<int key="secondAttribute">4</int>
|
||||||
|
<float key="multiplier">1</float>
|
||||||
|
<object class="IBLayoutConstant" key="constant">
|
||||||
|
<double key="value">8</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="777708215"/>
|
||||||
|
<int key="scoringType">6</int>
|
||||||
|
<float key="scoringTypeFloat">24</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="755457557">
|
||||||
|
<reference key="firstItem" ref="551388189"/>
|
||||||
|
<int key="firstAttribute">3</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="777708215"/>
|
||||||
|
<int key="secondAttribute">3</int>
|
||||||
|
<float key="multiplier">1</float>
|
||||||
|
<object class="IBLayoutConstant" key="constant">
|
||||||
|
<double key="value">67</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="777708215"/>
|
||||||
|
<int key="scoringType">3</int>
|
||||||
|
<float key="scoringTypeFloat">9</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="20370934">
|
||||||
|
<reference key="firstItem" ref="551388189"/>
|
||||||
|
<int key="firstAttribute">5</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="823681835"/>
|
||||||
|
<int key="secondAttribute">6</int>
|
||||||
|
<float key="multiplier">1</float>
|
||||||
|
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
||||||
|
<double key="value">8</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="777708215"/>
|
||||||
|
<int key="scoringType">6</int>
|
||||||
|
<float key="scoringTypeFloat">24</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="809019904">
|
||||||
|
<reference key="firstItem" ref="551388189"/>
|
||||||
|
<int key="firstAttribute">10</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="823681835"/>
|
||||||
|
<int key="secondAttribute">10</int>
|
||||||
|
<float key="multiplier">1</float>
|
||||||
|
<object class="IBLayoutConstant" key="constant">
|
||||||
|
<double key="value">0.0</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="777708215"/>
|
||||||
|
<int key="scoringType">6</int>
|
||||||
|
<float key="scoringTypeFloat">24</float>
|
||||||
|
<int key="contentType">2</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="975528360">
|
||||||
|
<reference key="firstItem" ref="412708114"/>
|
||||||
|
<int key="firstAttribute">10</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="849532305"/>
|
||||||
|
<int key="secondAttribute">10</int>
|
||||||
|
<float key="multiplier">1</float>
|
||||||
|
<object class="IBLayoutConstant" key="constant">
|
||||||
|
<double key="value">0.0</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="777708215"/>
|
||||||
|
<int key="scoringType">6</int>
|
||||||
|
<float key="scoringTypeFloat">24</float>
|
||||||
|
<int key="contentType">2</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="622407355">
|
||||||
|
<reference key="firstItem" ref="823681835"/>
|
||||||
|
<int key="firstAttribute">5</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="777708215"/>
|
||||||
|
<int key="secondAttribute">5</int>
|
||||||
|
<float key="multiplier">1</float>
|
||||||
|
<object class="IBLayoutConstant" key="constant">
|
||||||
|
<double key="value">100</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="777708215"/>
|
||||||
|
<int key="scoringType">3</int>
|
||||||
|
<float key="scoringTypeFloat">9</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
</object>
|
||||||
|
<reference ref="823681835"/>
|
||||||
|
<reference ref="551388189"/>
|
||||||
|
<reference ref="849532305"/>
|
||||||
|
<reference ref="412708114"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="1002849227"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1212</int>
|
||||||
|
<reference key="object" ref="823681835"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="960215238"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="777708215"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1213</int>
|
||||||
|
<reference key="object" ref="960215238"/>
|
||||||
|
<reference key="parent" ref="823681835"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1216</int>
|
||||||
|
<reference key="object" ref="551388189"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="521558761"/>
|
||||||
|
<object class="IBNSLayoutConstraint" id="525800113">
|
||||||
|
<reference key="firstItem" ref="551388189"/>
|
||||||
|
<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">178</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="551388189"/>
|
||||||
|
<int key="scoringType">3</int>
|
||||||
|
<float key="scoringTypeFloat">9</float>
|
||||||
|
<int key="contentType">1</int>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="777708215"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1217</int>
|
||||||
|
<reference key="object" ref="521558761"/>
|
||||||
|
<reference key="parent" ref="551388189"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1225</int>
|
||||||
|
<reference key="object" ref="809019904"/>
|
||||||
|
<reference key="parent" ref="777708215"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1227</int>
|
||||||
|
<reference key="object" ref="525800113"/>
|
||||||
|
<reference key="parent" ref="551388189"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1228</int>
|
||||||
|
<reference key="object" ref="20370934"/>
|
||||||
|
<reference key="parent" ref="777708215"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1230</int>
|
||||||
|
<reference key="object" ref="849532305"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="99236567"/>
|
||||||
|
<object class="IBNSLayoutConstraint" id="884669610">
|
||||||
|
<reference key="firstItem" ref="849532305"/>
|
||||||
|
<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">179</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="849532305"/>
|
||||||
|
<int key="scoringType">3</int>
|
||||||
|
<float key="scoringTypeFloat">9</float>
|
||||||
|
<int key="contentType">1</int>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="777708215"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1231</int>
|
||||||
|
<reference key="object" ref="99236567"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="357478954"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="849532305"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1232</int>
|
||||||
|
<reference key="object" ref="357478954"/>
|
||||||
|
<array class="NSMutableArray" key="children"/>
|
||||||
|
<reference key="parent" ref="99236567"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1239</int>
|
||||||
|
<reference key="object" ref="412708114"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="562890440"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="777708215"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1240</int>
|
||||||
|
<reference key="object" ref="562890440"/>
|
||||||
|
<reference key="parent" ref="412708114"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1253</int>
|
||||||
|
<reference key="object" ref="155929422"/>
|
||||||
|
<reference key="parent" ref="777708215"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1255</int>
|
||||||
|
<reference key="object" ref="884669610"/>
|
||||||
|
<reference key="parent" ref="849532305"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1256</int>
|
||||||
|
<reference key="object" ref="810910961"/>
|
||||||
|
<reference key="parent" ref="777708215"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1257</int>
|
||||||
|
<reference key="object" ref="975528360"/>
|
||||||
|
<reference key="parent" ref="777708215"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1258</int>
|
||||||
|
<reference key="object" ref="109508741"/>
|
||||||
|
<reference key="parent" ref="777708215"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1259</int>
|
||||||
|
<reference key="object" ref="755457557"/>
|
||||||
|
<reference key="parent" ref="777708215"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1260</int>
|
||||||
|
<reference key="object" ref="622407355"/>
|
||||||
|
<reference key="parent" ref="777708215"/>
|
||||||
|
</object>
|
||||||
</array>
|
</array>
|
||||||
</object>
|
</object>
|
||||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||||
@@ -3578,6 +3988,49 @@
|
|||||||
<string key="1195.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="1195.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="1197.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="1197.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="1199.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="1199.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1209.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1210.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<array class="NSMutableArray" key="1211.IBNSViewMetadataConstraints">
|
||||||
|
<reference ref="622407355"/>
|
||||||
|
<reference ref="975528360"/>
|
||||||
|
<reference ref="809019904"/>
|
||||||
|
<reference ref="20370934"/>
|
||||||
|
<reference ref="755457557"/>
|
||||||
|
<reference ref="155929422"/>
|
||||||
|
<reference ref="810910961"/>
|
||||||
|
<reference ref="109508741"/>
|
||||||
|
</array>
|
||||||
|
<string key="1211.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<boolean value="NO" key="1212.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||||
|
<string key="1212.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1213.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1216.CustomClassName">HNHRoundedTextField</string>
|
||||||
|
<array class="NSMutableArray" key="1216.IBNSViewMetadataConstraints">
|
||||||
|
<reference ref="525800113"/>
|
||||||
|
</array>
|
||||||
|
<boolean value="NO" key="1216.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||||
|
<string key="1216.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1217.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1225.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1227.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1228.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<array class="NSMutableArray" key="1230.IBNSViewMetadataConstraints">
|
||||||
|
<reference ref="884669610"/>
|
||||||
|
</array>
|
||||||
|
<boolean value="NO" key="1230.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||||
|
<string key="1230.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1231.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1232.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<boolean value="NO" key="1239.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||||
|
<string key="1239.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1240.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1253.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1255.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1256.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1257.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1258.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1259.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="1260.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<boolean value="NO" key="189.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
<boolean value="NO" key="189.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||||
<string key="189.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="189.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="190.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="190.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
@@ -3647,7 +4100,7 @@
|
|||||||
</array>
|
</array>
|
||||||
<string key="369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<array class="NSMutableArray" key="371.IBNSViewMetadataConstraints">
|
<array key="371.IBNSViewMetadataConstraints">
|
||||||
<reference ref="270539620"/>
|
<reference ref="270539620"/>
|
||||||
<reference ref="943243543"/>
|
<reference ref="943243543"/>
|
||||||
<reference ref="604885400"/>
|
<reference ref="604885400"/>
|
||||||
@@ -3685,7 +4138,6 @@
|
|||||||
<string key="513.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="513.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="514.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="514.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="516.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="516.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="520.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<string key="521.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="521.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="525.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="525.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="527.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="527.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
@@ -3807,7 +4259,7 @@
|
|||||||
<nil key="activeLocalization"/>
|
<nil key="activeLocalization"/>
|
||||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||||
<nil key="sourceID"/>
|
<nil key="sourceID"/>
|
||||||
<int key="maxID">1202</int>
|
<int key="maxID">1262</int>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||||
@@ -3830,27 +4282,46 @@
|
|||||||
<string key="minorKey">./Classes/HNHRoundedSecureTextField.h</string>
|
<string key="minorKey">./Classes/HNHRoundedSecureTextField.h</string>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">HNHRoundedTextField</string>
|
||||||
|
<string key="superclassName">NSTextField</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">./Classes/HNHRoundedTextField.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
<object class="IBPartialClassDescription">
|
<object class="IBPartialClassDescription">
|
||||||
<string key="className">MPDatabaseSettingsWindowController</string>
|
<string key="className">MPDatabaseSettingsWindowController</string>
|
||||||
<string key="superclassName">NSWindowController</string>
|
<string key="superclassName">NSWindowController</string>
|
||||||
<dictionary class="NSMutableDictionary" key="actions">
|
<dictionary class="NSMutableDictionary" key="actions">
|
||||||
<string key="clearKey:">id</string>
|
<string key="clearKey:">id</string>
|
||||||
|
<string key="close:">id</string>
|
||||||
<string key="generateKey:">id</string>
|
<string key="generateKey:">id</string>
|
||||||
|
<string key="save:">id</string>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||||
<object class="IBActionInfo" key="clearKey:">
|
<object class="IBActionInfo" key="clearKey:">
|
||||||
<string key="name">clearKey:</string>
|
<string key="name">clearKey:</string>
|
||||||
<string key="candidateClassName">id</string>
|
<string key="candidateClassName">id</string>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBActionInfo" key="close:">
|
||||||
|
<string key="name">close:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
<object class="IBActionInfo" key="generateKey:">
|
<object class="IBActionInfo" key="generateKey:">
|
||||||
<string key="name">generateKey:</string>
|
<string key="name">generateKey:</string>
|
||||||
<string key="candidateClassName">id</string>
|
<string key="candidateClassName">id</string>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBActionInfo" key="save:">
|
||||||
|
<string key="name">save:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary class="NSMutableDictionary" key="outlets">
|
<dictionary class="NSMutableDictionary" key="outlets">
|
||||||
<string key="cancelButton">NSButton</string>
|
<string key="cancelButton">NSButton</string>
|
||||||
<string key="databaseDescriptionTextView">NSTextView</string>
|
<string key="databaseDescriptionTextView">NSTextView</string>
|
||||||
<string key="databaseNameTextField">NSTextField</string>
|
<string key="databaseNameTextField">NSTextField</string>
|
||||||
|
<string key="defaultUsernameTextField">HNHRoundedTextField</string>
|
||||||
<string key="emptyRecycleBinOnQuitCheckButton">NSButton</string>
|
<string key="emptyRecycleBinOnQuitCheckButton">NSButton</string>
|
||||||
<string key="enableRecycleBinCheckButton">NSButton</string>
|
<string key="enableRecycleBinCheckButton">NSButton</string>
|
||||||
<string key="errorTextField">NSTextField</string>
|
<string key="errorTextField">NSTextField</string>
|
||||||
@@ -3865,6 +4336,7 @@
|
|||||||
<string key="saveButton">NSButton</string>
|
<string key="saveButton">NSButton</string>
|
||||||
<string key="sectionTabView">NSTabView</string>
|
<string key="sectionTabView">NSTabView</string>
|
||||||
<string key="selectRecycleBinGroupPopUpButton">NSPopUpButton</string>
|
<string key="selectRecycleBinGroupPopUpButton">NSPopUpButton</string>
|
||||||
|
<string key="templateGroupPopUpButton">NSPopUpButton</string>
|
||||||
<string key="togglePasswordButton">NSButton</string>
|
<string key="togglePasswordButton">NSButton</string>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||||
@@ -3880,6 +4352,10 @@
|
|||||||
<string key="name">databaseNameTextField</string>
|
<string key="name">databaseNameTextField</string>
|
||||||
<string key="candidateClassName">NSTextField</string>
|
<string key="candidateClassName">NSTextField</string>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo" key="defaultUsernameTextField">
|
||||||
|
<string key="name">defaultUsernameTextField</string>
|
||||||
|
<string key="candidateClassName">HNHRoundedTextField</string>
|
||||||
|
</object>
|
||||||
<object class="IBToOneOutletInfo" key="emptyRecycleBinOnQuitCheckButton">
|
<object class="IBToOneOutletInfo" key="emptyRecycleBinOnQuitCheckButton">
|
||||||
<string key="name">emptyRecycleBinOnQuitCheckButton</string>
|
<string key="name">emptyRecycleBinOnQuitCheckButton</string>
|
||||||
<string key="candidateClassName">NSButton</string>
|
<string key="candidateClassName">NSButton</string>
|
||||||
@@ -3936,6 +4412,10 @@
|
|||||||
<string key="name">selectRecycleBinGroupPopUpButton</string>
|
<string key="name">selectRecycleBinGroupPopUpButton</string>
|
||||||
<string key="candidateClassName">NSPopUpButton</string>
|
<string key="candidateClassName">NSPopUpButton</string>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo" key="templateGroupPopUpButton">
|
||||||
|
<string key="name">templateGroupPopUpButton</string>
|
||||||
|
<string key="candidateClassName">NSPopUpButton</string>
|
||||||
|
</object>
|
||||||
<object class="IBToOneOutletInfo" key="togglePasswordButton">
|
<object class="IBToOneOutletInfo" key="togglePasswordButton">
|
||||||
<string key="name">togglePasswordButton</string>
|
<string key="name">togglePasswordButton</string>
|
||||||
<string key="candidateClassName">NSButton</string>
|
<string key="candidateClassName">NSButton</string>
|
||||||
|
|||||||
@@ -12,13 +12,15 @@ typedef NS_ENUM(NSUInteger, MPDatabaseSettingsTab) {
|
|||||||
MPDatabaseSettingsTabGeneral,
|
MPDatabaseSettingsTabGeneral,
|
||||||
MPDatabaseSettingsTabPassword,
|
MPDatabaseSettingsTabPassword,
|
||||||
MPDatabaseSettingsTabDisplay,
|
MPDatabaseSettingsTabDisplay,
|
||||||
MPDatabaseSettingsTabAdvanced
|
MPDatabaseSettingsTabAdvanced,
|
||||||
|
MPDatabaseSettingsTemplatesTab,
|
||||||
};
|
};
|
||||||
|
|
||||||
@class MPDocument;
|
@class MPDocument;
|
||||||
|
@class HNHRoundendTextField;
|
||||||
@class HNHRoundedSecureTextField;
|
@class HNHRoundedSecureTextField;
|
||||||
|
|
||||||
@interface MPDatabaseSettingsWindowController : NSWindowController <NSTextFieldDelegate>
|
@interface MPDatabaseSettingsWindowController : NSWindowController <NSTextFieldDelegate, NSTabViewDelegate>
|
||||||
|
|
||||||
@property (weak) IBOutlet NSTabView *sectionTabView;
|
@property (weak) IBOutlet NSTabView *sectionTabView;
|
||||||
@property (weak) IBOutlet NSButton *saveButton;
|
@property (weak) IBOutlet NSButton *saveButton;
|
||||||
@@ -51,6 +53,12 @@ typedef NS_ENUM(NSUInteger, MPDatabaseSettingsTab) {
|
|||||||
@property (weak) IBOutlet NSButton *emptyRecycleBinOnQuitCheckButton;
|
@property (weak) IBOutlet NSButton *emptyRecycleBinOnQuitCheckButton;
|
||||||
@property (weak) IBOutlet NSPopUpButton *selectRecycleBinGroupPopUpButton;
|
@property (weak) IBOutlet NSPopUpButton *selectRecycleBinGroupPopUpButton;
|
||||||
|
|
||||||
|
|
||||||
|
/* Templates Tab */
|
||||||
|
@property (weak) IBOutlet HNHRoundendTextField *defaultUsernameTextField;
|
||||||
|
@property (weak) IBOutlet NSPopUpButton *templateGroupPopUpButton;
|
||||||
|
|
||||||
|
|
||||||
- (id)initWithDocument:(MPDocument *)document;
|
- (id)initWithDocument:(MPDocument *)document;
|
||||||
|
|
||||||
- (void)showSettingsTab:(MPDatabaseSettingsTab)tab;
|
- (void)showSettingsTab:(MPDatabaseSettingsTab)tab;
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
#import "MPDocumentWindowController.h"
|
#import "MPDocumentWindowController.h"
|
||||||
#import "MPDatabaseVersion.h"
|
#import "MPDatabaseVersion.h"
|
||||||
#import "MPIconHelper.h"
|
#import "MPIconHelper.h"
|
||||||
|
#import "MPSettingsHelper.h"
|
||||||
|
|
||||||
|
#import "HNHRoundedTextField.h"
|
||||||
#import "HNHRoundedSecureTextField.h"
|
#import "HNHRoundedSecureTextField.h"
|
||||||
|
|
||||||
#import "NSString+Empty.h"
|
#import "NSString+Empty.h"
|
||||||
@@ -22,6 +24,7 @@
|
|||||||
|
|
||||||
@interface MPDatabaseSettingsWindowController () {
|
@interface MPDatabaseSettingsWindowController () {
|
||||||
MPDocument *_document;
|
MPDocument *_document;
|
||||||
|
NSString *_missingFeature;
|
||||||
}
|
}
|
||||||
|
|
||||||
@property (nonatomic,assign) BOOL trashEnabled;
|
@property (nonatomic,assign) BOOL trashEnabled;
|
||||||
@@ -43,6 +46,7 @@
|
|||||||
_document = document;
|
_document = document;
|
||||||
_showPassword = NO;
|
_showPassword = NO;
|
||||||
_hasValidPasswordOrKey = NO;
|
_hasValidPasswordOrKey = NO;
|
||||||
|
_missingFeature = NSLocalizedString(@"KDBX_ONLX_FEATURE", "Feature only available in kdbx databases");
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@@ -55,16 +59,10 @@
|
|||||||
[self.saveButton bind:NSEnabledBinding toObject:self withKeyPath:@"hasValidPasswordOrKey" options:nil];
|
[self.saveButton bind:NSEnabledBinding toObject:self withKeyPath:@"hasValidPasswordOrKey" options:nil];
|
||||||
[self.cancelButton bind:NSEnabledBinding toObject:self withKeyPath:@"hasValidPasswordOrKey" options:nil];
|
[self.cancelButton bind:NSEnabledBinding toObject:self withKeyPath:@"hasValidPasswordOrKey" options:nil];
|
||||||
|
|
||||||
Kdb4Tree *tree = _document.treeV4;
|
[self.sectionTabView setDelegate:self];
|
||||||
if( tree ) {
|
|
||||||
[self _setupDatabase:tree];
|
|
||||||
[self _setupProtectionTab:tree];
|
[self update];
|
||||||
[self _setupAdvancedTab:tree];
|
|
||||||
[self _setupPasswordTab:tree];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Switch to KdbV3 View
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)save:(id)sender {
|
- (IBAction)save:(id)sender {
|
||||||
@@ -81,15 +79,37 @@
|
|||||||
|
|
||||||
/* Advanced */
|
/* Advanced */
|
||||||
_document.treeV4.recycleBinEnabled = self.trashEnabled;
|
_document.treeV4.recycleBinEnabled = self.trashEnabled;
|
||||||
NSMenuItem *menuItem = [self.selectRecycleBinGroupPopUpButton selectedItem];
|
NSMenuItem *trashMenuItem = [self.selectRecycleBinGroupPopUpButton selectedItem];
|
||||||
KdbGroup *group = [menuItem representedObject];
|
KdbGroup *trashGroup = [trashMenuItem representedObject];
|
||||||
[_document useGroupAsTrash:group];
|
[_document useGroupAsTrash:trashGroup];
|
||||||
|
|
||||||
_document.treeV4.protectNotes = [self.protectNotesCheckButton state] == NSOnState;
|
NSMenuItem *templateMenuItem = [self.templateGroupPopUpButton selectedItem];
|
||||||
_document.treeV4.protectPassword = [self.protectPasswortCheckButton state] == NSOnState;
|
KdbGroup *templateGroup = [templateMenuItem representedObject];
|
||||||
_document.treeV4.protectTitle = [self.protectTitleCheckButton state] == NSOnState;
|
[_document useGroupAsTemplate:templateGroup];
|
||||||
_document.treeV4.protectUrl = [self.protectURLCheckButton state] == NSOnState;
|
|
||||||
_document.treeV4.protectUserName = [self.protectUserNameCheckButton state] == NSOnState;
|
BOOL protectNotes = [self.protectNotesCheckButton state] == NSOnState;
|
||||||
|
BOOL protectPassword = [self.protectPasswortCheckButton state] == NSOnState;
|
||||||
|
BOOL protectTitle = [self.protectTitleCheckButton state] == NSOnState;
|
||||||
|
BOOL protectURL = [self.protectURLCheckButton state] == NSOnState;
|
||||||
|
BOOL protectUsername = [self.protectUserNameCheckButton state] == NSOnState;
|
||||||
|
|
||||||
|
if(_document.version == MPDatabaseVersion4) {
|
||||||
|
_document.treeV4.protectNotes = protectNotes;
|
||||||
|
_document.treeV4.protectPassword = protectPassword;
|
||||||
|
_document.treeV4.protectTitle = protectTitle;
|
||||||
|
_document.treeV4.protectUrl = protectURL;
|
||||||
|
_document.treeV4.protectUserName = protectUsername;
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
[defaults setBool:protectNotes forKey:kMPSettingsKeyLegacyHideNotes];
|
||||||
|
[defaults setBool:protectPassword forKey:kMPSettingsKeyLegacyHidePassword];
|
||||||
|
[defaults setBool:protectTitle forKey:kMPSettingsKeyLegacyHideTitle];
|
||||||
|
[defaults setBool:protectURL forKey:kMPSettingsKeyLegacyHideURL];
|
||||||
|
[defaults setBool:protectUsername forKey:kMPSettingsKeyLegacyHideUsername];
|
||||||
|
[defaults synchronize];
|
||||||
|
}
|
||||||
|
|
||||||
/* Close to finish */
|
/* Close to finish */
|
||||||
[self close:nil];
|
[self close:nil];
|
||||||
@@ -104,16 +124,27 @@
|
|||||||
- (void)update {
|
- (void)update {
|
||||||
/* Update all stuff that might have changed */
|
/* Update all stuff that might have changed */
|
||||||
Kdb4Tree *tree = _document.treeV4;
|
Kdb4Tree *tree = _document.treeV4;
|
||||||
if(tree) {
|
[self _setupPasswordTab:tree];
|
||||||
[self _setupDatabase:tree];
|
[self _setupDatabase:tree];
|
||||||
[self _setupProtectionTab:tree];
|
[self _setupProtectionTab:tree];
|
||||||
[self _setupAdvancedTab:tree];
|
[self _setupAdvancedTab:tree];
|
||||||
[self _setupPasswordTab:tree];
|
[self _setupTemplatesTab:tree];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)showSettingsTab:(MPDatabaseSettingsTab)tab {
|
- (void)showSettingsTab:(MPDatabaseSettingsTab)tab {
|
||||||
|
/*
|
||||||
|
We need to make sure the window is loaded
|
||||||
|
so we just call the the getter and led teh loading commence
|
||||||
|
*/
|
||||||
|
if(![self window]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
self.showPassword = NO;
|
self.showPassword = NO;
|
||||||
|
NSTabViewItem *tabViewItem = [self.sectionTabView tabViewItemAtIndex:tab];
|
||||||
|
BOOL canSelectTab = [self tabView:self.sectionTabView shouldSelectTabViewItem:tabViewItem];
|
||||||
|
if(!canSelectTab) {
|
||||||
|
[self.sectionTabView selectTabViewItemAtIndex:MPDatabaseSettingsTabPassword];
|
||||||
|
}
|
||||||
[self.sectionTabView selectTabViewItemAtIndex:tab];
|
[self.sectionTabView selectTabViewItemAtIndex:tab];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,11 +170,29 @@
|
|||||||
- (IBAction)generateKey:(id)sender {
|
- (IBAction)generateKey:(id)sender {
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma makr NSTextFieldDelegate
|
#pragma mark NSTextFieldDelegate
|
||||||
- (void)controlTextDidChange:(NSNotification *)obj {
|
- (void)controlTextDidChange:(NSNotification *)obj {
|
||||||
[self _verifyPasswordAndKey];
|
[self _verifyPasswordAndKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark NSTableViewDelegate
|
||||||
|
- (BOOL)tabView:(NSTabView *)tabView shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem {
|
||||||
|
NSUInteger index = [tabView indexOfTabViewItem:tabViewItem];
|
||||||
|
switch ((MPDatabaseSettingsTab)index) {
|
||||||
|
case MPDatabaseSettingsTabPassword:
|
||||||
|
case MPDatabaseSettingsTabDisplay:
|
||||||
|
return YES;
|
||||||
|
|
||||||
|
case MPDatabaseSettingsTabAdvanced:
|
||||||
|
case MPDatabaseSettingsTabGeneral:
|
||||||
|
case MPDatabaseSettingsTemplatesTab:
|
||||||
|
return (_document.version == MPDatabaseVersion4);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark Private Helper
|
#pragma mark Private Helper
|
||||||
- (void)_verifyPasswordAndKey {
|
- (void)_verifyPasswordAndKey {
|
||||||
NSString *password = [self.passwordTextField stringValue];
|
NSString *password = [self.passwordTextField stringValue];
|
||||||
@@ -180,23 +229,48 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)_setupDatabase:(Kdb4Tree *)tree {
|
- (void)_setupDatabase:(Kdb4Tree *)tree {
|
||||||
[self.databaseNameTextField setStringValue:tree.databaseName];
|
BOOL isKdbx = (nil != tree);
|
||||||
[self.databaseDescriptionTextView setString:tree.databaseDescription];
|
[self.databaseDescriptionTextView setEditable:isKdbx];
|
||||||
|
[self.databaseNameTextField setEnabled:isKdbx];
|
||||||
|
if(isKdbx) {
|
||||||
|
[self.databaseNameTextField setStringValue:tree.databaseName];
|
||||||
|
[self.databaseDescriptionTextView setString:tree.databaseDescription];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[self.databaseNameTextField setStringValue:_missingFeature];
|
||||||
|
[self.databaseDescriptionTextView setString:_missingFeature];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_setupProtectionTab:(Kdb4Tree *)tree {
|
- (void)_setupProtectionTab:(Kdb4Tree *)tree {
|
||||||
[self.protectNotesCheckButton setState:tree.protectNotes ? NSOnState : NSOffState ];
|
BOOL isKdbX = (nil != tree);
|
||||||
[self.protectNotesCheckButton setState:tree.protectPassword ? NSOnState : NSOffState];
|
|
||||||
[self.protectTitleCheckButton setState:tree.protectTitle ? NSOnState : NSOffState];
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
[self.protectURLCheckButton setState:tree.protectUrl ? NSOnState : NSOffState];
|
|
||||||
[self.protectUserNameCheckButton setState:tree.protectUserName ? NSOnState : NSOffState];
|
BOOL protectNotes = isKdbX ? tree.protectNotes : [defaults boolForKey:kMPSettingsKeyLegacyHideNotes];
|
||||||
|
BOOL protectPassword = isKdbX ? tree.protectPassword : [defaults boolForKey:kMPSettingsKeyLegacyHidePassword];
|
||||||
|
BOOL protectTitle = isKdbX ? tree.protectTitle : [defaults boolForKey:kMPSettingsKeyLegacyHideTitle];
|
||||||
|
BOOL protectUrl = isKdbX ? tree.protectUrl : [defaults boolForKey:kMPSettingsKeyLegacyHideURL];
|
||||||
|
BOOL protectUsername = isKdbX ? tree.protectUserName : [defaults boolForKey:kMPSettingsKeyLegacyHideUsername];
|
||||||
|
|
||||||
|
[self.protectNotesCheckButton setState:protectNotes ? NSOnState : NSOffState ];
|
||||||
|
[self.protectPasswortCheckButton setState:protectPassword ? NSOnState : NSOffState];
|
||||||
|
[self.protectTitleCheckButton setState:protectTitle ? NSOnState : NSOffState];
|
||||||
|
[self.protectURLCheckButton setState:protectUrl ? NSOnState : NSOffState];
|
||||||
|
[self.protectUserNameCheckButton setState:protectUsername ? NSOnState : NSOffState];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_setupAdvancedTab:(Kdb4Tree *)tree {
|
- (void)_setupAdvancedTab:(Kdb4Tree *)tree {
|
||||||
self.trashEnabled = tree.recycleBinEnabled;
|
BOOL isKdbX = (nil != tree);
|
||||||
|
|
||||||
|
self.trashEnabled = isKdbX ? tree.recycleBinEnabled : NO;
|
||||||
|
|
||||||
[self.enableRecycleBinCheckButton bind:NSValueBinding toObject:self withKeyPath:@"trashEnabled" options:nil];
|
[self.enableRecycleBinCheckButton bind:NSValueBinding toObject:self withKeyPath:@"trashEnabled" options:nil];
|
||||||
|
[self.enableRecycleBinCheckButton setEnabled:isKdbX];
|
||||||
[self.selectRecycleBinGroupPopUpButton bind:NSEnabledBinding toObject:self withKeyPath:@"trashEnabled" options:nil];
|
[self.selectRecycleBinGroupPopUpButton bind:NSEnabledBinding toObject:self withKeyPath:@"trashEnabled" options:nil];
|
||||||
[self _updateTrashFolders:tree];
|
if(isKdbX) {
|
||||||
|
[self _updateTrashFolders:tree];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_setupPasswordTab:(Kdb4Tree *)tree {
|
- (void)_setupPasswordTab:(Kdb4Tree *)tree {
|
||||||
@@ -218,11 +292,40 @@
|
|||||||
[self _verifyPasswordAndKey];
|
[self _verifyPasswordAndKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)_setupTemplatesTab:(Kdb4Tree *)tree {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
- (void)_updateTrashFolders:(Kdb4Tree *)tree {
|
- (void)_updateTrashFolders:(Kdb4Tree *)tree {
|
||||||
NSMenu *menu = [self _buildTreeMenu:tree];
|
NSMenu *menu = [self _buildTreeMenu:tree];
|
||||||
[self.selectRecycleBinGroupPopUpButton setMenu:menu];
|
[self.selectRecycleBinGroupPopUpButton setMenu:menu];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)_updateTemplateGroup:(Kdb4Tree *)tree {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSMenu *)_buildTrashTreeMenu:(Kdb4Tree *)tree {
|
||||||
|
NSMenu *menu = [self _buildTreeMenu:tree];
|
||||||
|
|
||||||
|
NSMenuItem *selectItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"SELECT_RECYCLEBIN", @"Menu item if no reycleBin is selected") action:NULL keyEquivalent:@""];
|
||||||
|
[selectItem setEnabled:YES];
|
||||||
|
[menu insertItem:selectItem atIndex:0];
|
||||||
|
|
||||||
|
return menu;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSMenu *)_buildTemplateTreeMenu:(Kdb4Tree *)tree {
|
||||||
|
NSMenu *menu = [self _buildTreeMenu:tree];
|
||||||
|
|
||||||
|
NSMenuItem *selectItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"SELECT_RECYCLEBIN", @"Menu item if no reycleBin is selected") action:NULL keyEquivalent:@""];
|
||||||
|
[selectItem setEnabled:YES];
|
||||||
|
[menu insertItem:selectItem atIndex:0];
|
||||||
|
|
||||||
|
return menu;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
- (NSMenu *)_buildTreeMenu:(Kdb4Tree *)tree {
|
- (NSMenu *)_buildTreeMenu:(Kdb4Tree *)tree {
|
||||||
NSMenu *menu = [[NSMenu alloc] init];
|
NSMenu *menu = [[NSMenu alloc] init];
|
||||||
[menu setAutoenablesItems:NO];
|
[menu setAutoenablesItems:NO];
|
||||||
@@ -238,10 +341,7 @@
|
|||||||
}
|
}
|
||||||
[menu addItem:groupItem];
|
[menu addItem:groupItem];
|
||||||
}
|
}
|
||||||
NSMenuItem *selectItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"SELECT_RECYCLEBIN", @"Menu item if no reycleBin is selected") action:NULL keyEquivalent:@""];
|
|
||||||
[selectItem setEnabled:YES];
|
|
||||||
[menu insertItem:selectItem atIndex:0];
|
|
||||||
|
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ APPKIT_EXTERN NSString *const MPDocumentGroupKey;
|
|||||||
- (Kdb3Tree *)treeV3;
|
- (Kdb3Tree *)treeV3;
|
||||||
|
|
||||||
- (void)useGroupAsTrash:(KdbGroup *)group;
|
- (void)useGroupAsTrash:(KdbGroup *)group;
|
||||||
|
- (void)useGroupAsTemplate:(KdbGroup *)group;
|
||||||
|
|
||||||
#pragma mark Export
|
#pragma mark Export
|
||||||
- (void)writeXMLToURL:(NSURL *)url;
|
- (void)writeXMLToURL:(NSURL *)url;
|
||||||
|
|||||||
@@ -316,6 +316,13 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)useGroupAsTemplate:(KdbGroup *)group {
|
||||||
|
Kdb4Group *groupv4 = (Kdb4Group *)group;
|
||||||
|
if([self.treeV4.entryTemplatesGroup isEqual:groupv4.uuid]) {
|
||||||
|
self.treeV4.entryTemplatesGroup = groupv4.uuid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark Data manipulation
|
#pragma mark Data manipulation
|
||||||
- (KdbEntry *)createEntry:(KdbGroup *)parent {
|
- (KdbEntry *)createEntry:(KdbGroup *)parent {
|
||||||
if(!parent) {
|
if(!parent) {
|
||||||
|
|||||||
@@ -363,12 +363,12 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur
|
|||||||
#pragma mark Helper
|
#pragma mark Helper
|
||||||
|
|
||||||
- (void)_showDatabaseSetting:(MPDatabaseSettingsTab)tab {
|
- (void)_showDatabaseSetting:(MPDatabaseSettingsTab)tab {
|
||||||
if(!self.documentSettingsWindowController) {
|
if(!self.documentSettingsWindowController) {
|
||||||
_documentSettingsWindowController = [[MPDatabaseSettingsWindowController alloc] initWithDocument:[self document]];
|
_documentSettingsWindowController = [[MPDatabaseSettingsWindowController alloc] initWithDocument:[self document]];
|
||||||
}
|
}
|
||||||
[self.documentSettingsWindowController update];
|
[self.documentSettingsWindowController update];
|
||||||
[self.documentSettingsWindowController showSettingsTab:tab];
|
[self.documentSettingsWindowController showSettingsTab:tab];
|
||||||
[[NSApplication sharedApplication] beginSheet:[self.documentSettingsWindowController window] modalForWindow:[self window] modalDelegate:nil didEndSelector:NULL contextInfo:NULL];
|
[[NSApplication sharedApplication] beginSheet:[self.documentSettingsWindowController window] modalForWindow:[self window] modalDelegate:nil didEndSelector:NULL contextInfo:NULL];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSSearchField *)locateToolbarSearchField {
|
- (NSSearchField *)locateToolbarSearchField {
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ enum {
|
|||||||
@property (strong) NSPopover *activePopover;
|
@property (strong) NSPopover *activePopover;
|
||||||
@property (weak) IBOutlet NSButton *generatePasswordButton;
|
@property (weak) IBOutlet NSButton *generatePasswordButton;
|
||||||
|
|
||||||
@property (nonatomic, weak) NSDate *modificationDate;
|
@property (nonatomic, strong) NSDate *modificationDate;
|
||||||
@property (nonatomic, weak) NSDate *creationDate;
|
@property (nonatomic, strong) NSDate *creationDate;
|
||||||
|
|
||||||
@property (nonatomic, assign) BOOL showPassword;
|
@property (nonatomic, assign) BOOL showPassword;
|
||||||
|
|
||||||
@@ -137,25 +137,32 @@ enum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)setModificationDate:(NSDate *)modificationDate {
|
- (void)setModificationDate:(NSDate *)modificationDate {
|
||||||
NSString *modificationString = [NSDateFormatter localizedStringFromDate:modificationDate
|
_modificationDate = modificationDate;
|
||||||
dateStyle:NSDateFormatterShortStyle
|
[self _updateDateStrings];
|
||||||
timeStyle:NSDateFormatterShortStyle];
|
|
||||||
|
|
||||||
modificationString = [modificationDate humanized];
|
|
||||||
|
|
||||||
NSString *modifedAtTemplate = NSLocalizedString(@"MODIFED_AT_%@", @"Modifed at template string. %@ is replaced by locaized date and time");
|
|
||||||
[self.modifiedTextField setStringValue:[NSString stringWithFormat:modifedAtTemplate, modificationString]];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setCreationDate:(NSDate *)creationDate {
|
- (void)setCreationDate:(NSDate *)creationDate {
|
||||||
NSString *creationString = [NSDateFormatter localizedStringFromDate:creationDate
|
_creationDate = creationDate;
|
||||||
dateStyle:NSDateFormatterShortStyle
|
[self _updateDateStrings];
|
||||||
timeStyle:NSDateFormatterShortStyle];
|
}
|
||||||
creationString = [creationDate humanized];
|
|
||||||
|
- (void)_updateDateStrings {
|
||||||
|
|
||||||
|
if(!self.creationDate || !self.modificationDate ) {
|
||||||
|
[self.modifiedTextField setStringValue:@""];
|
||||||
|
[self.createdTextField setStringValue:@""];
|
||||||
|
return; // No dates, just clear
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString *creationString = [self.creationDate humanized];
|
||||||
|
NSString *modificationString = [self.modificationDate humanized];
|
||||||
|
|
||||||
|
NSString *modifedAtTemplate = NSLocalizedString(@"MODIFED_AT_%@", @"Modifed at template string. %@ is replaced by locaized date and time");
|
||||||
NSString *createdAtTemplate = NSLocalizedString(@"CREATED_AT_%@", @"Created at template string. %@ is replaced by locaized date and time");
|
NSString *createdAtTemplate = NSLocalizedString(@"CREATED_AT_%@", @"Created at template string. %@ is replaced by locaized date and time");
|
||||||
|
|
||||||
|
[self.modifiedTextField setStringValue:[NSString stringWithFormat:modifedAtTemplate, modificationString]];
|
||||||
[self.createdTextField setStringValue:[NSString stringWithFormat:createdAtTemplate, creationString]];
|
[self.createdTextField setStringValue:[NSString stringWithFormat:createdAtTemplate, creationString]];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_updateContent {
|
- (void)_updateContent {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ APPKIT_EXTERN NSString *const MPOutlineViewDidChangeGroupSelection;
|
|||||||
|
|
||||||
@property (readonly, weak) NSOutlineView *outlineView;
|
@property (readonly, weak) NSOutlineView *outlineView;
|
||||||
@property (weak) IBOutlet HNHGradientView *bottomBar;
|
@property (weak) IBOutlet HNHGradientView *bottomBar;
|
||||||
@property (weak, readonly) KdbGroup *selectedGroup;
|
@property (weak, readonly, nonatomic) KdbGroup *selectedGroup;
|
||||||
|
|
||||||
- (void)clearSelection;
|
- (void)clearSelection;
|
||||||
- (void)showOutline;
|
- (void)showOutline;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
|||||||
}
|
}
|
||||||
@property (weak) IBOutlet NSOutlineView *outlineView;
|
@property (weak) IBOutlet NSOutlineView *outlineView;
|
||||||
@property (weak) IBOutlet NSButton *addGroupButton;
|
@property (weak) IBOutlet NSButton *addGroupButton;
|
||||||
@property (weak) KdbGroup *selectedGroup;
|
@property (nonatomic, weak) KdbGroup *selectedGroup;
|
||||||
|
|
||||||
@property (strong) NSTreeController *treeController;
|
@property (strong) NSTreeController *treeController;
|
||||||
@property (strong) MPOutlineDataSource *datasource;
|
@property (strong) MPOutlineDataSource *datasource;
|
||||||
@@ -89,6 +89,29 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
|||||||
[_outlineView expandItem:node expandChildren:YES];
|
[_outlineView expandItem:node expandChildren:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark Custom Setter/Getter
|
||||||
|
- (void)setDatabaseNameWrapper:(NSString *)databaseNameWrapper {
|
||||||
|
if(![_databaseNameWrapper isEqualToString:databaseNameWrapper]) {
|
||||||
|
if([databaseNameWrapper length] == 0) {
|
||||||
|
_databaseNameWrapper = NSLocalizedString(@"DATABASE", "Default name database");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_databaseNameWrapper= [databaseNameWrapper copy];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//- (void)setSelectedGroup:(KdbGroup *)selectedGroup {
|
||||||
|
// if(_selectedGroup != selectedGroup) {
|
||||||
|
// _selectedGroup = selectedGroup;
|
||||||
|
// if([selectedGroup isKindOfClass:[Kdb4Group class]]) {
|
||||||
|
// MPDocument *document = [[self windowController] document];
|
||||||
|
// document.treeV4.lastSelectedGroup = ((Kdb4Group *)selectedGroup).uuid;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
#pragma mark Notifications
|
#pragma mark Notifications
|
||||||
- (void)setupNotifications:(MPDocumentWindowController *)windowController {
|
- (void)setupNotifications:(MPDocumentWindowController *)windowController {
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didCreateGroup:) name:MPDocumentDidAddGroupNotification object:[windowController document]];
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didCreateGroup:) name:MPDocumentDidAddGroupNotification object:[windowController document]];
|
||||||
@@ -114,17 +137,6 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setDatabaseNameWrapper:(NSString *)databaseNameWrapper {
|
|
||||||
if(![_databaseNameWrapper isEqualToString:databaseNameWrapper]) {
|
|
||||||
if([databaseNameWrapper length] == 0) {
|
|
||||||
_databaseNameWrapper = NSLocalizedString(@"DATABASE", "Default name database");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
_databaseNameWrapper= [databaseNameWrapper copy];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
#pragma mark Actions
|
#pragma mark Actions
|
||||||
|
|
||||||
|
|||||||
@@ -26,10 +26,16 @@ APPKIT_EXTERN NSString *const kMPSettingsKeyShowMenuItem;
|
|||||||
APPKIT_EXTERN NSString *const kMPSettingsKeyLockOnSleep;
|
APPKIT_EXTERN NSString *const kMPSettingsKeyLockOnSleep;
|
||||||
APPKIT_EXTERN NSString *const kMPSettingsKeyIdleLockTimeOut;
|
APPKIT_EXTERN NSString *const kMPSettingsKeyIdleLockTimeOut;
|
||||||
|
|
||||||
|
|
||||||
/* Autosaving states */
|
/* Autosaving states */
|
||||||
APPKIT_EXTERN NSString *const kMPSettingsKeyShowInspector;
|
APPKIT_EXTERN NSString *const kMPSettingsKeyShowInspector;
|
||||||
|
|
||||||
|
/* Kdb Hide/Show settings */
|
||||||
|
APPKIT_EXTERN NSString *const kMPSettingsKeyLegacyHideTitle;
|
||||||
|
APPKIT_EXTERN NSString *const kMPSettingsKeyLegacyHideUsername;
|
||||||
|
APPKIT_EXTERN NSString *const kMPSettingsKeyLegacyHidePassword;
|
||||||
|
APPKIT_EXTERN NSString *const kMPSettingsKeyLegacyHideNotes;
|
||||||
|
APPKIT_EXTERN NSString *const kMPSettingsKeyLegacyHideURL;
|
||||||
|
|
||||||
typedef NS_ENUM(NSUInteger, MPPasswordEncoding) {
|
typedef NS_ENUM(NSUInteger, MPPasswordEncoding) {
|
||||||
MPPasswordEncodingUTF8,
|
MPPasswordEncodingUTF8,
|
||||||
MPPasswordEncodingASCII,
|
MPPasswordEncodingASCII,
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ NSString *const kMPSettingsKeyLockOnSleep = @"LockOnSleep";
|
|||||||
NSString *const kMPSettingsKeyIdleLockTimeOut = @"IdleLockTimeOut";
|
NSString *const kMPSettingsKeyIdleLockTimeOut = @"IdleLockTimeOut";
|
||||||
NSString *const kMPSettingsKeyShowInspector = @"ShowInspector";
|
NSString *const kMPSettingsKeyShowInspector = @"ShowInspector";
|
||||||
|
|
||||||
|
NSString *const kMPSettingsKeyLegacyHideTitle = @"LegacyHideTitle";
|
||||||
|
NSString *const kMPSettingsKeyLegacyHideUsername = @"LegacyHideUsername ";
|
||||||
|
NSString *const kMPSettingsKeyLegacyHidePassword = @"LegacyHidePassword";
|
||||||
|
NSString *const kMPSettingsKeyLegacyHideNotes = @"LegacyHideNotes";
|
||||||
|
NSString *const kMPSettingsKeyLegacyHideURL = @"LegacyHideURL";
|
||||||
|
|
||||||
|
|
||||||
@implementation MPSettingsHelper
|
@implementation MPSettingsHelper
|
||||||
|
|
||||||
+ (void)setupDefaults {
|
+ (void)setupDefaults {
|
||||||
@@ -36,7 +43,12 @@ NSString *const kMPSettingsKeyShowInspector = @"ShowInspector";
|
|||||||
kMPSettingsKeyEnableHttpServer: @NO,
|
kMPSettingsKeyEnableHttpServer: @NO,
|
||||||
kMPSettingsKeyShowMenuItem: @YES,
|
kMPSettingsKeyShowMenuItem: @YES,
|
||||||
kMPSettingsKeyLockOnSleep: @YES,
|
kMPSettingsKeyLockOnSleep: @YES,
|
||||||
kMPSettingsKeyIdleLockTimeOut: @0 // 5 minutes
|
kMPSettingsKeyIdleLockTimeOut: @0, // 5 minutes
|
||||||
|
kMPSettingsKeyLegacyHideNotes: @NO,
|
||||||
|
kMPSettingsKeyLegacyHidePassword: @YES,
|
||||||
|
kMPSettingsKeyLegacyHideTitle: @NO,
|
||||||
|
kMPSettingsKeyLegacyHideURL: @NO,
|
||||||
|
kMPSettingsKeyLegacyHideUsername: @NO
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,15 +16,38 @@
|
|||||||
|
|
||||||
- (NSString *)humanized {
|
- (NSString *)humanized {
|
||||||
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
|
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
|
||||||
NSDateComponents *components = [calendar components:NSMinuteCalendarUnit|NSHourCalendarUnit|NSDayCalendarUnit fromDate:self toDate:[NSDate date] options:0];
|
NSDateComponents *components = [calendar components:NSMinuteCalendarUnit|NSHourCalendarUnit|NSDayCalendarUnit|NSWeekCalendarUnit|NSMonthCalendarUnit fromDate:self toDate:[NSDate date] options:0];
|
||||||
if([components day] > 1) {
|
/* More than one month in the past, give full date */
|
||||||
|
if([components month] > 1) {
|
||||||
return [NSDateFormatter localizedStringFromDate:self
|
return [NSDateFormatter localizedStringFromDate:self
|
||||||
dateStyle:NSDateFormatterShortStyle
|
dateStyle:NSDateFormatterShortStyle
|
||||||
timeStyle:NSDateFormatterShortStyle];
|
timeStyle:NSDateFormatterShortStyle];
|
||||||
}
|
}
|
||||||
if([components day] == 1) {
|
NSUInteger weeks = [components week];
|
||||||
|
/* More than one week, less than a month */
|
||||||
|
if(weeks > 1) {
|
||||||
|
NSString *weekTemplate = NSLocalizedString(@"%ld_WEEKS_AGO", "% Weeks ago");
|
||||||
|
return [NSString stringWithFormat:weekTemplate, weeks];
|
||||||
|
}
|
||||||
|
/* One week or more */
|
||||||
|
if( weeks == 1) {
|
||||||
|
return NSLocalizedString(@"ONE_WEEK_AGO", "one week ago");
|
||||||
|
}
|
||||||
|
/* Last week */
|
||||||
|
NSUInteger days = [components day];
|
||||||
|
if(days > 3) {
|
||||||
|
return NSLocalizedString(@"LAST_WEEK", "last week");
|
||||||
|
}
|
||||||
|
/* 1-3 days */
|
||||||
|
if(days > 1 ) {
|
||||||
|
NSString *daysTemplate = NSLocalizedString(@"%ld_DAYS_AGO", "% days ago");
|
||||||
|
return [NSString stringWithFormat:daysTemplate, days];
|
||||||
|
}
|
||||||
|
/* Yesterday */
|
||||||
|
if(days == 1) {
|
||||||
return NSLocalizedString(@"YESTERDAY", "Yesterday");
|
return NSLocalizedString(@"YESTERDAY", "Yesterday");
|
||||||
}
|
}
|
||||||
|
/* Hours ago */
|
||||||
if([components hour] > 1) {
|
if([components hour] > 1) {
|
||||||
NSString *hourTemplate = NSLocalizedString(@"%ld_HOURS_AGO", "% Hours ago");
|
NSString *hourTemplate = NSLocalizedString(@"%ld_HOURS_AGO", "% Hours ago");
|
||||||
return [NSString stringWithFormat:hourTemplate, [components hour]];
|
return [NSString stringWithFormat:hourTemplate, [components hour]];
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user