mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 08:12:28 +00:00
Fixed crash that occurred when a database was open and another one failed to be opened
Some updates on the Splitter handling
This commit is contained in:
@@ -11,8 +11,16 @@
|
|||||||
<string key="NS.object.0">3084</string>
|
<string key="NS.object.0">3084</string>
|
||||||
</object>
|
</object>
|
||||||
<array key="IBDocument.IntegratedClassDependencies">
|
<array key="IBDocument.IntegratedClassDependencies">
|
||||||
|
<string>IBNSLayoutConstraint</string>
|
||||||
<string>NSCustomObject</string>
|
<string>NSCustomObject</string>
|
||||||
<string>NSCustomView</string>
|
<string>NSCustomView</string>
|
||||||
|
<string>NSImageCell</string>
|
||||||
|
<string>NSImageView</string>
|
||||||
|
<string>NSTabView</string>
|
||||||
|
<string>NSTabViewItem</string>
|
||||||
|
<string>NSTextField</string>
|
||||||
|
<string>NSTextFieldCell</string>
|
||||||
|
<string>NSView</string>
|
||||||
</array>
|
</array>
|
||||||
<array key="IBDocument.PluginDependencies">
|
<array key="IBDocument.PluginDependencies">
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
@@ -34,11 +42,138 @@
|
|||||||
<object class="NSCustomView" id="1005">
|
<object class="NSCustomView" id="1005">
|
||||||
<reference key="NSNextResponder"/>
|
<reference key="NSNextResponder"/>
|
||||||
<int key="NSvFlags">268</int>
|
<int key="NSvFlags">268</int>
|
||||||
<array class="NSMutableArray" key="NSSubviews"/>
|
<array class="NSMutableArray" key="NSSubviews">
|
||||||
<string key="NSFrameSize">{289, 504}</string>
|
<object class="NSTextField" id="787130496">
|
||||||
<reference key="NSSuperview"/>
|
<reference key="NSNextResponder" ref="1005"/>
|
||||||
|
<int key="NSvFlags">268</int>
|
||||||
|
<string key="NSFrame">{{77, 491}, {41, 17}}</string>
|
||||||
|
<reference key="NSSuperview" ref="1005"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="535016823"/>
|
||||||
|
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
||||||
|
<string key="NSAntiCompressionPriority">{200, 750}</string>
|
||||||
|
<bool key="NSEnabled">YES</bool>
|
||||||
|
<object class="NSTextFieldCell" key="NSCell" id="790131230">
|
||||||
|
<int key="NSCellFlags">67108928</int>
|
||||||
|
<int key="NSCellFlags2">272631808</int>
|
||||||
|
<string key="NSContents">Name</string>
|
||||||
|
<object class="NSFont" key="NSSupport">
|
||||||
|
<string key="NSName">LucidaGrande</string>
|
||||||
|
<double key="NSSize">13</double>
|
||||||
|
<int key="NSfFlags">1044</int>
|
||||||
|
</object>
|
||||||
|
<string key="NSCellIdentifier">_NS:1535</string>
|
||||||
|
<reference key="NSControlView" ref="787130496"/>
|
||||||
|
<object class="NSColor" key="NSBackgroundColor" id="533509460">
|
||||||
|
<int key="NSColorSpace">6</int>
|
||||||
|
<string key="NSCatalogName">System</string>
|
||||||
|
<string key="NSColorName">controlColor</string>
|
||||||
|
<object class="NSColor" key="NSColor">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSColor" key="NSTextColor">
|
||||||
|
<int key="NSColorSpace">6</int>
|
||||||
|
<string key="NSCatalogName">System</string>
|
||||||
|
<string key="NSColorName">controlTextColor</string>
|
||||||
|
<object class="NSColor" key="NSColor">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MAA</bytes>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSImageView" id="1013751338">
|
||||||
|
<reference key="NSNextResponder" ref="1005"/>
|
||||||
|
<int key="NSvFlags">268</int>
|
||||||
|
<set class="NSMutableSet" key="NSDragTypes">
|
||||||
|
<string>Apple PDF pasteboard type</string>
|
||||||
|
<string>Apple PICT pasteboard type</string>
|
||||||
|
<string>Apple PNG pasteboard type</string>
|
||||||
|
<string>NSFilenamesPboardType</string>
|
||||||
|
<string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
|
||||||
|
<string>NeXT TIFF v4.0 pasteboard type</string>
|
||||||
|
</set>
|
||||||
|
<string key="NSFrame">{{24, 475}, {48, 48}}</string>
|
||||||
|
<reference key="NSSuperview" ref="1005"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="787130496"/>
|
||||||
|
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||||
|
<bool key="NSEnabled">YES</bool>
|
||||||
|
<object class="NSImageCell" key="NSCell" id="81329947">
|
||||||
|
<int key="NSCellFlags">134217728</int>
|
||||||
|
<int key="NSCellFlags2">33554432</int>
|
||||||
|
<object class="NSCustomResource" key="NSContents">
|
||||||
|
<string key="NSClassName">NSImage</string>
|
||||||
|
<string key="NSResourceName">NSApplicationIcon</string>
|
||||||
|
</object>
|
||||||
|
<string key="NSCellIdentifier">_NS:9</string>
|
||||||
|
<int key="NSAlign">0</int>
|
||||||
|
<int key="NSScale">3</int>
|
||||||
|
<int key="NSStyle">0</int>
|
||||||
|
<bool key="NSAnimates">NO</bool>
|
||||||
|
</object>
|
||||||
|
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||||
|
<bool key="NSEditable">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSTabView" id="535016823">
|
||||||
|
<reference key="NSNextResponder" ref="1005"/>
|
||||||
|
<int key="NSvFlags">12</int>
|
||||||
|
<string key="NSFrame">{{20, 10}, {253, 463}}</string>
|
||||||
|
<reference key="NSSuperview" ref="1005"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="936537698"/>
|
||||||
|
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||||
|
<array class="NSMutableArray" key="NSTabViewItems">
|
||||||
|
<object class="NSTabViewItem" id="745022448">
|
||||||
|
<string key="NSIdentifier">1</string>
|
||||||
|
<object class="NSView" key="NSView" id="936537698">
|
||||||
|
<reference key="NSNextResponder" ref="535016823"/>
|
||||||
|
<int key="NSvFlags">256</int>
|
||||||
|
<string key="NSFrame">{{10, 25}, {233, 425}}</string>
|
||||||
|
<reference key="NSSuperview" ref="535016823"/>
|
||||||
<reference key="NSWindow"/>
|
<reference key="NSWindow"/>
|
||||||
<reference key="NSNextKeyView"/>
|
<reference key="NSNextKeyView"/>
|
||||||
|
<string key="NSReuseIdentifierKey">_NS:11</string>
|
||||||
|
</object>
|
||||||
|
<string key="NSLabel">Details</string>
|
||||||
|
<reference key="NSColor" ref="533509460"/>
|
||||||
|
<reference key="NSTabView" ref="535016823"/>
|
||||||
|
</object>
|
||||||
|
<object class="NSTabViewItem" id="895719879">
|
||||||
|
<string key="NSIdentifier">2</string>
|
||||||
|
<object class="NSView" key="NSView" id="430009688">
|
||||||
|
<nil key="NSNextResponder"/>
|
||||||
|
<int key="NSvFlags">256</int>
|
||||||
|
<string key="NSFrame">{{10, 25}, {233, 425}}</string>
|
||||||
|
<reference key="NSNextKeyView"/>
|
||||||
|
<string key="NSReuseIdentifierKey">_NS:28</string>
|
||||||
|
</object>
|
||||||
|
<string key="NSLabel">Notes</string>
|
||||||
|
<reference key="NSColor" ref="533509460"/>
|
||||||
|
<reference key="NSTabView" ref="535016823"/>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<reference key="NSSelectedTabViewItem" ref="745022448"/>
|
||||||
|
<object class="NSFont" key="NSFont">
|
||||||
|
<string key="NSName">LucidaGrande</string>
|
||||||
|
<double key="NSSize">11</double>
|
||||||
|
<int key="NSfFlags">3100</int>
|
||||||
|
</object>
|
||||||
|
<int key="NSTvFlags">134217728</int>
|
||||||
|
<bool key="NSAllowTruncatedLabels">YES</bool>
|
||||||
|
<bool key="NSDrawsBackground">YES</bool>
|
||||||
|
<array class="NSMutableArray" key="NSSubviews">
|
||||||
|
<reference ref="936537698"/>
|
||||||
|
</array>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<string key="NSFrameSize">{286, 540}</string>
|
||||||
|
<reference key="NSSuperview"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="1013751338"/>
|
||||||
<string key="NSClassName">NSView</string>
|
<string key="NSClassName">NSView</string>
|
||||||
</object>
|
</object>
|
||||||
</array>
|
</array>
|
||||||
@@ -52,6 +187,22 @@
|
|||||||
</object>
|
</object>
|
||||||
<int key="connectionID">10</int>
|
<int key="connectionID">10</int>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBOutletConnection" key="connection">
|
||||||
|
<string key="label">itemImageView</string>
|
||||||
|
<reference key="source" ref="1001"/>
|
||||||
|
<reference key="destination" ref="1013751338"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">111</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBOutletConnection" key="connection">
|
||||||
|
<string key="label">itemNameTextfield</string>
|
||||||
|
<reference key="source" ref="1001"/>
|
||||||
|
<reference key="destination" ref="787130496"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">112</int>
|
||||||
|
</object>
|
||||||
</array>
|
</array>
|
||||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
<array key="orderedObjects">
|
<array key="orderedObjects">
|
||||||
@@ -82,28 +233,376 @@
|
|||||||
<object class="IBObjectRecord">
|
<object class="IBObjectRecord">
|
||||||
<int key="objectID">1</int>
|
<int key="objectID">1</int>
|
||||||
<reference key="object" ref="1005"/>
|
<reference key="object" ref="1005"/>
|
||||||
<array class="NSMutableArray" key="children"/>
|
<array class="NSMutableArray" key="children">
|
||||||
|
<object class="IBNSLayoutConstraint" id="7482984">
|
||||||
|
<reference key="firstItem" ref="787130496"/>
|
||||||
|
<int key="firstAttribute">5</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="1013751338"/>
|
||||||
|
<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="1005"/>
|
||||||
|
<int key="scoringType">6</int>
|
||||||
|
<float key="scoringTypeFloat">24</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="1047670962">
|
||||||
|
<reference key="firstItem" ref="1005"/>
|
||||||
|
<int key="firstAttribute">6</int>
|
||||||
|
<int key="relation">1</int>
|
||||||
|
<reference key="secondItem" ref="787130496"/>
|
||||||
|
<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="1005"/>
|
||||||
|
<int key="scoringType">9</int>
|
||||||
|
<float key="scoringTypeFloat">40</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="497278534">
|
||||||
|
<reference key="firstItem" ref="787130496"/>
|
||||||
|
<int key="firstAttribute">5</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="1005"/>
|
||||||
|
<int key="secondAttribute">5</int>
|
||||||
|
<float key="multiplier">1</float>
|
||||||
|
<object class="IBLayoutConstant" key="constant">
|
||||||
|
<double key="value">80</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="1005"/>
|
||||||
|
<int key="scoringType">9</int>
|
||||||
|
<float key="scoringTypeFloat">40</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="26781143">
|
||||||
|
<reference key="firstItem" ref="787130496"/>
|
||||||
|
<int key="firstAttribute">10</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="1013751338"/>
|
||||||
|
<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="1005"/>
|
||||||
|
<int key="scoringType">6</int>
|
||||||
|
<float key="scoringTypeFloat">24</float>
|
||||||
|
<int key="contentType">2</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="1048211334">
|
||||||
|
<reference key="firstItem" ref="535016823"/>
|
||||||
|
<int key="firstAttribute">5</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="1005"/>
|
||||||
|
<int key="secondAttribute">5</int>
|
||||||
|
<float key="multiplier">1</float>
|
||||||
|
<object class="IBLayoutConstant" key="constant">
|
||||||
|
<double key="value">27</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="1005"/>
|
||||||
|
<int key="scoringType">3</int>
|
||||||
|
<float key="scoringTypeFloat">9</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="953743710">
|
||||||
|
<reference key="firstItem" ref="535016823"/>
|
||||||
|
<int key="firstAttribute">3</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="1005"/>
|
||||||
|
<int key="secondAttribute">3</int>
|
||||||
|
<float key="multiplier">1</float>
|
||||||
|
<object class="IBLayoutConstant" key="constant">
|
||||||
|
<double key="value">70</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="1005"/>
|
||||||
|
<int key="scoringType">3</int>
|
||||||
|
<float key="scoringTypeFloat">9</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="128304117">
|
||||||
|
<reference key="firstItem" ref="1005"/>
|
||||||
|
<int key="firstAttribute">4</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="535016823"/>
|
||||||
|
<int key="secondAttribute">4</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="1005"/>
|
||||||
|
<int key="scoringType">8</int>
|
||||||
|
<float key="scoringTypeFloat">29</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="627764884">
|
||||||
|
<reference key="firstItem" ref="1005"/>
|
||||||
|
<int key="firstAttribute">6</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="535016823"/>
|
||||||
|
<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="1005"/>
|
||||||
|
<int key="scoringType">8</int>
|
||||||
|
<float key="scoringTypeFloat">29</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="650676592">
|
||||||
|
<reference key="firstItem" ref="1013751338"/>
|
||||||
|
<int key="firstAttribute">3</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="1005"/>
|
||||||
|
<int key="secondAttribute">3</int>
|
||||||
|
<float key="multiplier">1</float>
|
||||||
|
<object class="IBLayoutConstant" key="constant">
|
||||||
|
<double key="value">17</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="1005"/>
|
||||||
|
<int key="scoringType">3</int>
|
||||||
|
<float key="scoringTypeFloat">9</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
</object>
|
||||||
|
<reference ref="1013751338"/>
|
||||||
|
<reference ref="787130496"/>
|
||||||
|
<reference ref="535016823"/>
|
||||||
|
</array>
|
||||||
<reference key="parent" ref="0"/>
|
<reference key="parent" ref="0"/>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">53</int>
|
||||||
|
<reference key="object" ref="535016823"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="745022448"/>
|
||||||
|
<reference ref="895719879"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="1005"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">54</int>
|
||||||
|
<reference key="object" ref="745022448"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="936537698"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="535016823"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">55</int>
|
||||||
|
<reference key="object" ref="895719879"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="430009688"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="535016823"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">56</int>
|
||||||
|
<reference key="object" ref="430009688"/>
|
||||||
|
<reference key="parent" ref="895719879"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">57</int>
|
||||||
|
<reference key="object" ref="936537698"/>
|
||||||
|
<reference key="parent" ref="745022448"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">62</int>
|
||||||
|
<reference key="object" ref="1013751338"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="81329947"/>
|
||||||
|
<object class="IBNSLayoutConstraint" id="12312109">
|
||||||
|
<reference key="firstItem" ref="1013751338"/>
|
||||||
|
<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">48</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="1013751338"/>
|
||||||
|
<int key="scoringType">3</int>
|
||||||
|
<float key="scoringTypeFloat">9</float>
|
||||||
|
<int key="contentType">1</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="158181239">
|
||||||
|
<reference key="firstItem" ref="1013751338"/>
|
||||||
|
<int key="firstAttribute">8</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">48</double>
|
||||||
|
</object>
|
||||||
|
<float key="priority">1000</float>
|
||||||
|
<reference key="containingView" ref="1013751338"/>
|
||||||
|
<int key="scoringType">3</int>
|
||||||
|
<float key="scoringTypeFloat">9</float>
|
||||||
|
<int key="contentType">1</int>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="1005"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">63</int>
|
||||||
|
<reference key="object" ref="81329947"/>
|
||||||
|
<reference key="parent" ref="1013751338"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">81</int>
|
||||||
|
<reference key="object" ref="627764884"/>
|
||||||
|
<reference key="parent" ref="1005"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">82</int>
|
||||||
|
<reference key="object" ref="128304117"/>
|
||||||
|
<reference key="parent" ref="1005"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">100</int>
|
||||||
|
<reference key="object" ref="787130496"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="790131230"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="1005"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">101</int>
|
||||||
|
<reference key="object" ref="790131230"/>
|
||||||
|
<reference key="parent" ref="787130496"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">102</int>
|
||||||
|
<reference key="object" ref="26781143"/>
|
||||||
|
<reference key="parent" ref="1005"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">103</int>
|
||||||
|
<reference key="object" ref="497278534"/>
|
||||||
|
<reference key="parent" ref="1005"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">104</int>
|
||||||
|
<reference key="object" ref="1047670962"/>
|
||||||
|
<reference key="parent" ref="1005"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">105</int>
|
||||||
|
<reference key="object" ref="7482984"/>
|
||||||
|
<reference key="parent" ref="1005"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">106</int>
|
||||||
|
<reference key="object" ref="650676592"/>
|
||||||
|
<reference key="parent" ref="1005"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">107</int>
|
||||||
|
<reference key="object" ref="953743710"/>
|
||||||
|
<reference key="parent" ref="1005"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">108</int>
|
||||||
|
<reference key="object" ref="1048211334"/>
|
||||||
|
<reference key="parent" ref="1005"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">109</int>
|
||||||
|
<reference key="object" ref="158181239"/>
|
||||||
|
<reference key="parent" ref="1013751338"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">110</int>
|
||||||
|
<reference key="object" ref="12312109"/>
|
||||||
|
<reference key="parent" ref="1013751338"/>
|
||||||
|
</object>
|
||||||
</array>
|
</array>
|
||||||
</object>
|
</object>
|
||||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<array class="NSMutableArray" key="1.IBNSViewMetadataConstraints">
|
||||||
|
<reference ref="650676592"/>
|
||||||
|
<reference ref="627764884"/>
|
||||||
|
<reference ref="128304117"/>
|
||||||
|
<reference ref="953743710"/>
|
||||||
|
<reference ref="1048211334"/>
|
||||||
|
<reference ref="26781143"/>
|
||||||
|
<reference ref="497278534"/>
|
||||||
|
<reference ref="1047670962"/>
|
||||||
|
<reference ref="7482984"/>
|
||||||
|
</array>
|
||||||
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<boolean value="NO" key="100.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||||
|
<string key="100.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="101.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="102.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="103.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="104.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="105.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="106.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="107.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="108.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="109.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="110.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<boolean value="NO" key="53.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||||
|
<string key="53.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="54.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="55.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<array class="NSMutableArray" key="62.IBNSViewMetadataConstraints">
|
||||||
|
<reference ref="158181239"/>
|
||||||
|
<reference ref="12312109"/>
|
||||||
|
</array>
|
||||||
|
<boolean value="NO" key="62.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||||
|
<string key="62.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="63.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="81.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="82.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||||
<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">20</int>
|
<int key="maxID">112</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">
|
||||||
<object class="IBPartialClassDescription">
|
<object class="IBPartialClassDescription">
|
||||||
<string key="className">MPInspectorTabViewController</string>
|
<string key="className">MPInspectorTabViewController</string>
|
||||||
<string key="superclassName">MPViewController</string>
|
<string key="superclassName">MPViewController</string>
|
||||||
|
<dictionary class="NSMutableDictionary" key="outlets">
|
||||||
|
<string key="itemImageView">NSImageView</string>
|
||||||
|
<string key="itemNameTextfield">NSTextField</string>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||||
|
<object class="IBToOneOutletInfo" key="itemImageView">
|
||||||
|
<string key="name">itemImageView</string>
|
||||||
|
<string key="candidateClassName">NSImageView</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo" key="itemNameTextfield">
|
||||||
|
<string key="name">itemNameTextfield</string>
|
||||||
|
<string key="candidateClassName">NSTextField</string>
|
||||||
|
</object>
|
||||||
|
</dictionary>
|
||||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
<string key="majorKey">IBProjectSource</string>
|
<string key="majorKey">IBProjectSource</string>
|
||||||
<string key="minorKey">./Classes/MPInspectorTabViewController.h</string>
|
<string key="minorKey">./Classes/MPInspectorTabViewController.h</string>
|
||||||
@@ -117,12 +616,24 @@
|
|||||||
<string key="minorKey">./Classes/MPViewController.h</string>
|
<string key="minorKey">./Classes/MPViewController.h</string>
|
||||||
</object>
|
</object>
|
||||||
</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>
|
</array>
|
||||||
</object>
|
</object>
|
||||||
<int key="IBDocument.localizationMode">0</int>
|
<int key="IBDocument.localizationMode">0</int>
|
||||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
||||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||||
|
<string key="NS.key.0">NSApplicationIcon</string>
|
||||||
|
<string key="NS.object.0">{128, 128}</string>
|
||||||
|
</object>
|
||||||
<bool key="IBDocument.UseAutolayout">YES</bool>
|
<bool key="IBDocument.UseAutolayout">YES</bool>
|
||||||
</data>
|
</data>
|
||||||
</archive>
|
</archive>
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
#import "MPDatabaseController.h"
|
#import "MPDatabaseController.h"
|
||||||
#import "MPDatabaseDocument.h"
|
#import "MPDatabaseDocument.h"
|
||||||
|
|
||||||
NSString *const MPDatabaseControllerDidLoadDatabaseNotification = @"MPDatabaseControllerDidLoadDatabaseNotification";
|
NSString *const MPDatabaseControllerDidLoadDatabaseNotification = @"com.macpass.MPDatabaseControllerDidLoadDatabaseNotification";
|
||||||
NSString *const MPDatabaseControllerDidCloseDatabaseNotification = @"MPDatabaseControllerDidCloseDatabaseNotification";
|
NSString *const MPDatabaseControllerDidCloseDatabaseNotification = @"com.macpass.MPDatabaseControllerDidCloseDatabaseNotification";
|
||||||
NSString *const MPDatabaseControllerDatabaseKey = @"MPDatabaseControllerDatabaseKey";
|
NSString *const MPDatabaseControllerDatabaseKey = @"com.macpass.MPDatabaseControllerDatabaseKey";
|
||||||
|
|
||||||
@interface MPDatabaseController ()
|
@interface MPDatabaseController ()
|
||||||
|
|
||||||
@@ -67,8 +67,8 @@ NSString *const MPDatabaseControllerDatabaseKey = @"MPDatabaseControllerDatabase
|
|||||||
userInfo:userInfo];
|
userInfo:userInfo];
|
||||||
}
|
}
|
||||||
[_database release];
|
[_database release];
|
||||||
if(database) {
|
|
||||||
_database = [database retain];
|
_database = [database retain];
|
||||||
|
if(database) {
|
||||||
NSDictionary *userInfo = @{ MPDatabaseControllerDatabaseKey: _database };
|
NSDictionary *userInfo = @{ MPDatabaseControllerDatabaseKey: _database };
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPDatabaseControllerDidLoadDatabaseNotification
|
[[NSNotificationCenter defaultCenter] postNotificationName:MPDatabaseControllerDidLoadDatabaseNotification
|
||||||
object:self
|
object:self
|
||||||
|
|||||||
@@ -23,14 +23,19 @@ typedef enum {
|
|||||||
} MPCopyContentTypeTag;
|
} MPCopyContentTypeTag;
|
||||||
|
|
||||||
@class KdbGroup;
|
@class KdbGroup;
|
||||||
|
@class KdbEntry;
|
||||||
@class MPOutlineViewDelegate;
|
@class MPOutlineViewDelegate;
|
||||||
|
|
||||||
@interface MPEntryViewController : MPViewController <NSTableViewDelegate>
|
@interface MPEntryViewController : MPViewController <NSTableViewDelegate>
|
||||||
|
|
||||||
|
|
||||||
@property (assign) KdbGroup *activeGroup;
|
@property (assign) KdbGroup *activeGroup;
|
||||||
|
@property (readonly, assign) KdbEntry *selectedEntry;
|
||||||
|
|
||||||
@property (readonly, retain) NSArrayController *entryArrayController;
|
@property (readonly, retain) NSArrayController *entryArrayController;
|
||||||
@property (nonatomic, retain) NSString *filter;
|
@property (nonatomic, retain) NSString *filter;
|
||||||
|
|
||||||
|
|
||||||
/* Clear the Search filter*/
|
/* Clear the Search filter*/
|
||||||
- (void)clearFilter;
|
- (void)clearFilter;
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
|
|||||||
@property (assign) IBOutlet NSButton *filterURLButton;
|
@property (assign) IBOutlet NSButton *filterURLButton;
|
||||||
@property (assign) IBOutlet NSTextField *filterLabelTextField;
|
@property (assign) IBOutlet NSTextField *filterLabelTextField;
|
||||||
|
|
||||||
|
@property (assign) KdbEntry *selectedEntry;
|
||||||
|
|
||||||
@property (assign, nonatomic) MPFilterModeType filterMode;
|
@property (assign, nonatomic) MPFilterModeType filterMode;
|
||||||
@property (retain, nonatomic) NSDictionary *filterButtonToMode;
|
@property (retain, nonatomic) NSDictionary *filterButtonToMode;
|
||||||
|
|
||||||
@@ -74,7 +76,9 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
|
|||||||
- (void)setupFilterBar;
|
- (void)setupFilterBar;
|
||||||
- (void)setupPathBar;
|
- (void)setupPathBar;
|
||||||
- (void)_setupEntryMenu;
|
- (void)_setupEntryMenu;
|
||||||
|
/* Notification handling */
|
||||||
- (void)_didChangeGroupSelectionInOutlineView:(NSNotification *)notification;
|
- (void)_didChangeGroupSelectionInOutlineView:(NSNotification *)notification;
|
||||||
|
- (void)_didChangeEntrySelection:(NSNotification *)notification;
|
||||||
- (void)_showFilterBarAnimated:(BOOL)animate;
|
- (void)_showFilterBarAnimated:(BOOL)animate;
|
||||||
- (void)_hideStatusBarAnimated:(BOOL)animate;
|
- (void)_hideStatusBarAnimated:(BOOL)animate;
|
||||||
|
|
||||||
@@ -100,10 +104,12 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
|
|||||||
_toggleFilterURLButton : @(MPFilterUrls)
|
_toggleFilterURLButton : @(MPFilterUrls)
|
||||||
} retain];
|
} retain];
|
||||||
_entryArrayController = [[NSArrayController alloc] init];
|
_entryArrayController = [[NSArrayController alloc] init];
|
||||||
|
_selectedEntry = nil;
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
selector:@selector(_didChangeGroupSelectionInOutlineView:)
|
selector:@selector(_didChangeGroupSelectionInOutlineView:)
|
||||||
name:MPOutlineViewDidChangeGroupSelection
|
name:MPOutlineViewDidChangeGroupSelection
|
||||||
object:nil];
|
object:nil];
|
||||||
|
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@@ -145,7 +151,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
|
|||||||
[[urlColumn headerCell] setStringValue:@"URL"];
|
[[urlColumn headerCell] setStringValue:@"URL"];
|
||||||
|
|
||||||
[self.entryTable bind:NSContentBinding toObject:self.entryArrayController withKeyPath:@"arrangedObjects" options:nil];
|
[self.entryTable bind:NSContentBinding toObject:self.entryArrayController withKeyPath:@"arrangedObjects" options:nil];
|
||||||
|
[self.selectedEntry bind:NSValueBinding toObject:self.entryArrayController withKeyPath:NSSelectedObjectBinding options:nil];
|
||||||
[parentColumn setHidden:YES];
|
[parentColumn setHidden:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,6 +210,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#pragma mark Filtering
|
#pragma mark Filtering
|
||||||
|
|
||||||
- (BOOL)hasFilter {
|
- (BOOL)hasFilter {
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
|
|
||||||
@interface MPInspectorTabViewController ()
|
@interface MPInspectorTabViewController ()
|
||||||
|
|
||||||
|
@property (assign) IBOutlet NSImageView *itemImageView;
|
||||||
|
@property (assign) IBOutlet NSTextField *itemNameTextfield;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation MPInspectorTabViewController
|
@implementation MPInspectorTabViewController
|
||||||
|
|||||||
@@ -9,9 +9,19 @@
|
|||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
@class MPViewController;
|
@class MPViewController;
|
||||||
|
@class MPEntryViewController;
|
||||||
|
@class MPInspectorTabViewController;
|
||||||
|
@class MPPasswordInputController;
|
||||||
|
@class MPOutlineViewController;
|
||||||
|
|
||||||
@interface MPMainWindowController : NSWindowController
|
@interface MPMainWindowController : NSWindowController
|
||||||
|
|
||||||
|
@property (readonly, retain) MPPasswordInputController *passwordInputController;
|
||||||
|
@property (readonly, retain) MPEntryViewController *entryViewController;
|
||||||
|
@property (readonly, retain) MPOutlineViewController *outlineViewController;
|
||||||
|
@property (readonly, retain) MPInspectorTabViewController *inspectorTabViewController;
|
||||||
|
|
||||||
|
|
||||||
- (void)showEntries;
|
- (void)showEntries;
|
||||||
- (void)showMainWindow:(id)sender;
|
- (void)showMainWindow:(id)sender;
|
||||||
- (void)performFindPanelAction:(id)sender;
|
- (void)performFindPanelAction:(id)sender;
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ static CGFloat _inspectorSplitterPosition;
|
|||||||
/* View show/hide */
|
/* View show/hide */
|
||||||
- (void)_collapseOutlineView;
|
- (void)_collapseOutlineView;
|
||||||
- (void)_expandOutlineView;
|
- (void)_expandOutlineView;
|
||||||
- (void)_toggleInspector;
|
|
||||||
|
|
||||||
- (void)_setContentViewController:(MPViewController *)viewController;
|
- (void)_setContentViewController:(MPViewController *)viewController;
|
||||||
- (void)_updateWindowTitle;
|
- (void)_updateWindowTitle;
|
||||||
@@ -193,13 +192,13 @@ static CGFloat _inspectorSplitterPosition;
|
|||||||
const BOOL collapsed = [self.splitView isSubviewCollapsed:inspectorView];
|
const BOOL collapsed = [self.splitView isSubviewCollapsed:inspectorView];
|
||||||
if(collapsed) {
|
if(collapsed) {
|
||||||
CGFloat splitterPosition = MAX(MPMainWindowSplitViewDelegateMinimumInspectorWidth, _inspectorSplitterPosition);
|
CGFloat splitterPosition = MAX(MPMainWindowSplitViewDelegateMinimumInspectorWidth, _inspectorSplitterPosition);
|
||||||
[self.splitView setPosition:splitterPosition ofDividerAtIndex:1];
|
[self.splitView setPosition:splitterPosition ofDividerAtIndex:MPSplitViewInspectorDividerIndex];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_inspectorSplitterPosition = [inspectorView frame].origin.x;
|
_inspectorSplitterPosition = [inspectorView frame].origin.x;
|
||||||
CGFloat splitterPosition = [inspectorView frame].origin.x * [inspectorView frame].size.width;
|
CGFloat splitterPosition = [inspectorView frame].origin.x * [inspectorView frame].size.width;
|
||||||
[[NSAnimationContext currentContext] setDuration:2];
|
[[NSAnimationContext currentContext] setDuration:2];
|
||||||
[[self.splitView animator] setPosition:splitterPosition ofDividerAtIndex:1];
|
[[self.splitView animator] setPosition:splitterPosition ofDividerAtIndex:MPSplitViewInspectorDividerIndex];
|
||||||
}
|
}
|
||||||
[inspectorView setHidden:!collapsed];
|
[inspectorView setHidden:!collapsed];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,11 @@ typedef enum {
|
|||||||
MPSplitViewInspectorViewIndex,
|
MPSplitViewInspectorViewIndex,
|
||||||
} MPSplitViewSubViewIndex;
|
} MPSplitViewSubViewIndex;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
MPSplitViewOutlineDividerIndex,
|
||||||
|
MPSplitViewInspectorDividerIndex,
|
||||||
|
} MPSplitViewDividerIndex;
|
||||||
|
|
||||||
@interface MPMainWindowSplitViewDelegate : NSObject <NSSplitViewDelegate>
|
@interface MPMainWindowSplitViewDelegate : NSObject <NSSplitViewDelegate>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ const CGFloat MPMainWindowSplitViewDelegateMinimumContentWidth = 400.0;
|
|||||||
const CGFloat MPMainWindowSplitViewDelegateMinimumInspectorWidth = 200.0;
|
const CGFloat MPMainWindowSplitViewDelegateMinimumInspectorWidth = 200.0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@interface MPMainWindowSplitViewDelegate ()
|
@interface MPMainWindowSplitViewDelegate ()
|
||||||
|
|
||||||
- (NSView *)_subViewOfType:(MPSplitViewSubViewIndex)subViewType splitView:(NSSplitView *)splitView;
|
- (NSView *)_subViewOfType:(MPSplitViewSubViewIndex)subViewType splitView:(NSSplitView *)splitView;
|
||||||
@@ -32,13 +31,17 @@ const CGFloat MPMainWindowSplitViewDelegateMinimumInspectorWidth = 200.0;
|
|||||||
|
|
||||||
- (CGFloat)splitView:(NSSplitView *)splitView constrainMinCoordinate:(CGFloat)proposedMinimumPosition ofSubviewAt:(NSInteger)dividerIndex {
|
- (CGFloat)splitView:(NSSplitView *)splitView constrainMinCoordinate:(CGFloat)proposedMinimumPosition ofSubviewAt:(NSInteger)dividerIndex {
|
||||||
return proposedMinimumPosition;
|
return proposedMinimumPosition;
|
||||||
//return (proposedMinimumPosition < MPMainWindowSplitViewDelegateMinimumOutlineWidth) ? MPMainWindowSplitViewDelegateMinimumOutlineWidth : proposedMinimumPosition;
|
|
||||||
|
// Update to take inspector into account
|
||||||
|
return (proposedMinimumPosition < MPMainWindowSplitViewDelegateMinimumOutlineWidth) ? MPMainWindowSplitViewDelegateMinimumOutlineWidth : proposedMinimumPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (CGFloat)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(CGFloat)proposedMaximumPosition ofSubviewAt:(NSInteger)dividerIndex {
|
- (CGFloat)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(CGFloat)proposedMaximumPosition ofSubviewAt:(NSInteger)dividerIndex {
|
||||||
return proposedMaximumPosition;
|
return proposedMaximumPosition;
|
||||||
// CGFloat availableWidth = [splitView frame].size.width - [splitView dividerThickness];
|
|
||||||
// return (availableWidth - MPMainWindowSplitViewDelegateMinimumOutlineWidth);
|
// Update to take inpspector into account
|
||||||
|
CGFloat availableWidth = [splitView frame].size.width - [splitView dividerThickness];
|
||||||
|
return (availableWidth - MPMainWindowSplitViewDelegateMinimumOutlineWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)splitView:(NSSplitView *)splitView resizeSubviewsWithOldSize:(NSSize)oldSize {
|
- (void)splitView:(NSSplitView *)splitView resizeSubviewsWithOldSize:(NSSize)oldSize {
|
||||||
@@ -51,8 +54,18 @@ const CGFloat MPMainWindowSplitViewDelegateMinimumInspectorWidth = 200.0;
|
|||||||
|
|
||||||
CGFloat outlineWidth = [outlineView isHidden] ? 0.0 : [outlineView frame].size.width;
|
CGFloat outlineWidth = [outlineView isHidden] ? 0.0 : [outlineView frame].size.width;
|
||||||
CGFloat inspectorWidth = [inspectorView isHidden] ? 0.0 : [inspectorView frame].size.width;
|
CGFloat inspectorWidth = [inspectorView isHidden] ? 0.0 : [inspectorView frame].size.width;
|
||||||
CGFloat contentWidth = newSize.width - outlineWidth - inspectorWidth - 2 * dividierThickness;
|
|
||||||
NSRect newContentFrame = NSMakeRect(outlineWidth + dividierThickness, 0, contentWidth, newSize.height);
|
CGFloat dividerThicknessCorrection = 0;
|
||||||
|
if(outlineWidth > 0.0) {
|
||||||
|
dividerThicknessCorrection += dividierThickness;
|
||||||
|
}
|
||||||
|
if(inspectorWidth > 0.0 ) {
|
||||||
|
dividerThicknessCorrection += dividierThickness;
|
||||||
|
}
|
||||||
|
|
||||||
|
CGFloat contentWidth = newSize.width - outlineWidth - inspectorWidth - dividerThicknessCorrection;
|
||||||
|
CGFloat contentOriginX = [outlineView isHidden] ? outlineWidth : outlineWidth + dividierThickness;
|
||||||
|
NSRect newContentFrame = NSMakeRect(contentOriginX, 0, contentWidth, newSize.height);
|
||||||
NSRect newOutlineFrame = NSMakeRect(0, 0, outlineWidth, newSize.height);
|
NSRect newOutlineFrame = NSMakeRect(0, 0, outlineWidth, newSize.height);
|
||||||
NSRect newInpectorFrame = NSMakeRect(newContentFrame.origin.x + contentWidth + dividierThickness, 0, inspectorWidth, newSize.height);
|
NSRect newInpectorFrame = NSMakeRect(newContentFrame.origin.x + contentWidth + dividierThickness, 0, inspectorWidth, newSize.height);
|
||||||
|
|
||||||
@@ -65,4 +78,28 @@ const CGFloat MPMainWindowSplitViewDelegateMinimumInspectorWidth = 200.0;
|
|||||||
[contentView setFrame:newContentFrame];
|
[contentView setFrame:newContentFrame];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
- (BOOL)splitView:(NSSplitView *)splitView shouldHideDividerAtIndex:(NSInteger)dividerIndex {
|
||||||
|
NSView *outlineView = [self _subViewOfType:MPSplitViewOutlineViewIndex splitView:splitView];
|
||||||
|
NSView *inspectorView = [self _subViewOfType:MPSplitViewInspectorViewIndex splitView:splitView];
|
||||||
|
|
||||||
|
BOOL shouldHide = NO;
|
||||||
|
switch (dividerIndex) {
|
||||||
|
case MPSplitViewInspectorDividerIndex:
|
||||||
|
shouldHide = [inspectorView isHidden];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MPSplitViewOutlineDividerIndex:
|
||||||
|
shouldHide = [outlineView isHidden];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: {
|
||||||
|
NSException *exception = [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Divider Index out of range!" userInfo:nil];
|
||||||
|
@throw exception;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
NSArray *splitterNames = @[ @"Outline", @"Inspector" ];
|
||||||
|
NSLog(@"Should Hide %@: %@", splitterNames[dividerIndex], shouldHide ? @"Yes" : @"No" );
|
||||||
|
return shouldHide;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#import "MPIconHelper.h"
|
#import "MPIconHelper.h"
|
||||||
#import "KdbLib.h"
|
#import "KdbLib.h"
|
||||||
|
|
||||||
NSString *const MPOutlineViewDidChangeGroupSelection = @"MPOutlineViewDidChangeGroupSelection";
|
NSString *const MPOutlineViewDidChangeGroupSelection = @"com.macpass.MPOutlineViewDidChangeGroupSelection";
|
||||||
|
|
||||||
NSString *const _MPOutlineViewDataViewIdentifier = @"DataCell";
|
NSString *const _MPOutlineViewDataViewIdentifier = @"DataCell";
|
||||||
NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>401</string>
|
<string>41B</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user