Copy on disabled TextFields now possible. This behavior will be used when edit mode is added.

Fixed include issue
Added Tests for NSCoding compliance of KPKAttribute, KPKEntry and KPKBinary
This commit is contained in:
michael starke
2013-08-01 01:33:27 +02:00
parent 83eb0edad2
commit 115537c95b
14 changed files with 284 additions and 48 deletions

2
HNHUi

Submodule HNHUi updated: f274bfbec9...7bf39a4be9

View File

@@ -187,6 +187,9 @@
4C77E37A15B84A240093A587 /* MPAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C77E37915B84A240093A587 /* MPAppDelegate.m */; };
4C77E37D15B84A240093A587 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C77E37B15B84A240093A587 /* MainMenu.xib */; };
4C79DF2A176685870083708F /* HNHRoundedTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C79DF29176685870083708F /* HNHRoundedTextField.m */; };
4C79E80317A9187400AC6CD2 /* KPKXmlHeaderWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C79E80217A9187400AC6CD2 /* KPKXmlHeaderWriter.m */; };
4C79E80617A9400500AC6CD2 /* KPKTestNSCoding.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C79E80517A9400500AC6CD2 /* KPKTestNSCoding.m */; };
4C79E80917A9485600AC6CD2 /* KPKTestNSCopying.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C79E80817A9485600AC6CD2 /* KPKTestNSCopying.m */; };
4C7F35681779DFFB00C57890 /* Errors.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4C7F356A1779DFFB00C57890 /* Errors.strings */; };
4C801AFC179310E2002821E3 /* NSString+Hexdata.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C801AFB179310E2002821E3 /* NSString+Hexdata.m */; };
4C80BB6F176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C80BB6E176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.m */; };
@@ -199,7 +202,6 @@
4C888C9716EB754B003D34A1 /* MPActionHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C888C9616EB754B003D34A1 /* MPActionHelper.m */; };
4C8A173D1790AA41008B5C17 /* NSData+Keyfile.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C8A173C1790AA41008B5C17 /* NSData+Keyfile.m */; };
4C8B36AB17A6ED4B005E1FF1 /* MPOutlineContextMenuDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C8B36AA17A6ED4B005E1FF1 /* MPOutlineContextMenuDelegate.m */; };
4C8B36AE17A734A1005E1FF1 /* HNHContextButtonSegmentedCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C8B36AD17A734A1005E1FF1 /* HNHContextButtonSegmentedCell.m */; };
4C8FECC816D57E3200BF26CF /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C8FECC716D57E3200BF26CF /* QuartzCore.framework */; };
4C96D15417A12E4F00D931FA /* 99_CreatedTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C96D15317A12E4F00D931FA /* 99_CreatedTemplate.pdf */; };
4C9D6AA917615199001C660C /* HNHRoundedSecureTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C9D6AA817615199001C660C /* HNHRoundedSecureTextFieldCell.m */; };
@@ -614,6 +616,12 @@
4C77E37915B84A240093A587 /* MPAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPAppDelegate.m; sourceTree = "<group>"; };
4C79DF28176685870083708F /* HNHRoundedTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHRoundedTextField.h; sourceTree = "<group>"; };
4C79DF29176685870083708F /* HNHRoundedTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHRoundedTextField.m; sourceTree = "<group>"; };
4C79E80117A9187400AC6CD2 /* KPKXmlHeaderWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKXmlHeaderWriter.h; sourceTree = "<group>"; };
4C79E80217A9187400AC6CD2 /* KPKXmlHeaderWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKXmlHeaderWriter.m; sourceTree = "<group>"; };
4C79E80417A9400500AC6CD2 /* KPKTestNSCoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKTestNSCoding.h; sourceTree = "<group>"; };
4C79E80517A9400500AC6CD2 /* KPKTestNSCoding.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKTestNSCoding.m; sourceTree = "<group>"; };
4C79E80717A9485600AC6CD2 /* KPKTestNSCopying.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKTestNSCopying.h; sourceTree = "<group>"; };
4C79E80817A9485600AC6CD2 /* KPKTestNSCopying.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKTestNSCopying.m; sourceTree = "<group>"; };
4C7F35691779DFFB00C57890 /* en */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Errors.strings; sourceTree = "<group>"; };
4C7F356B1779DFFF00C57890 /* de */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Errors.strings; sourceTree = "<group>"; };
4C801AFA179310E2002821E3 /* NSString+Hexdata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Hexdata.h"; sourceTree = "<group>"; };
@@ -637,8 +645,6 @@
4C8A173C1790AA41008B5C17 /* NSData+Keyfile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Keyfile.m"; sourceTree = "<group>"; };
4C8B36A917A6ED4B005E1FF1 /* MPOutlineContextMenuDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineContextMenuDelegate.h; sourceTree = "<group>"; };
4C8B36AA17A6ED4B005E1FF1 /* MPOutlineContextMenuDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPOutlineContextMenuDelegate.m; sourceTree = "<group>"; };
4C8B36AC17A734A1005E1FF1 /* HNHContextButtonSegmentedCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHContextButtonSegmentedCell.h; sourceTree = "<group>"; };
4C8B36AD17A734A1005E1FF1 /* HNHContextButtonSegmentedCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHContextButtonSegmentedCell.m; sourceTree = "<group>"; };
4C8FECC716D57E3200BF26CF /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
4C96D15317A12E4F00D931FA /* 99_CreatedTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 99_CreatedTemplate.pdf; sourceTree = "<group>"; };
4C9D6AA717615199001C660C /* HNHRoundedSecureTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHRoundedSecureTextFieldCell.h; sourceTree = "<group>"; };
@@ -1173,6 +1179,10 @@
4C1842B7179B348600E2F5BC /* KPKLegacyLoadingTest.m */,
4CFC8741179DFD3E000DFC03 /* KPKXmlLoadingTest.h */,
4CFC8742179DFD3E000DFC03 /* KPKXmlLoadingTest.m */,
4C79E80417A9400500AC6CD2 /* KPKTestNSCoding.h */,
4C79E80517A9400500AC6CD2 /* KPKTestNSCoding.m */,
4C79E80717A9485600AC6CD2 /* KPKTestNSCopying.h */,
4C79E80817A9485600AC6CD2 /* KPKTestNSCopying.m */,
);
path = MacPassTests;
sourceTree = "<group>";
@@ -1525,8 +1535,6 @@
4CF78059176E6D5F0032EE71 /* HNHTableRowView.m */,
4C52A242177D7B9F0000D88F /* HNHScrollView.h */,
4C52A243177D7B9F0000D88F /* HNHScrollView.m */,
4C8B36AC17A734A1005E1FF1 /* HNHContextButtonSegmentedCell.h */,
4C8B36AD17A734A1005E1FF1 /* HNHContextButtonSegmentedCell.m */,
4C2671AB17A7D8FC00F3A645 /* HNHColorWell.h */,
4C2671AC17A7D8FC00F3A645 /* HNHColorWell.m */,
);
@@ -1603,6 +1611,8 @@
4C1842C9179C616700E2F5BC /* KPKTreeCryptor.m */,
4C1842BA179B434C00E2F5BC /* KPKXmlHeaderReader.h */,
4C1842BB179B434C00E2F5BC /* KPKXmlHeaderReader.m */,
4C79E80117A9187400AC6CD2 /* KPKXmlHeaderWriter.h */,
4C79E80217A9187400AC6CD2 /* KPKXmlHeaderWriter.m */,
4C1842D1179C64EF00E2F5BC /* KPKXmlTreeCryptor.h */,
4C1842D2179C64EF00E2F5BC /* KPKXmlTreeCryptor.m */,
4C5AA58F179549A1008ECAD7 /* KPKXmlTreeWriter.h */,
@@ -1862,6 +1872,8 @@
4C305F3C179A19F90082334F /* KPKIconLoading.m in Sources */,
4C1842B8179B348600E2F5BC /* KPKLegacyLoadingTest.m in Sources */,
4CFC8743179DFD3E000DFC03 /* KPKXmlLoadingTest.m in Sources */,
4C79E80617A9400500AC6CD2 /* KPKTestNSCoding.m in Sources */,
4C79E80917A9485600AC6CD2 /* KPKTestNSCopying.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2061,11 +2073,11 @@
4C4B7EF817A4B335000234C7 /* MPUniqueCharactersFormatter.m in Sources */,
4C5FA86D17A5F26800C781C9 /* KPKDataStreamWriter.m in Sources */,
4C8B36AB17A6ED4B005E1FF1 /* MPOutlineContextMenuDelegate.m in Sources */,
4C8B36AE17A734A1005E1FF1 /* HNHContextButtonSegmentedCell.m in Sources */,
4CD7223B17A7CB0700F5A1E1 /* MPWorkflowSettingsController.m in Sources */,
4C2671AD17A7D8FC00F3A645 /* HNHColorWell.m in Sources */,
4CA08DA017A831B200A6544B /* MPAddEntryContextMenuDelegate.m in Sources */,
4C6BEA3117A88E6C00CF69A8 /* MPStripLineBreaksTransformer.m in Sources */,
4C79E80317A9187400AC6CD2 /* KPKXmlHeaderWriter.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@@ -12,6 +12,8 @@
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBNSLayoutConstraint</string>
<string>NSButton</string>
<string>NSButtonCell</string>
<string>NSCustomObject</string>
<string>NSCustomView</string>
<string>NSImageCell</string>
@@ -121,11 +123,41 @@
<object class="NSCustomView" id="381395509">
<reference key="NSNextResponder" ref="233312071"/>
<int key="NSvFlags">268</int>
<array class="NSMutableArray" key="NSSubviews"/>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSButton" id="830540359">
<reference key="NSNextResponder" ref="381395509"/>
<int key="NSvFlags">-2147483380</int>
<string key="NSFrame">{{20, 2}, {59, 25}}</string>
<reference key="NSSuperview" ref="381395509"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:22</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="348505851">
<int key="NSCellFlags">-2080374784</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Edit</string>
<reference key="NSSupport" ref="240853158"/>
<string key="NSCellIdentifier">_NS:22</string>
<reference key="NSControlView" ref="830540359"/>
<int key="NSButtonFlags">918306816</int>
<int key="NSButtonFlags2">163</int>
<object class="NSCustomResource" key="NSNormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">07_NotepadTemplate</string>
</object>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
</array>
<string key="NSFrameSize">{278, 30}</string>
<reference key="NSSuperview" ref="233312071"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<reference key="NSNextKeyView" ref="830540359"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="NSClassName">HNHGradientView</string>
</object>
@@ -135,15 +167,17 @@
<string key="NSFrame">{{0, 30}, {278, 369}}</string>
<reference key="NSSuperview" ref="233312071"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="176793183"/>
<reference key="NSNextKeyView" ref="906788312"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<array class="NSMutableArray" key="NSTabViewItems">
<object class="NSTabViewItem" id="367063082">
<string key="NSIdentifier">2</string>
<object class="NSView" key="NSView" id="906788312">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder" ref="45251842"/>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{278, 369}</string>
<reference key="NSSuperview" ref="45251842"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="381395509"/>
<string key="NSReuseIdentifierKey">_NS:28</string>
</object>
@@ -158,7 +192,6 @@
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews"/>
<string key="NSFrameSize">{278, 369}</string>
<reference key="NSNextKeyView" ref="381395509"/>
<string key="NSReuseIdentifierKey">_NS:11</string>
</object>
<string key="NSLabel">Group</string>
@@ -167,7 +200,7 @@
</object>
<object class="NSTabViewItem" id="950669860">
<object class="NSView" key="NSView" id="176793183">
<reference key="NSNextResponder" ref="45251842"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSTextField" id="390171337">
@@ -175,8 +208,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{77, 173}, {125, 24}}</string>
<reference key="NSSuperview" ref="176793183"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="381395509"/>
<reference key="NSNextKeyView" ref="45251842"/>
<string key="NSReuseIdentifierKey">_NS:1535</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1060793256">
@@ -205,8 +237,6 @@
</object>
</array>
<string key="NSFrameSize">{278, 369}</string>
<reference key="NSSuperview" ref="45251842"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="390171337"/>
</object>
<string key="NSLabel">NoSelection</string>
@@ -214,13 +244,13 @@
<reference key="NSTabView" ref="45251842"/>
</object>
</array>
<reference key="NSSelectedTabViewItem" ref="950669860"/>
<reference key="NSSelectedTabViewItem" ref="367063082"/>
<reference key="NSFont" ref="240853158"/>
<int key="NSTvFlags">6</int>
<bool key="NSAllowTruncatedLabels">YES</bool>
<bool key="NSDrawsBackground">YES</bool>
<array class="NSMutableArray" key="NSSubviews">
<reference ref="176793183"/>
<reference ref="906788312"/>
</array>
</object>
</array>
@@ -571,6 +601,38 @@
<int key="objectID">2930</int>
<reference key="object" ref="381395509"/>
<array class="NSMutableArray" key="children">
<object class="IBNSLayoutConstraint" id="696932551">
<reference key="firstItem" ref="830540359"/>
<int key="firstAttribute">10</int>
<int key="relation">0</int>
<reference key="secondItem" ref="381395509"/>
<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="381395509"/>
<int key="scoringType">5</int>
<float key="scoringTypeFloat">22</float>
<int key="contentType">2</int>
</object>
<object class="IBNSLayoutConstraint" id="618180937">
<reference key="firstItem" ref="830540359"/>
<int key="firstAttribute">5</int>
<int key="relation">0</int>
<reference key="secondItem" ref="381395509"/>
<int key="secondAttribute">5</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">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="574545128">
<reference key="firstItem" ref="381395509"/>
<int key="firstAttribute">8</int>
@@ -587,6 +649,7 @@
<float key="scoringTypeFloat">40</float>
<int key="contentType">1</int>
</object>
<reference ref="830540359"/>
</array>
<reference key="parent" ref="233312071"/>
</object>
@@ -784,6 +847,29 @@
<reference key="object" ref="300317034"/>
<reference key="parent" ref="233312071"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3109</int>
<reference key="object" ref="830540359"/>
<array class="NSMutableArray" key="children">
<reference ref="348505851"/>
</array>
<reference key="parent" ref="381395509"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3110</int>
<reference key="object" ref="348505851"/>
<reference key="parent" ref="830540359"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3111</int>
<reference key="object" ref="618180937"/>
<reference key="parent" ref="381395509"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3112</int>
<reference key="object" ref="696932551"/>
<reference key="parent" ref="381395509"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@@ -821,8 +907,10 @@
<string key="2899.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="2925.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="2929.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<array class="NSMutableArray" key="2930.IBNSViewMetadataConstraints">
<array key="2930.IBNSViewMetadataConstraints">
<reference ref="574545128"/>
<reference ref="618180937"/>
<reference ref="696932551"/>
</array>
<boolean value="NO" key="2930.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="2930.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -861,12 +949,17 @@
<string key="3073.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="3075.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="3076.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="3109.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="3109.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="3110.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="3111.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="3112.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">3095</int>
<int key="maxID">3114</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -966,10 +1059,10 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NS.key.0">NSActionTemplate</string>
<string key="NS.object.0">{15, 15}</string>
</object>
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="07_NotepadTemplate">{128, 128}</string>
<string key="NSActionTemplate">{15, 15}</string>
</dictionary>
<bool key="IBDocument.UseAutolayout">YES</bool>
</data>
</archive>

View File

@@ -4989,6 +4989,7 @@
<string key="51.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="52.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="52.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="53.CustomClassName">HNHRoundedTextField</string>
<boolean value="NO" key="53.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="53.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="54.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
@@ -4996,6 +4997,7 @@
<string key="55.CustomClassName">HNHRoundedTextField</string>
<boolean value="NO" key="55.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="55.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="56.CustomClassName">HNHRoundedTextField</string>
<boolean value="NO" key="56.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="57.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
@@ -5016,14 +5018,11 @@
<string key="64.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="65.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="66.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="67.CustomClassName">HNHRoundedTextFieldCell</string>
<string key="67.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="68.CustomClassName">HNHRoundedTextFieldCell</string>
<string key="68.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="69.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="7.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="70.CustomClassName">HNHRoundedTextFieldCell</string>
<string key="70.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="71.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="72.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>

View File

@@ -59,6 +59,7 @@
<string key="NSFrame">{{7, 5}, {32, 19}}</string>
<reference key="NSSuperview" ref="163272962"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="160641004">
@@ -108,7 +109,7 @@
<string key="NSFrameSize">{694, 548}</string>
<reference key="NSSuperview" ref="262664416"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="736877784"/>
<reference key="NSNextKeyView" ref="788738248"/>
<string key="NSReuseIdentifierKey">_NS:13</string>
<bool key="NSEnabled">YES</bool>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
@@ -380,7 +381,7 @@
<string key="NSFrame">{{0, 30}, {694, 565}}</string>
<reference key="NSSuperview" ref="997686550"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="262664416"/>
<reference key="NSNextKeyView" ref="736877784"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="NSsFlags">133680</int>
<reference key="NSVScroller" ref="1037276411"/>
@@ -1572,7 +1573,7 @@
<reference key="parent" ref="276578969"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">843</int>
<int key="objectID">878</int>
<reference key="object" ref="244975730"/>
<reference key="parent" ref="163272962"/>
</object>
@@ -1732,13 +1733,13 @@
<string key="733.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="741.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="743.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="843.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="878.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">867</int>
<int key="maxID">878</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">

View File

@@ -54,7 +54,6 @@
<string key="NSFrame">{{18, 99}, {222, 26}}</string>
<reference key="NSSuperview" ref="154788810"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="NSAntiCompressionPriority">{249, 750}</string>
<bool key="NSEnabled">YES</bool>
@@ -336,7 +335,7 @@
<string key="NSFrameSize">{215, 257}</string>
<reference key="NSSuperview" ref="600246267"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="707535614"/>
<reference key="NSNextKeyView" ref="747041324"/>
<string key="NSReuseIdentifierKey">_NS:13</string>
<object class="NSTextContainer" key="NSTextContainer" id="192398905">
<object class="NSLayoutManager" key="NSLayoutManager">
@@ -462,7 +461,7 @@
<string key="NSFrame">{{20, 190}, {217, 259}}</string>
<reference key="NSSuperview" ref="154788810"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="600246267"/>
<reference key="NSNextKeyView" ref="707535614"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="NSAntiCompressionPriority">{750, 750}</string>
<int key="NSsFlags">133138</int>
@@ -549,7 +548,7 @@
<string key="NSFrameSize">{255, 421}</string>
<reference key="NSSuperview" ref="83897318"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="296338600"/>
<reference key="NSNextKeyView" ref="227728764"/>
<string key="NSReuseIdentifierKey">_NS:13</string>
</object>
</array>
@@ -593,7 +592,7 @@
<string key="NSFrameSize">{255, 421}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="83897318"/>
<reference key="NSNextKeyView" ref="296338600"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="NSsFlags">133152</int>
<reference key="NSVScroller" ref="296338600"/>
@@ -1361,6 +1360,7 @@
<string key="226.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="229.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="229.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="23.CustomClassName">HNHRoundedTextField</string>
<boolean value="NO" key="23.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="230.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1383,7 +1383,6 @@
<string key="250.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="255.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="256.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="26.CustomClassName">HNHRoundedTextFieldCell</string>
<string key="26.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="263.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="27.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1449,11 +1448,11 @@
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">HNHRoundedTextFieldCell</string>
<string key="superclassName">NSTextFieldCell</string>
<string key="className">HNHRoundedTextField</string>
<string key="superclassName">NSTextField</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/HNHRoundedTextFieldCell.h</string>
<string key="minorKey">./Classes/HNHRoundedTextField.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
@@ -1478,7 +1477,7 @@
<dictionary class="NSMutableDictionary" key="outlets">
<string key="contentView">NSView</string>
<string key="notesTextView">NSTextView</string>
<string key="titleTextField">NSTextField</string>
<string key="titleTextField">HNHRoundedTextField</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="contentView">
@@ -1491,7 +1490,7 @@
</object>
<object class="IBToOneOutletInfo" key="titleTextField">
<string key="name">titleTextField</string>
<string key="candidateClassName">NSTextField</string>
<string key="candidateClassName">HNHRoundedTextField</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">

View File

@@ -8,8 +8,6 @@
#import "MPContextToolbarButton.h"
#import "HNHContextButtonSegmentedCell.h"
@implementation MPContextToolbarButton
- (id)initWithFrame:(NSRect)frame {

View File

@@ -8,11 +8,12 @@
#import "MPViewController.h"
@class MPDocument;
@class HNHRoundedTextField;
@interface MPGroupInspectorViewController : MPViewController
@property (strong) IBOutlet NSView *contentView;
@property (weak) IBOutlet NSTextField *titleTextField;
@property (weak) IBOutlet HNHRoundedTextField *titleTextField;
@property (unsafe_unretained) IBOutlet NSTextView *notesTextView;
- (void)setupBindings:(MPDocument *)document;

View File

@@ -8,11 +8,13 @@
#import "MPGroupInspectorViewController.h"
#import "MPDocument.h"
#import "MPPasteBoardController.h"
#import "Kdb.h"
#import "Kdb4Node.h"
#import "HNHScrollView.h"
#import "HNHRoundedTextField.h"
@interface MPGroupInspectorViewController ()
@@ -51,6 +53,12 @@
metrics:nil
views:views]];
[[self view] layoutSubtreeIfNeeded];
copyAction copyBlock = ^void(NSTextField *textField) {
[[MPPasteBoardController defaultController] copyObjects:@[ textField.stringValue ]];
};
self.titleTextField.copyActionBlock = copyBlock;
}
- (void)setupBindings:(MPDocument *)document {

View File

@@ -0,0 +1,13 @@
//
// KPKTestNSCopying.h
// MacPass
//
// Created by Michael Starke on 31.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import <SenTestingKit/SenTestingKit.h>
@interface KPKTestNSCoding : SenTestCase
@end

View File

@@ -0,0 +1,86 @@
//
// KPKTestNSCopying.m
// MacPass
//
// Created by Michael Starke on 31.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "KPKTestNSCoding.h"
#import "KPKEntry.h"
#import "KPKBinary.h"
#import "KPKAttribute.h"
@implementation KPKTestNSCoding
- (void)testAttributeCoding {
KPKAttribute *attribute = [[KPKAttribute alloc] initWithKey:@"Key" value:@"Value" isProtected:YES];
NSData *data = [self encode:attribute];
KPKAttribute *copy = [self decode:data ofClass:[KPKAttribute class]];
STAssertTrue([copy.value isEqualToString:attribute.value], @"Values should be preseved");
STAssertTrue([copy.key isEqualToString:attribute.key], @"Keys should be preserved");
STAssertTrue(copy.isProtected == attribute.isProtected, @"Protected status should be the same");
}
- (void)testBinaryCoding {
}
- (void)testEntryCoding {
/*
1. Deep Copy
2. Copy without History
*/
KPKEntry *entry = [[KPKEntry alloc] init];
entry.title = @"Title";
entry.url = @"URL";
entry.username = @"Username";
entry.password = @"Password";
uint8 bytes[] = { 0xFF, 0x00, 0xFF, 0x00, 0xFF };
NSData *data = [[NSData alloc] initWithBytes:bytes length:5];
KPKBinary *binary = [[KPKBinary alloc] init];
binary.data = data;
binary.name = @"Binary";
[entry addBinary:binary];
[entry addCustomAttribute:[[KPKAttribute alloc] initWithKey:@"Custom" value:@"Value" isProtected:NO]];
NSData *encodedData = [self encode:entry];
KPKEntry *copyEntry = [self decode:encodedData ofClass:[KPKEntry class]];
STAssertNotNil(copyEntry, @"Copied Entry cannot be nil");
STAssertTrue([copyEntry.title isEqualToString:entry.title], @"Titles should match");
STAssertTrue([copyEntry.url isEqualToString:entry.url], @"URLS should match");
STAssertTrue([copyEntry.binaries count] == 1, @"Binareis should be copied");
KPKBinary *copiedBinary = [copyEntry.binaries lastObject];
STAssertTrue([copiedBinary.data isEqualToData:binary.data], @"Binary data should match");
STAssertTrue([copiedBinary.name isEqualToString:binary.name], @"Binary names should macht");
}
- (void)testGroupCoding {
}
- (NSData *)encode:(id)object {
NSMutableData *data = [[NSMutableData alloc] initWithCapacity:500];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
[object encodeWithCoder:archiver];
[archiver finishEncoding];
return data;
}
- (id)decode:(NSData *)data ofClass:(Class)class {
NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data];
id object = [[class alloc] initWithCoder:unarchiver];
[unarchiver finishDecoding];
return object;
}
@end

View File

@@ -0,0 +1,13 @@
//
// KPKTestNSCopying.h
// MacPass
//
// Created by Michael Starke on 31.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import <SenTestingKit/SenTestingKit.h>
@interface KPKTestNSCopying : SenTestCase
@end

View File

@@ -0,0 +1,13 @@
//
// KPKTestNSCopying.m
// MacPass
//
// Created by Michael Starke on 31.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "KPKTestNSCopying.h"
@implementation KPKTestNSCopying
@end