diff --git a/KeePassKit b/KeePassKit index bededcbf..85cd05a9 160000 --- a/KeePassKit +++ b/KeePassKit @@ -1 +1 @@ -Subproject commit bededcbfb8758374a710ca67cbb059ad066f42e6 +Subproject commit 85cd05a9ed5860c41be9f825abc284a0ec8af02c diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index 49dd8191..a4c1cca2 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -118,6 +118,7 @@ 4C52A88F1788628B00868229 /* 13_KeysTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C52A88C1788628B00868229 /* 13_KeysTemplate.pdf */; }; 4C52A8901788628B00868229 /* 18_DisplayTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C52A88D1788628B00868229 /* 18_DisplayTemplate.pdf */; }; 4C52A892178863B000868229 /* 68_PhoneTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C52A891178863B000868229 /* 68_PhoneTemplate.pdf */; }; + 4C5426F317BEEA8700A4424C /* Autotype_test.kdbx in Resources */ = {isa = PBXBuildFile; fileRef = 4C5426F217BEEA8700A4424C /* Autotype_test.kdbx */; }; 4C569D9E17652B0600595B62 /* MPConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C569D9D17652B0600595B62 /* MPConstants.m */; }; 4C569DA117652BFE00595B62 /* MPEntryTableDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C569DA017652BFE00595B62 /* MPEntryTableDataSource.m */; }; 4C569DA417653F3500595B62 /* KdbEntry+MPTreeTools.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C569DA317653F3500595B62 /* KdbEntry+MPTreeTools.m */; }; @@ -511,6 +512,7 @@ 4C52A88C1788628B00868229 /* 13_KeysTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 13_KeysTemplate.pdf; sourceTree = ""; }; 4C52A88D1788628B00868229 /* 18_DisplayTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 18_DisplayTemplate.pdf; sourceTree = ""; }; 4C52A891178863B000868229 /* 68_PhoneTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 68_PhoneTemplate.pdf; sourceTree = ""; }; + 4C5426F217BEEA8700A4424C /* Autotype_test.kdbx */ = {isa = PBXFileReference; lastKnownFileType = file; name = Autotype_test.kdbx; path = Databases/Autotype_test.kdbx; sourceTree = ""; }; 4C569D9C17652AC800595B62 /* MPConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPConstants.h; sourceTree = ""; }; 4C569D9D17652B0600595B62 /* MPConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPConstants.m; sourceTree = ""; }; 4C569D9F17652BFE00595B62 /* MPEntryTableDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPEntryTableDataSource.h; sourceTree = ""; }; @@ -946,6 +948,7 @@ 4C18F9AC178E123200890BCE /* Databases */ = { isa = PBXGroup; children = ( + 4C5426F217BEEA8700A4424C /* Autotype_test.kdbx */, 4C6366B017AFB52500AAF17D /* CustomIcon_Password_1234.kdbx */, 4C6366B117AFB52500AAF17D /* CustomIcon_Password_1234.xml */, 4C6366B217AFB52500AAF17D /* KDB1_KeePassX_test.kdb */, @@ -1934,6 +1937,7 @@ 4C6366B417AFB52500AAF17D /* CustomIcon_Password_1234.xml in Resources */, 4C6366B517AFB52500AAF17D /* KDB1_KeePassX_test.kdb in Resources */, 4CEAF85717BA9B1D001307A6 /* Keepass2Key.xml in Resources */, + 4C5426F317BEEA8700A4424C /* Autotype_test.kdbx in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/MacPass/Base.lproj/InspectorView.xib b/MacPass/Base.lproj/InspectorView.xib index 20415c0b..fd83de5d 100644 --- a/MacPass/Base.lproj/InspectorView.xib +++ b/MacPass/Base.lproj/InspectorView.xib @@ -107,7 +107,7 @@ 134217728 33554432 - + NSImage NSActionTemplate @@ -127,7 +127,7 @@ 268 - {{20, 2}, {238, 25}} + {{20, 2}, {59, 25}} @@ -142,7 +142,10 @@ 918306816 163 - + + NSImage + 07_NotepadTemplate + 400 @@ -598,22 +601,6 @@ 2930 - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - 10 @@ -883,11 +870,6 @@ - - 3115 - - - @@ -925,11 +907,10 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + - com.apple.InterfaceBuilder.CocoaPlugin @@ -973,7 +954,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin @@ -1079,10 +1059,10 @@ IBCocoaFramework YES 3 - - NSActionTemplate - {15, 15} - + + {128, 128} + {15, 15} + YES diff --git a/MacPassTests/Databases/Autotype_test.kdbx b/MacPassTests/Databases/Autotype_test.kdbx new file mode 100644 index 00000000..601124d4 Binary files /dev/null and b/MacPassTests/Databases/Autotype_test.kdbx differ diff --git a/MacPassTests/KPKXmlLoadingTest.m b/MacPassTests/KPKXmlLoadingTest.m index bc2c28a3..e86b86bb 100644 --- a/MacPassTests/KPKXmlLoadingTest.m +++ b/MacPassTests/KPKXmlLoadingTest.m @@ -36,4 +36,15 @@ STAssertTrue([tree.root.entries count] == 1, @"Tree has only one entry"); } +- (void)testAutotypeLoading { + NSBundle *myBundle = [NSBundle bundleForClass:[self class]]; + NSURL *url = [myBundle URLForResource:@"Autotype_test" withExtension:@"kdbx"]; + KPKPassword *password = [[KPKPassword alloc] initWithPassword:@"text" key:nil]; + NSError *error; + KPKTree *tree = [[KPKTree alloc] initWithContentsOfUrl:url password:password error:&error]; + STAssertNotNil(tree, @"Tree shoud be loaded"); + KPKEntry *entry = tree.root.entries[0]; + STAssertNotNil(entry, @"Entry should be there"); +} + @end