mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-15 03:33:52 +00:00
Removed edit button from interface as it's not fully supported.
Refactored editing button actions to be localisations safe Added a candle editing button to cancel the edit process
This commit is contained in:
@@ -125,10 +125,35 @@
|
|||||||
<reference key="NSNextResponder" ref="233312071"/>
|
<reference key="NSNextResponder" ref="233312071"/>
|
||||||
<int key="NSvFlags">268</int>
|
<int key="NSvFlags">268</int>
|
||||||
<array class="NSMutableArray" key="NSSubviews">
|
<array class="NSMutableArray" key="NSSubviews">
|
||||||
|
<object class="NSButton" id="14058299">
|
||||||
|
<reference key="NSNextResponder" ref="381395509"/>
|
||||||
|
<int key="NSvFlags">-2147483380</int>
|
||||||
|
<string key="NSFrame">{{134, 2}, {56, 25}}</string>
|
||||||
|
<reference key="NSSuperview" ref="381395509"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="830540359"/>
|
||||||
|
<string key="NSReuseIdentifierKey">_NS:22</string>
|
||||||
|
<bool key="NSEnabled">YES</bool>
|
||||||
|
<object class="NSButtonCell" key="NSCell" id="630111780">
|
||||||
|
<int key="NSCellFlags">-2080374784</int>
|
||||||
|
<int key="NSCellFlags2">134217728</int>
|
||||||
|
<string key="NSContents">Cancel</string>
|
||||||
|
<reference key="NSSupport" ref="240853158"/>
|
||||||
|
<string key="NSCellIdentifier">_NS:22</string>
|
||||||
|
<reference key="NSControlView" ref="14058299"/>
|
||||||
|
<int key="NSButtonFlags">-2038153216</int>
|
||||||
|
<int key="NSButtonFlags2">163</int>
|
||||||
|
<string key="NSAlternateContents"/>
|
||||||
|
<string key="NSKeyEquivalent"/>
|
||||||
|
<int key="NSPeriodicDelay">400</int>
|
||||||
|
<int key="NSPeriodicInterval">75</int>
|
||||||
|
</object>
|
||||||
|
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||||
|
</object>
|
||||||
<object class="NSButton" id="830540359">
|
<object class="NSButton" id="830540359">
|
||||||
<reference key="NSNextResponder" ref="381395509"/>
|
<reference key="NSNextResponder" ref="381395509"/>
|
||||||
<int key="NSvFlags">-2147483380</int>
|
<int key="NSvFlags">-2147483380</int>
|
||||||
<string key="NSFrame">{{197, 2}, {60, 25}}</string>
|
<string key="NSFrame">{{198, 2}, {60, 25}}</string>
|
||||||
<reference key="NSSuperview" ref="381395509"/>
|
<reference key="NSSuperview" ref="381395509"/>
|
||||||
<reference key="NSWindow"/>
|
<reference key="NSWindow"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:22</string>
|
<string key="NSReuseIdentifierKey">_NS:22</string>
|
||||||
@@ -157,7 +182,7 @@
|
|||||||
<string key="NSFrameSize">{278, 30}</string>
|
<string key="NSFrameSize">{278, 30}</string>
|
||||||
<reference key="NSSuperview" ref="233312071"/>
|
<reference key="NSSuperview" ref="233312071"/>
|
||||||
<reference key="NSWindow"/>
|
<reference key="NSWindow"/>
|
||||||
<reference key="NSNextKeyView" ref="830540359"/>
|
<reference key="NSNextKeyView" ref="14058299"/>
|
||||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||||
<string key="NSClassName">HNHGradientView</string>
|
<string key="NSClassName">HNHGradientView</string>
|
||||||
</object>
|
</object>
|
||||||
@@ -167,6 +192,7 @@
|
|||||||
<string key="NSFrame">{{0, 30}, {278, 369}}</string>
|
<string key="NSFrame">{{0, 30}, {278, 369}}</string>
|
||||||
<reference key="NSSuperview" ref="233312071"/>
|
<reference key="NSSuperview" ref="233312071"/>
|
||||||
<reference key="NSWindow"/>
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="906788312"/>
|
||||||
<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="367063082">
|
<object class="NSTabViewItem" id="367063082">
|
||||||
@@ -177,7 +203,6 @@
|
|||||||
<string key="NSFrameSize">{278, 369}</string>
|
<string key="NSFrameSize">{278, 369}</string>
|
||||||
<reference key="NSSuperview" ref="45251842"/>
|
<reference key="NSSuperview" ref="45251842"/>
|
||||||
<reference key="NSWindow"/>
|
<reference key="NSWindow"/>
|
||||||
<reference key="NSNextKeyView" ref="381395509"/>
|
|
||||||
<string key="NSReuseIdentifierKey">_NS:28</string>
|
<string key="NSReuseIdentifierKey">_NS:28</string>
|
||||||
</object>
|
</object>
|
||||||
<string key="NSLabel">Entry</string>
|
<string key="NSLabel">Entry</string>
|
||||||
@@ -329,12 +354,28 @@
|
|||||||
<int key="connectionID">3122</int>
|
<int key="connectionID">3122</int>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBConnectionRecord">
|
<object class="IBConnectionRecord">
|
||||||
<object class="IBActionConnection" key="connection">
|
<object class="IBOutletConnection" key="connection">
|
||||||
<string key="label">handleEditButtonClickEvent:</string>
|
<string key="label">cancelEditButton</string>
|
||||||
<reference key="source" ref="1001"/>
|
<reference key="source" ref="1001"/>
|
||||||
<reference key="destination" ref="348505851"/>
|
<reference key="destination" ref="14058299"/>
|
||||||
</object>
|
</object>
|
||||||
<int key="connectionID">3125</int>
|
<int key="connectionID">3141</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBActionConnection" key="connection">
|
||||||
|
<string key="label">toggleEdit:</string>
|
||||||
|
<reference key="source" ref="1001"/>
|
||||||
|
<reference key="destination" ref="830540359"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">3143</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBActionConnection" key="connection">
|
||||||
|
<string key="label">toggleEdit:</string>
|
||||||
|
<reference key="source" ref="1001"/>
|
||||||
|
<reference key="destination" ref="14058299"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">3144</int>
|
||||||
</object>
|
</object>
|
||||||
</array>
|
</array>
|
||||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
@@ -629,20 +670,20 @@
|
|||||||
<int key="objectID">2930</int>
|
<int key="objectID">2930</int>
|
||||||
<reference key="object" ref="381395509"/>
|
<reference key="object" ref="381395509"/>
|
||||||
<array class="NSMutableArray" key="children">
|
<array class="NSMutableArray" key="children">
|
||||||
<object class="IBNSLayoutConstraint" id="359501674">
|
<object class="IBNSLayoutConstraint" id="723838339">
|
||||||
<reference key="firstItem" ref="381395509"/>
|
<reference key="firstItem" ref="830540359"/>
|
||||||
<int key="firstAttribute">6</int>
|
<int key="firstAttribute">5</int>
|
||||||
<int key="relation">0</int>
|
<int key="relation">0</int>
|
||||||
<reference key="secondItem" ref="830540359"/>
|
<reference key="secondItem" ref="14058299"/>
|
||||||
<int key="secondAttribute">6</int>
|
<int key="secondAttribute">6</int>
|
||||||
<float key="multiplier">1</float>
|
<float key="multiplier">1</float>
|
||||||
<object class="IBLayoutConstant" key="constant">
|
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
||||||
<double key="value">21</double>
|
<double key="value">8</double>
|
||||||
</object>
|
</object>
|
||||||
<float key="priority">1000</float>
|
<float key="priority">1000</float>
|
||||||
<reference key="containingView" ref="381395509"/>
|
<reference key="containingView" ref="381395509"/>
|
||||||
<int key="scoringType">3</int>
|
<int key="scoringType">6</int>
|
||||||
<float key="scoringTypeFloat">9</float>
|
<float key="scoringTypeFloat">24</float>
|
||||||
<int key="contentType">3</int>
|
<int key="contentType">3</int>
|
||||||
<bool key="placeholder">NO</bool>
|
<bool key="placeholder">NO</bool>
|
||||||
</object>
|
</object>
|
||||||
@@ -663,6 +704,40 @@
|
|||||||
<int key="contentType">2</int>
|
<int key="contentType">2</int>
|
||||||
<bool key="placeholder">NO</bool>
|
<bool key="placeholder">NO</bool>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="788827181">
|
||||||
|
<reference key="firstItem" ref="381395509"/>
|
||||||
|
<int key="firstAttribute">6</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="830540359"/>
|
||||||
|
<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="381395509"/>
|
||||||
|
<int key="scoringType">8</int>
|
||||||
|
<float key="scoringTypeFloat">23</float>
|
||||||
|
<int key="contentType">3</int>
|
||||||
|
<bool key="placeholder">NO</bool>
|
||||||
|
</object>
|
||||||
|
<object class="IBNSLayoutConstraint" id="681303158">
|
||||||
|
<reference key="firstItem" ref="14058299"/>
|
||||||
|
<int key="firstAttribute">11</int>
|
||||||
|
<int key="relation">0</int>
|
||||||
|
<reference key="secondItem" ref="830540359"/>
|
||||||
|
<int key="secondAttribute">11</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="381395509"/>
|
||||||
|
<int key="scoringType">6</int>
|
||||||
|
<float key="scoringTypeFloat">24</float>
|
||||||
|
<int key="contentType">2</int>
|
||||||
|
<bool key="placeholder">NO</bool>
|
||||||
|
</object>
|
||||||
<object class="IBNSLayoutConstraint" id="574545128">
|
<object class="IBNSLayoutConstraint" id="574545128">
|
||||||
<reference key="firstItem" ref="381395509"/>
|
<reference key="firstItem" ref="381395509"/>
|
||||||
<int key="firstAttribute">8</int>
|
<int key="firstAttribute">8</int>
|
||||||
@@ -681,6 +756,7 @@
|
|||||||
<bool key="placeholder">NO</bool>
|
<bool key="placeholder">NO</bool>
|
||||||
</object>
|
</object>
|
||||||
<reference ref="830540359"/>
|
<reference ref="830540359"/>
|
||||||
|
<reference ref="14058299"/>
|
||||||
</array>
|
</array>
|
||||||
<reference key="parent" ref="233312071"/>
|
<reference key="parent" ref="233312071"/>
|
||||||
</object>
|
</object>
|
||||||
@@ -896,13 +972,36 @@
|
|||||||
<reference key="parent" ref="830540359"/>
|
<reference key="parent" ref="830540359"/>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBObjectRecord">
|
<object class="IBObjectRecord">
|
||||||
<int key="objectID">3112</int>
|
<int key="objectID">3126</int>
|
||||||
|
<reference key="object" ref="14058299"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="630111780"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="381395509"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">3127</int>
|
||||||
|
<reference key="object" ref="630111780"/>
|
||||||
|
<reference key="parent" ref="14058299"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">3129</int>
|
||||||
|
<reference key="object" ref="681303158"/>
|
||||||
|
<reference key="parent" ref="381395509"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">3138</int>
|
||||||
|
<reference key="object" ref="788827181"/>
|
||||||
|
<reference key="parent" ref="381395509"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">3139</int>
|
||||||
<reference key="object" ref="696932551"/>
|
<reference key="object" ref="696932551"/>
|
||||||
<reference key="parent" ref="381395509"/>
|
<reference key="parent" ref="381395509"/>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBObjectRecord">
|
<object class="IBObjectRecord">
|
||||||
<int key="objectID">3123</int>
|
<int key="objectID">3140</int>
|
||||||
<reference key="object" ref="359501674"/>
|
<reference key="object" ref="723838339"/>
|
||||||
<reference key="parent" ref="381395509"/>
|
<reference key="parent" ref="381395509"/>
|
||||||
</object>
|
</object>
|
||||||
</array>
|
</array>
|
||||||
@@ -946,8 +1045,10 @@
|
|||||||
<string key="2929.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="2929.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<array class="NSMutableArray" key="2930.IBNSViewMetadataConstraints">
|
<array class="NSMutableArray" key="2930.IBNSViewMetadataConstraints">
|
||||||
<reference ref="574545128"/>
|
<reference ref="574545128"/>
|
||||||
|
<reference ref="681303158"/>
|
||||||
|
<reference ref="788827181"/>
|
||||||
<reference ref="696932551"/>
|
<reference ref="696932551"/>
|
||||||
<reference ref="359501674"/>
|
<reference ref="723838339"/>
|
||||||
</array>
|
</array>
|
||||||
<boolean value="NO" key="2930.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
<boolean value="NO" key="2930.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||||
<string key="2930.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="2930.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
@@ -989,14 +1090,19 @@
|
|||||||
<boolean value="NO" key="3109.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
<boolean value="NO" key="3109.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||||
<string key="3109.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="3109.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="3110.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="3110.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string key="3112.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<boolean value="NO" key="3126.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||||
<string key="3123.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string key="3126.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="3127.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="3129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="3138.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="3139.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string key="3140.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">3125</int>
|
<int key="maxID">3144</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">
|
||||||
@@ -1012,21 +1118,22 @@
|
|||||||
<string key="className">MPInspectorViewController</string>
|
<string key="className">MPInspectorViewController</string>
|
||||||
<string key="superclassName">MPViewController</string>
|
<string key="superclassName">MPViewController</string>
|
||||||
<dictionary class="NSMutableDictionary" key="actions">
|
<dictionary class="NSMutableDictionary" key="actions">
|
||||||
<string key="handleEditButtonClickEvent:">id</string>
|
|
||||||
<string key="showImagePopup:">id</string>
|
<string key="showImagePopup:">id</string>
|
||||||
|
<string key="toggleEdit:">id</string>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||||
<object class="IBActionInfo" key="handleEditButtonClickEvent:">
|
|
||||||
<string key="name">handleEditButtonClickEvent:</string>
|
|
||||||
<string key="candidateClassName">id</string>
|
|
||||||
</object>
|
|
||||||
<object class="IBActionInfo" key="showImagePopup:">
|
<object class="IBActionInfo" key="showImagePopup:">
|
||||||
<string key="name">showImagePopup:</string>
|
<string key="name">showImagePopup:</string>
|
||||||
<string key="candidateClassName">id</string>
|
<string key="candidateClassName">id</string>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBActionInfo" key="toggleEdit:">
|
||||||
|
<string key="name">toggleEdit:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary class="NSMutableDictionary" key="outlets">
|
<dictionary class="NSMutableDictionary" key="outlets">
|
||||||
<string key="bottomBar">HNHGradientView</string>
|
<string key="bottomBar">HNHGradientView</string>
|
||||||
|
<string key="cancelEditButton">NSButton</string>
|
||||||
<string key="createdTextField">NSTextField</string>
|
<string key="createdTextField">NSTextField</string>
|
||||||
<string key="editButton">NSButton</string>
|
<string key="editButton">NSButton</string>
|
||||||
<string key="itemImageView">MPPopupImageView</string>
|
<string key="itemImageView">MPPopupImageView</string>
|
||||||
@@ -1040,6 +1147,10 @@
|
|||||||
<string key="name">bottomBar</string>
|
<string key="name">bottomBar</string>
|
||||||
<string key="candidateClassName">HNHGradientView</string>
|
<string key="candidateClassName">HNHGradientView</string>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo" key="cancelEditButton">
|
||||||
|
<string key="name">cancelEditButton</string>
|
||||||
|
<string key="candidateClassName">NSButton</string>
|
||||||
|
</object>
|
||||||
<object class="IBToOneOutletInfo" key="createdTextField">
|
<object class="IBToOneOutletInfo" key="createdTextField">
|
||||||
<string key="name">createdTextField</string>
|
<string key="name">createdTextField</string>
|
||||||
<string key="candidateClassName">NSTextField</string>
|
<string key="candidateClassName">NSTextField</string>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment version="1070" defaultVersion="1080" identifier="macosx"/>
|
<deployment version="1070" defaultVersion="1080" identifier="macosx"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/>
|
||||||
@@ -595,7 +595,7 @@
|
|||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="59">
|
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="59">
|
||||||
<rect key="frame" x="20" y="448" width="212" height="19"/>
|
<rect key="frame" x="20" y="446" width="212" height="19"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<buttonCell key="cell" type="roundRect" title="Generate" bezelStyle="roundedRect" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="64">
|
<buttonCell key="cell" type="roundRect" title="Generate" bezelStyle="roundedRect" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="64">
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
@@ -607,7 +607,7 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<secureTextField verticalHuggingPriority="750" horizontalCompressionResistancePriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="60" customClass="HNHRoundedSecureTextField">
|
<secureTextField verticalHuggingPriority="750" horizontalCompressionResistancePriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="60" customClass="HNHRoundedSecureTextField">
|
||||||
<rect key="frame" x="20" y="475" width="173" height="22"/>
|
<rect key="frame" x="20" y="473" width="173" height="24"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="63">
|
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="63">
|
||||||
<font key="font" size="13" name="Menlo-Regular"/>
|
<font key="font" size="13" name="Menlo-Regular"/>
|
||||||
@@ -622,7 +622,7 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</secureTextField>
|
</secureTextField>
|
||||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="61">
|
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="61">
|
||||||
<rect key="frame" x="201" y="473" width="31" height="25"/>
|
<rect key="frame" x="201" y="471" width="31" height="25"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="NSQuickLookTemplate" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="62">
|
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="NSQuickLookTemplate" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="62">
|
||||||
<behavior key="behavior" pushIn="YES" changeContents="YES" lightByContents="YES"/>
|
<behavior key="behavior" pushIn="YES" changeContents="YES" lightByContents="YES"/>
|
||||||
@@ -633,20 +633,20 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9">
|
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9">
|
||||||
<rect key="frame" x="20" y="155" width="212" height="260"/>
|
<rect key="frame" x="20" y="155" width="212" height="258"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<clipView key="contentView" id="Qp6-9n-hxB">
|
<clipView key="contentView" id="Qp6-9n-hxB">
|
||||||
<rect key="frame" x="1" y="1" width="210" height="258"/>
|
<rect key="frame" x="1" y="1" width="210" height="256"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<textView importsGraphics="NO" richText="NO" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" verticallyResizable="YES" allowsNonContiguousLayout="YES" spellingCorrection="YES" smartInsertDelete="YES" id="73">
|
<textView importsGraphics="NO" richText="NO" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" verticallyResizable="YES" allowsNonContiguousLayout="YES" spellingCorrection="YES" smartInsertDelete="YES" id="73">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="210" height="258"/>
|
<rect key="frame" x="0.0" y="0.0" width="210" height="256"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
<size key="minSize" width="210" height="258"/>
|
<size key="minSize" width="210" height="256"/>
|
||||||
<size key="maxSize" width="463" height="10000000"/>
|
<size key="maxSize" width="463" height="10000000"/>
|
||||||
<color key="insertionPointColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="insertionPointColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
<size key="minSize" width="210" height="258"/>
|
<size key="minSize" width="210" height="256"/>
|
||||||
<size key="maxSize" width="463" height="10000000"/>
|
<size key="maxSize" width="463" height="10000000"/>
|
||||||
</textView>
|
</textView>
|
||||||
</subviews>
|
</subviews>
|
||||||
@@ -660,7 +660,7 @@
|
|||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</scroller>
|
</scroller>
|
||||||
<scroller key="verticalScroller" verticalHuggingPriority="750" horizontal="NO" id="75">
|
<scroller key="verticalScroller" verticalHuggingPriority="750" horizontal="NO" id="75">
|
||||||
<rect key="frame" x="195" y="1" width="16" height="258"/>
|
<rect key="frame" x="195" y="1" width="16" height="256"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</scroller>
|
</scroller>
|
||||||
<connections>
|
<connections>
|
||||||
@@ -668,7 +668,7 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</scrollView>
|
</scrollView>
|
||||||
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="10">
|
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="10">
|
||||||
<rect key="frame" x="18" y="423" width="35" height="14"/>
|
<rect key="frame" x="18" y="421" width="35" height="14"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Notes" id="72">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Notes" id="72">
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
|
|||||||
@@ -357,8 +357,6 @@ typedef NS_ENUM(NSUInteger, MPAlertContext) {
|
|||||||
[_entryViewController updateResponderChain];
|
[_entryViewController updateResponderChain];
|
||||||
[_inspectorViewController updateResponderChain];
|
[_inspectorViewController updateResponderChain];
|
||||||
[_outlineViewController updateResponderChain];
|
[_outlineViewController updateResponderChain];
|
||||||
/* Custom setup after being added to window */
|
|
||||||
[_inspectorViewController prepareView];
|
|
||||||
[_outlineViewController showOutline];
|
[_outlineViewController showOutline];
|
||||||
|
|
||||||
/* Restore the State the inspector view was in before the view change */
|
/* Restore the State the inspector view was in before the view change */
|
||||||
|
|||||||
@@ -184,39 +184,15 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
|
|||||||
[self.entry removeBinary:binary];
|
[self.entry removeBinary:binary];
|
||||||
}
|
}
|
||||||
|
|
||||||
// CS: could there be a better way?
|
#pragma mark Editing
|
||||||
- (void)beginEditing
|
- (void)beginEditing {
|
||||||
{
|
[self _toggleEditing:YES];
|
||||||
NSLog(@"beganEditing:");
|
|
||||||
|
|
||||||
_titleTextField.editable = YES;
|
|
||||||
_usernameTextField.editable = YES;
|
|
||||||
_URLTextField.editable = YES;
|
|
||||||
_passwordTextField.editable = YES;
|
|
||||||
|
|
||||||
_createdTextField.editable = YES;
|
|
||||||
_modifiedTextField.editable = YES;
|
|
||||||
|
|
||||||
_notesTextView.editable = YES;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
- (void)endEditing {
|
||||||
// CS: could there be a better way?
|
[self _toggleEditing:NO];
|
||||||
- (void)endEditing
|
|
||||||
{
|
|
||||||
NSLog(@"endEditing");
|
|
||||||
_titleTextField.editable = NO;
|
|
||||||
_usernameTextField.editable = NO;
|
|
||||||
_URLTextField.editable = NO;
|
|
||||||
_passwordTextField.editable = NO;
|
|
||||||
|
|
||||||
_createdTextField.editable = NO;
|
|
||||||
_modifiedTextField.editable = NO;
|
|
||||||
|
|
||||||
_notesTextView.editable = NO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
#pragma mark Popovers
|
#pragma mark Popovers
|
||||||
|
|
||||||
@@ -309,4 +285,25 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)_toggleEditing:(BOOL)edit {
|
||||||
|
/* TODO: not fully working right now */
|
||||||
|
|
||||||
|
[_titleTextField setEditable:edit];
|
||||||
|
[_titleTextField setSelectable:edit];
|
||||||
|
[_usernameTextField setEditable:edit];
|
||||||
|
[_usernameTextField setSelectable:edit];
|
||||||
|
[_URLTextField setEditable:edit];
|
||||||
|
[_URLTextField setSelectable:edit];
|
||||||
|
[_passwordTextField setEditable:edit];
|
||||||
|
[_passwordTextField setSelectable:edit];
|
||||||
|
|
||||||
|
[_createdTextField setEditable:edit];
|
||||||
|
[_createdTextField setSelectable:edit];
|
||||||
|
[_notesTextView setEditable:edit];
|
||||||
|
[_notesTextView setSelectable:edit];
|
||||||
|
[_modifiedTextField setEditable:edit];
|
||||||
|
[_modifiedTextField setSelectable:edit];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -20,12 +20,12 @@
|
|||||||
@property (weak) IBOutlet MPPopupImageView *itemImageView;
|
@property (weak) IBOutlet MPPopupImageView *itemImageView;
|
||||||
@property (weak) IBOutlet NSTextField *itemNameTextField;
|
@property (weak) IBOutlet NSTextField *itemNameTextField;
|
||||||
@property (weak) IBOutlet NSButton *editButton;
|
@property (weak) IBOutlet NSButton *editButton;
|
||||||
|
@property (weak) IBOutlet NSButton *cancelEditButton;
|
||||||
|
|
||||||
- (IBAction)showImagePopup:(id)sender;
|
- (IBAction)showImagePopup:(id)sender;
|
||||||
- (IBAction)handleEditButtonClickEvent:(id)sender;
|
- (IBAction)toggleEdit:(id)sender;
|
||||||
|
|
||||||
/* Seperate call to ensure alle registered objects are in place */
|
/* Seperate call to ensure alle registered objects are in place */
|
||||||
- (void)setupNotifications:(NSWindowController *)windowController;
|
- (void)setupNotifications:(NSWindowController *)windowController;
|
||||||
- (void)prepareView;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
|
|||||||
MPEntryInspectorViewController *_entryViewController;
|
MPEntryInspectorViewController *_entryViewController;
|
||||||
MPGroupInspectorViewController *_groupViewController;
|
MPGroupInspectorViewController *_groupViewController;
|
||||||
NSPopover *_popover;
|
NSPopover *_popover;
|
||||||
|
BOOL _isEditing;
|
||||||
}
|
}
|
||||||
|
|
||||||
@property (strong) MPIconSelectViewController *iconSelectionViewController;
|
@property (strong) MPIconSelectViewController *iconSelectionViewController;
|
||||||
@@ -41,8 +42,6 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
|
|||||||
@property (nonatomic, strong) NSDate *modificationDate;
|
@property (nonatomic, strong) NSDate *modificationDate;
|
||||||
@property (nonatomic, strong) NSDate *creationDate;
|
@property (nonatomic, strong) NSDate *creationDate;
|
||||||
|
|
||||||
@property (nonatomic, assign) BOOL showEditButton;
|
|
||||||
|
|
||||||
@property (nonatomic, assign) NSUInteger activeTab;
|
@property (nonatomic, assign) NSUInteger activeTab;
|
||||||
@property (weak) IBOutlet NSTabView *tabView;
|
@property (weak) IBOutlet NSTabView *tabView;
|
||||||
|
|
||||||
@@ -60,7 +59,7 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
|
|||||||
_activeTab = MPEmptyTab;
|
_activeTab = MPEmptyTab;
|
||||||
_entryViewController = [[MPEntryInspectorViewController alloc] init];
|
_entryViewController = [[MPEntryInspectorViewController alloc] init];
|
||||||
_groupViewController = [[MPGroupInspectorViewController alloc] init];
|
_groupViewController = [[MPGroupInspectorViewController alloc] init];
|
||||||
_showEditButton = NO;
|
_isEditing = NO;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@@ -77,14 +76,6 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
|
|||||||
- (void)setActiveTab:(NSUInteger)activeTab {
|
- (void)setActiveTab:(NSUInteger)activeTab {
|
||||||
if(_activeTab != activeTab) {
|
if(_activeTab != activeTab) {
|
||||||
_activeTab = activeTab;
|
_activeTab = activeTab;
|
||||||
self.showEditButton = [[[self windowController] document] tree].metaData.isHistoryEnabled;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setShowEditButton:(BOOL)showEditButton {
|
|
||||||
showEditButton &= (self.activeTab == MPEntryTab);
|
|
||||||
if(_showEditButton != showEditButton) {
|
|
||||||
_showEditButton = showEditButton;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,24 +149,34 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
|
|||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
#pragma mark Click Edit Button
|
#pragma mark Click Edit Button
|
||||||
|
- (void)toggleEdit:(id)sender {
|
||||||
// button title can be used as a status indicator
|
BOOL didCancel = sender == self.cancelEditButton;
|
||||||
- (IBAction)handleEditButtonClickEvent:(id)sender
|
MPDocument *document = [[self windowController] document];
|
||||||
{
|
NSUndoManager *undoManager = [document undoManager];
|
||||||
NSString *buttonTitle;
|
|
||||||
|
|
||||||
buttonTitle = self.editButton.title;
|
if(_isEditing) {
|
||||||
|
BOOL didChangeItem = [undoManager canUndo];
|
||||||
if ([buttonTitle isEqualToString:@"Edit"]) {
|
[undoManager endUndoGrouping];
|
||||||
NSLog(@"begin editing");
|
[undoManager setActionName:NSLocalizedString(@"EDIT_GROUP_OR_ENTRY", "")];
|
||||||
[_entryViewController beginEditing];
|
[self.editButton setTitle:NSLocalizedString(@"EDIT_ITEM", "")];
|
||||||
self.editButton.title = @"Done";
|
[self.cancelEditButton setHidden:YES];
|
||||||
}
|
|
||||||
else if ([buttonTitle isEqualToString:@"Done"]) {
|
|
||||||
NSLog(@"finished editing");
|
|
||||||
[_entryViewController endEditing];
|
[_entryViewController endEditing];
|
||||||
self.editButton.title = @"Edit";
|
|
||||||
|
/*
|
||||||
|
We need to be carefull to only undo the things we actually changed
|
||||||
|
otherwise we undo older actions
|
||||||
|
*/
|
||||||
|
if(didCancel && didChangeItem) {
|
||||||
|
[undoManager undo];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
[undoManager beginUndoGrouping];
|
||||||
|
[self.editButton setTitle:NSLocalizedString(@"SAVE_CHANGES", "")];
|
||||||
|
[self.cancelEditButton setHidden:NO];
|
||||||
|
[_entryViewController beginEditing];
|
||||||
|
}
|
||||||
|
_isEditing = !_isEditing;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
@@ -219,13 +220,6 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
|
|||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
#pragma mark Bindings
|
#pragma mark Bindings
|
||||||
- (void)prepareView {
|
|
||||||
MPDocument *document = [[self windowController] document];
|
|
||||||
[self bind:@"showEditButton" toObject:document.tree.metaData withKeyPath:@"isHistoryEnabled" options:nil];
|
|
||||||
NSDictionary *bindingOptions = @{ NSValueTransformerNameBindingOption : NSNegateBooleanTransformerName };
|
|
||||||
[self.editButton bind:NSHiddenBinding toObject:self withKeyPath:@"showEditButton" options:bindingOptions];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)_updateItemBindings:(id)item {
|
- (void)_updateItemBindings:(id)item {
|
||||||
if(!item) {
|
if(!item) {
|
||||||
[self.itemNameTextField unbind:NSValueBinding];
|
[self.itemNameTextField unbind:NSValueBinding];
|
||||||
@@ -269,8 +263,7 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
|
|||||||
}
|
}
|
||||||
[self _updateItemBindings:document.selectedItem];
|
[self _updateItemBindings:document.selectedItem];
|
||||||
|
|
||||||
// disable the entry text fields whenever the entry selection changes
|
/* disable the entry text fields whenever the entry selection changes */
|
||||||
[_entryViewController endEditing];
|
//[_entryViewController endEditing];
|
||||||
self.editButton.title = @"Edit";
|
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
Reference in New Issue
Block a user