diff --git a/HNHUi b/HNHUi index c32f87da..e5ab00f0 160000 --- a/HNHUi +++ b/HNHUi @@ -1 +1 @@ -Subproject commit c32f87da30386cb9b74c8a43cc173ad4584f329d +Subproject commit e5ab00f08ebf9141005f2d888301f90f1572aebe diff --git a/KeePassKit b/KeePassKit index 3c0af98c..164f814a 160000 --- a/KeePassKit +++ b/KeePassKit @@ -1 +1 @@ -Subproject commit 3c0af98c46e8ec2d50653bd8f7b62410f5144c20 +Subproject commit 164f814a5ed08a11d23859b15191a1effe2dca31 diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index 6a1a02fb..c952c817 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -15,9 +15,9 @@ 4C16BA6217879A3C002B42BD /* MPPasswordStringFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C16BA6117879A3C002B42BD /* MPPasswordStringFormatter.m */; }; 4C1842AB179B027800E2F5BC /* KPKDeletedNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842AA179B027800E2F5BC /* KPKDeletedNode.m */; }; 4C1842AF179B211C00E2F5BC /* KPKXmlTreeReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842AE179B211C00E2F5BC /* KPKXmlTreeReader.m */; }; - 4C1842B2179B28C400E2F5BC /* KPKBinaryTreeReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842B1179B28C400E2F5BC /* KPKBinaryTreeReader.m */; }; - 4C1842B5179B28D400E2F5BC /* KPKBinaryTreeWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842B4179B28D400E2F5BC /* KPKBinaryTreeWriter.m */; }; - 4C1842B8179B348600E2F5BC /* KPKTreeLoadingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842B7179B348600E2F5BC /* KPKTreeLoadingTest.m */; }; + 4C1842B2179B28C400E2F5BC /* KPKLegacyTreeReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842B1179B28C400E2F5BC /* KPKLegacyTreeReader.m */; }; + 4C1842B5179B28D400E2F5BC /* KPKLegacyTreeWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842B4179B28D400E2F5BC /* KPKLegacyTreeWriter.m */; }; + 4C1842B8179B348600E2F5BC /* KPKLegacyLoadingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842B7179B348600E2F5BC /* KPKLegacyLoadingTest.m */; }; 4C1842BC179B434C00E2F5BC /* KPKXmlHeaderReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842BB179B434C00E2F5BC /* KPKXmlHeaderReader.m */; }; 4C1842C0179B5BFD00E2F5BC /* NSData+CommonCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842BF179B5BFD00E2F5BC /* NSData+CommonCrypto.m */; }; 4C1842C3179B69E700E2F5BC /* NSData+HashedData.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842C2179B69E700E2F5BC /* NSData+HashedData.m */; }; @@ -25,6 +25,7 @@ 4C1842CA179C616700E2F5BC /* KPKTreeCryptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842C9179C616700E2F5BC /* KPKTreeCryptor.m */; }; 4C1842D0179C64DD00E2F5BC /* KPKLegacyTreeCryptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842CF179C64DD00E2F5BC /* KPKLegacyTreeCryptor.m */; }; 4C1842D3179C64F000E2F5BC /* KPKXmlTreeCryptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1842D2179C64EF00E2F5BC /* KPKXmlTreeCryptor.m */; }; + 4C18816C179E06920045C5B7 /* TrashBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C18816B179E06920045C5B7 /* TrashBar.xib */; }; 4C18F9AB178E122500890BCE /* Test_Password_1234.kdb in Resources */ = {isa = PBXBuildFile; fileRef = 4C18F9AA178E122500890BCE /* Test_Password_1234.kdb */; }; 4C19E500178E26EF002F2CD0 /* Test_Password_1234.kdbx in Resources */ = {isa = PBXBuildFile; fileRef = 4C19E4FF178E26EF002F2CD0 /* Test_Password_1234.kdbx */; }; 4C19E503178E2871002F2CD0 /* MPDatabasePasswordAndKeyfile.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C19E502178E2871002F2CD0 /* MPDatabasePasswordAndKeyfile.m */; }; @@ -214,6 +215,8 @@ 4CC672791781D0C0006DEDCF /* KdbGroup+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC672781781D0C0006DEDCF /* KdbGroup+MPAdditions.m */; }; 4CC6727C1781D0D2006DEDCF /* KdbEntry+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6727B1781D0D2006DEDCF /* KdbEntry+MPAdditions.m */; }; 4CC7EA1B17807E7E0089D4F3 /* HNHRoundendTextFieldCellHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC7EA1A17807E7E0089D4F3 /* HNHRoundendTextFieldCellHelper.m */; }; + 4CCEDE2A179F203B008402BE /* MPOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCEDE29179F203B008402BE /* MPOutlineView.m */; }; + 4CCEDE2E179F213B008402BE /* MPNotifications.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCEDE2D179F213B008402BE /* MPNotifications.m */; }; 4CD3ABBA178F71B50073F5C5 /* KPKTree.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD3ABB4178F71B50073F5C5 /* KPKTree.m */; }; 4CD3ABBF178F72610073F5C5 /* KPKEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD3ABBE178F72610073F5C5 /* KPKEntry.m */; }; 4CD3ABC2178F72720073F5C5 /* KPKGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD3ABC1178F72720073F5C5 /* KPKGroup.m */; }; @@ -246,6 +249,9 @@ 4CF7805F176E75110032EE71 /* ServerSettings.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CF7805E176E75110032EE71 /* ServerSettings.xib */; }; 4CF78064176E75AD0032EE71 /* MPServerSettingsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CF78063176E75AD0032EE71 /* MPServerSettingsController.m */; }; 4CFC53BF16E94729007396BE /* MPShadowBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFC53BE16E94729007396BE /* MPShadowBox.m */; }; + 4CFC873B179DEDF3000DFC03 /* KPKMetaData.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFC873A179DEDF3000DFC03 /* KPKMetaData.m */; }; + 4CFC873E179DF200000DFC03 /* KPKTimeInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFC873D179DF200000DFC03 /* KPKTimeInfo.m */; }; + 4CFC8743179DFD3E000DFC03 /* KPKXmlLoadingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFC8742179DFD3E000DFC03 /* KPKXmlLoadingTest.m */; }; 4CFEB36E1799D9CF00AF1868 /* Kdb3Entry+KVOAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFEB36D1799D9CF00AF1868 /* Kdb3Entry+KVOAdditions.m */; }; /* End PBXBuildFile section */ @@ -266,12 +272,12 @@ 4C1842AA179B027800E2F5BC /* KPKDeletedNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKDeletedNode.m; sourceTree = ""; }; 4C1842AD179B211C00E2F5BC /* KPKXmlTreeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKXmlTreeReader.h; sourceTree = ""; }; 4C1842AE179B211C00E2F5BC /* KPKXmlTreeReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKXmlTreeReader.m; sourceTree = ""; }; - 4C1842B0179B28C400E2F5BC /* KPKBinaryTreeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKBinaryTreeReader.h; sourceTree = ""; }; - 4C1842B1179B28C400E2F5BC /* KPKBinaryTreeReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKBinaryTreeReader.m; sourceTree = ""; }; - 4C1842B3179B28D400E2F5BC /* KPKBinaryTreeWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKBinaryTreeWriter.h; sourceTree = ""; }; - 4C1842B4179B28D400E2F5BC /* KPKBinaryTreeWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKBinaryTreeWriter.m; sourceTree = ""; }; - 4C1842B6179B348600E2F5BC /* KPKTreeLoadingTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKTreeLoadingTest.h; sourceTree = ""; }; - 4C1842B7179B348600E2F5BC /* KPKTreeLoadingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKTreeLoadingTest.m; sourceTree = ""; }; + 4C1842B0179B28C400E2F5BC /* KPKLegacyTreeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKLegacyTreeReader.h; sourceTree = ""; }; + 4C1842B1179B28C400E2F5BC /* KPKLegacyTreeReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKLegacyTreeReader.m; sourceTree = ""; }; + 4C1842B3179B28D400E2F5BC /* KPKLegacyTreeWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKLegacyTreeWriter.h; sourceTree = ""; }; + 4C1842B4179B28D400E2F5BC /* KPKLegacyTreeWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKLegacyTreeWriter.m; sourceTree = ""; }; + 4C1842B6179B348600E2F5BC /* KPKLegacyLoadingTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKLegacyLoadingTest.h; sourceTree = ""; }; + 4C1842B7179B348600E2F5BC /* KPKLegacyLoadingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKLegacyLoadingTest.m; sourceTree = ""; }; 4C1842B9179B3A1700E2F5BC /* KPKHeaderFields.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = KPKHeaderFields.h; path = Format/KPKHeaderFields.h; sourceTree = ""; }; 4C1842BA179B434C00E2F5BC /* KPKXmlHeaderReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKXmlHeaderReader.h; sourceTree = ""; }; 4C1842BB179B434C00E2F5BC /* KPKXmlHeaderReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKXmlHeaderReader.m; sourceTree = ""; }; @@ -290,6 +296,7 @@ 4C1842D2179C64EF00E2F5BC /* KPKXmlTreeCryptor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKXmlTreeCryptor.m; sourceTree = ""; }; 4C1842D4179C6DE400E2F5BC /* KPKHeaderReading.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KPKHeaderReading.h; sourceTree = ""; }; 4C1842D5179C6F1800E2F5BC /* KPKHeaderWriting.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KPKHeaderWriting.h; sourceTree = ""; }; + 4C18816B179E06920045C5B7 /* TrashBar.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TrashBar.xib; sourceTree = ""; }; 4C18F9AA178E122500890BCE /* Test_Password_1234.kdb */ = {isa = PBXFileReference; lastKnownFileType = file; name = Test_Password_1234.kdb; path = Databases/Test_Password_1234.kdb; sourceTree = ""; }; 4C19E4FF178E26EF002F2CD0 /* Test_Password_1234.kdbx */ = {isa = PBXFileReference; lastKnownFileType = file; name = Test_Password_1234.kdbx; path = Databases/Test_Password_1234.kdbx; sourceTree = ""; }; 4C19E501178E2871002F2CD0 /* MPDatabasePasswordAndKeyfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPDatabasePasswordAndKeyfile.h; sourceTree = ""; }; @@ -650,6 +657,10 @@ 4CC7EA1A17807E7E0089D4F3 /* HNHRoundendTextFieldCellHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHRoundendTextFieldCellHelper.m; sourceTree = ""; }; 4CCA7EEC1797866F00B0B55E /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/GeneralSettings.strings; sourceTree = ""; }; 4CCA7EEE1797867200B0B55E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/GeneralSettings.strings; sourceTree = ""; }; + 4CCEDE28179F203B008402BE /* MPOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineView.h; sourceTree = ""; }; + 4CCEDE29179F203B008402BE /* MPOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPOutlineView.m; sourceTree = ""; }; + 4CCEDE2C179F2122008402BE /* MPNotifications.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPNotifications.h; sourceTree = ""; }; + 4CCEDE2D179F213B008402BE /* MPNotifications.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNotifications.m; sourceTree = ""; }; 4CD3ABB2178F71B50073F5C5 /* KPKVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KPKVersion.h; path = Format/KPKVersion.h; sourceTree = ""; }; 4CD3ABB3178F71B50073F5C5 /* KPKTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKTree.h; sourceTree = ""; }; 4CD3ABB4178F71B50073F5C5 /* KPKTree.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKTree.m; sourceTree = ""; }; @@ -707,6 +718,14 @@ 4CF78063176E75AD0032EE71 /* MPServerSettingsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPServerSettingsController.m; sourceTree = ""; }; 4CFC53BD16E94729007396BE /* MPShadowBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPShadowBox.h; sourceTree = ""; }; 4CFC53BE16E94729007396BE /* MPShadowBox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPShadowBox.m; sourceTree = ""; }; + 4CFC8739179DEDF3000DFC03 /* KPKMetaData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKMetaData.h; sourceTree = ""; }; + 4CFC873A179DEDF3000DFC03 /* KPKMetaData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKMetaData.m; sourceTree = ""; }; + 4CFC873C179DF200000DFC03 /* KPKTimeInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKTimeInfo.h; sourceTree = ""; }; + 4CFC873D179DF200000DFC03 /* KPKTimeInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKTimeInfo.m; sourceTree = ""; }; + 4CFC873F179DF295000DFC03 /* KPKTimerecording.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KPKTimerecording.h; sourceTree = ""; }; + 4CFC8740179DF7A3000DFC03 /* KPKUndoing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KPKUndoing.h; sourceTree = ""; }; + 4CFC8741179DFD3E000DFC03 /* KPKXmlLoadingTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKXmlLoadingTest.h; sourceTree = ""; }; + 4CFC8742179DFD3E000DFC03 /* KPKXmlLoadingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKXmlLoadingTest.m; sourceTree = ""; }; 4CFEB36C1799D9CF00AF1868 /* Kdb3Entry+KVOAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Kdb3Entry+KVOAdditions.h"; sourceTree = ""; }; 4CFEB36D1799D9CF00AF1868 /* Kdb3Entry+KVOAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Kdb3Entry+KVOAdditions.m"; sourceTree = ""; }; 6E719715172058BA00E4C5FC /* MPDatabaseVersion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPDatabaseVersion.h; sourceTree = ""; }; @@ -745,6 +764,7 @@ 4C61EA0416D2FFE200AC519E /* OutlineView.xib */, 4CF78061176E752E0032EE71 /* PasswordInputs */, 4C3FFD9D16DAF60600DF9186 /* FilterBar.xib */, + 4C18816B179E06920045C5B7 /* TrashBar.xib */, 4C76156F1764C0E20015A1A6 /* InspectorView.xib */, 4CE39AC016ECE359000FE29D /* IconSelection.xib */, 4C2C8B331787500E009649F3 /* UnprotectedWarningView.xib */, @@ -762,6 +782,8 @@ 4C4FCE14177CFE6B00BBF7AE /* MPCustomFieldTableCellView.m */, 4C5FE9AC17843CE20001D5A8 /* MPSelectedAttachmentTableCellView.h */, 4C5FE9AD17843CE20001D5A8 /* MPSelectedAttachmentTableCellView.m */, + 4CCEDE28179F203B008402BE /* MPOutlineView.h */, + 4CCEDE29179F203B008402BE /* MPOutlineView.m */, ); name = Views; sourceTree = ""; @@ -1031,6 +1053,8 @@ 4CA23359176DBFE100F0B6AC /* MPLockDaemon.m */, 4C16BA6017879A3C002B42BD /* MPPasswordStringFormatter.h */, 4C16BA6117879A3C002B42BD /* MPPasswordStringFormatter.m */, + 4CCEDE2C179F2122008402BE /* MPNotifications.h */, + 4CCEDE2D179F213B008402BE /* MPNotifications.m */, ); name = Helper; sourceTree = ""; @@ -1093,8 +1117,10 @@ 4C45FB1F178E09ED0010007D /* Supporting Files */, 4C305F3A179A19F90082334F /* KPKIconLoading.h */, 4C305F3B179A19F90082334F /* KPKIconLoading.m */, - 4C1842B6179B348600E2F5BC /* KPKTreeLoadingTest.h */, - 4C1842B7179B348600E2F5BC /* KPKTreeLoadingTest.m */, + 4C1842B6179B348600E2F5BC /* KPKLegacyLoadingTest.h */, + 4C1842B7179B348600E2F5BC /* KPKLegacyLoadingTest.m */, + 4CFC8741179DFD3E000DFC03 /* KPKXmlLoadingTest.h */, + 4CFC8742179DFD3E000DFC03 /* KPKXmlLoadingTest.m */, ); path = MacPassTests; sourceTree = ""; @@ -1494,6 +1520,12 @@ 4C305F35179A0BD70082334F /* KPKIcon.m */, 4C1842A9179B027700E2F5BC /* KPKDeletedNode.h */, 4C1842AA179B027800E2F5BC /* KPKDeletedNode.m */, + 4CFC8739179DEDF3000DFC03 /* KPKMetaData.h */, + 4CFC873A179DEDF3000DFC03 /* KPKMetaData.m */, + 4CFC873C179DF200000DFC03 /* KPKTimeInfo.h */, + 4CFC873D179DF200000DFC03 /* KPKTimeInfo.m */, + 4CFC873F179DF295000DFC03 /* KPKTimerecording.h */, + 4CFC8740179DF7A3000DFC03 /* KPKUndoing.h */, ); path = Core; sourceTree = ""; @@ -1503,24 +1535,24 @@ children = ( 4CDB5C401794AA4F0017667E /* KPKTree+Serializing.h */, 4CDB5C411794AA4F0017667E /* KPKTree+Serializing.m */, + 4C1842C8179C616600E2F5BC /* KPKTreeCryptor.h */, + 4C1842C9179C616700E2F5BC /* KPKTreeCryptor.m */, + 4C1842BA179B434C00E2F5BC /* KPKXmlHeaderReader.h */, + 4C1842BB179B434C00E2F5BC /* KPKXmlHeaderReader.m */, + 4C1842D1179C64EF00E2F5BC /* KPKXmlTreeCryptor.h */, + 4C1842D2179C64EF00E2F5BC /* KPKXmlTreeCryptor.m */, 4C5AA58F179549A1008ECAD7 /* KPKXmlTreeWriter.h */, 4C5AA590179549A1008ECAD7 /* KPKXmlTreeWriter.m */, 4C1842AD179B211C00E2F5BC /* KPKXmlTreeReader.h */, 4C1842AE179B211C00E2F5BC /* KPKXmlTreeReader.m */, - 4C1842B0179B28C400E2F5BC /* KPKBinaryTreeReader.h */, - 4C1842B1179B28C400E2F5BC /* KPKBinaryTreeReader.m */, - 4C1842B3179B28D400E2F5BC /* KPKBinaryTreeWriter.h */, - 4C1842B4179B28D400E2F5BC /* KPKBinaryTreeWriter.m */, - 4C1842BA179B434C00E2F5BC /* KPKXmlHeaderReader.h */, - 4C1842BB179B434C00E2F5BC /* KPKXmlHeaderReader.m */, + 4C1842B0179B28C400E2F5BC /* KPKLegacyTreeReader.h */, + 4C1842B1179B28C400E2F5BC /* KPKLegacyTreeReader.m */, + 4C1842B3179B28D400E2F5BC /* KPKLegacyTreeWriter.h */, + 4C1842B4179B28D400E2F5BC /* KPKLegacyTreeWriter.m */, 4C1842C4179BF51F00E2F5BC /* KPKLegacyHeaderReader.h */, 4C1842C5179BF52000E2F5BC /* KPKLegacyHeaderReader.m */, - 4C1842C8179C616600E2F5BC /* KPKTreeCryptor.h */, - 4C1842C9179C616700E2F5BC /* KPKTreeCryptor.m */, 4C1842CE179C64DC00E2F5BC /* KPKLegacyTreeCryptor.h */, 4C1842CF179C64DD00E2F5BC /* KPKLegacyTreeCryptor.m */, - 4C1842D1179C64EF00E2F5BC /* KPKXmlTreeCryptor.h */, - 4C1842D2179C64EF00E2F5BC /* KPKXmlTreeCryptor.m */, 4C1842D4179C6DE400E2F5BC /* KPKHeaderReading.h */, 4C1842D5179C6F1800E2F5BC /* KPKHeaderWriting.h */, ); @@ -1720,6 +1752,7 @@ 4C52A88F1788628B00868229 /* 13_KeysTemplate.pdf in Resources */, 4C52A8901788628B00868229 /* 18_DisplayTemplate.pdf in Resources */, 4C52A892178863B000868229 /* 68_PhoneTemplate.pdf in Resources */, + 4C18816C179E06920045C5B7 /* TrashBar.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1750,7 +1783,8 @@ 4C45FB30178E0CE20010007D /* MPDatabaseCreation.m in Sources */, 4C19E503178E2871002F2CD0 /* MPDatabasePasswordAndKeyfile.m in Sources */, 4C305F3C179A19F90082334F /* KPKIconLoading.m in Sources */, - 4C1842B8179B348600E2F5BC /* KPKTreeLoadingTest.m in Sources */, + 4C1842B8179B348600E2F5BC /* KPKLegacyLoadingTest.m in Sources */, + 4CFC8743179DFD3E000DFC03 /* KPKXmlLoadingTest.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1931,8 +1965,8 @@ 4CA7C36C179A98140099C34B /* NSString+Base64.m in Sources */, 4C1842AB179B027800E2F5BC /* KPKDeletedNode.m in Sources */, 4C1842AF179B211C00E2F5BC /* KPKXmlTreeReader.m in Sources */, - 4C1842B2179B28C400E2F5BC /* KPKBinaryTreeReader.m in Sources */, - 4C1842B5179B28D400E2F5BC /* KPKBinaryTreeWriter.m in Sources */, + 4C1842B2179B28C400E2F5BC /* KPKLegacyTreeReader.m in Sources */, + 4C1842B5179B28D400E2F5BC /* KPKLegacyTreeWriter.m in Sources */, 4C1842BC179B434C00E2F5BC /* KPKXmlHeaderReader.m in Sources */, 4C1842C0179B5BFD00E2F5BC /* NSData+CommonCrypto.m in Sources */, 4C1842C3179B69E700E2F5BC /* NSData+HashedData.m in Sources */, @@ -1940,6 +1974,10 @@ 4C1842CA179C616700E2F5BC /* KPKTreeCryptor.m in Sources */, 4C1842D0179C64DD00E2F5BC /* KPKLegacyTreeCryptor.m in Sources */, 4C1842D3179C64F000E2F5BC /* KPKXmlTreeCryptor.m in Sources */, + 4CFC873B179DEDF3000DFC03 /* KPKMetaData.m in Sources */, + 4CFC873E179DF200000DFC03 /* KPKTimeInfo.m in Sources */, + 4CCEDE2A179F203B008402BE /* MPOutlineView.m in Sources */, + 4CCEDE2E179F213B008402BE /* MPNotifications.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/MacPass/Base.lproj/InspectorView.xib b/MacPass/Base.lproj/InspectorView.xib index d7f5c67f..d1488129 100644 --- a/MacPass/Base.lproj/InspectorView.xib +++ b/MacPass/Base.lproj/InspectorView.xib @@ -57,81 +57,6 @@ 256 - - - 268 - - Apple PDF pasteboard type - Apple PICT pasteboard type - Apple PNG pasteboard type - NSFilenamesPboardType - NeXT Encapsulated PostScript v1.2 pasteboard type - NeXT TIFF v4.0 pasteboard type - - {{20, 461}, {48, 48}} - - - - _NS:9 - YES - - 134217728 - 33554432 - - NSImage - NSApplicationIcon - - _NS:9 - 0 - 3 - 0 - NO - - NO - YES - - - - 268 - {{73, 477}, {203, 17}} - - - - _NS:1535 - {200, 750} - YES - - 67108928 - 272631808 - Name - - LucidaGrande - 13 - 1044 - - _NS:1535 - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - - - NO - 268 @@ -139,14 +64,13 @@ {293, 30} - _NS:9 HNHGradientView 268 - {{64, 429}, {165, 25}} + {{64, 496}, {165, 25}} @@ -155,7 +79,11 @@ 67108864 0 - + + LucidaGrande + 13 + 1044 + _NS:9 @@ -201,24 +129,23 @@ 12 - {{0, 31}, {293, 399}} + {{0, 31}, {293, 466}} - + _NS:9 1 - + 256 268 - {{17, 365}, {35, 14}} + {{17, 432}, {35, 14}} - _NS:1535 YES @@ -233,7 +160,15 @@ _NS:1535 - + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + 6 System @@ -249,9 +184,8 @@ 268 - {{20, 335}, {253, 22}} + {{20, 402}, {253, 22}} - _NS:9 YES @@ -276,7 +210,10 @@ 6 System textColor - + + 3 + MAA + NO @@ -284,9 +221,8 @@ 268 - {{17, 313}, {58, 14}} + {{17, 380}, {58, 14}} - _NS:1535 YES @@ -305,9 +241,8 @@ 268 - {{20, 283}, {253, 22}} + {{20, 350}, {253, 22}} - _NS:9 YES @@ -327,9 +262,8 @@ 268 - {{20, 231}, {253, 22}} + {{20, 298}, {253, 22}} - _NS:9 YES @@ -349,9 +283,8 @@ 268 - {{17, 261}, {25, 14}} + {{17, 328}, {25, 14}} - _NS:1535 YES @@ -370,9 +303,8 @@ 268 - {{17, 209}, {58, 14}} + {{17, 276}, {58, 14}} - _NS:1535 YES @@ -391,9 +323,8 @@ 268 - {{20, 152}, {253, 19}} + {{20, 219}, {253, 19}} - _NS:9 {250, 750} @@ -421,9 +352,8 @@ 268 - {{17, 35}, {259, 11}} + {{17, 53}, {259, 11}} - _NS:1535 YES @@ -446,10 +376,9 @@ 268 - {{17, 16}, {259, 11}} + {{17, 34}, {259, 11}} - - + _NS:1535 YES @@ -467,9 +396,8 @@ 268 - {{20, 179}, {214, 22}} + {{20, 246}, {214, 22}} - _NS:9 YES @@ -492,9 +420,8 @@ 268 - {{242, 177}, {31, 25}} + {{242, 244}, {31, 25}} - _NS:22 YES @@ -524,9 +451,8 @@ NSStringPboardType - {{20, 73}, {253, 50}} + {{17, 140}, {259, 50}} - _NS:9 YES @@ -537,7 +463,12 @@ _NS:9 - + + 6 + System + controlTextColor + + 0.0 0 @@ -548,9 +479,8 @@ 268 - {{17, 131}, {38, 14}} + {{17, 198}, {38, 14}} - _NS:1535 YES @@ -567,9 +497,7 @@ NO - {293, 399} - - + {293, 466} _NS:11 @@ -594,9 +522,9 @@ 2322 - {251, 332} + {251, 384} - + _NS:13 @@ -656,7 +584,7 @@ - {{1, 1}, {251, 332}} + {{1, 1}, {251, 384}} _NS:11 @@ -686,8 +614,9 @@ 256 - {{236, 1}, {16, 332}} + {{236, 1}, {16, 384}} + _NS:83 NO @@ -710,9 +639,9 @@ 0.94565218687057495 - {{20, 20}, {253, 334}} + {{20, 20}, {253, 386}} - + _NS:9 133138 @@ -725,7 +654,7 @@ 268 - {{17, 362}, {35, 17}} + {{17, 432}, {35, 14}} _NS:1535 @@ -743,7 +672,7 @@ NO - {293, 399} + {293, 466} _NS:28 @@ -759,14 +688,14 @@ 268 - {{241, 362}, {32, 19}} + {{241, 429}, {32, 19}} _NS:9 YES -2080374784 - 134217728 + 134250496 _NS:9 @@ -787,7 +716,7 @@ 268 - {{17, 365}, {79, 14}} + {{17, 432}, {79, 14}} _NS:1535 @@ -816,7 +745,7 @@ 256 - {251, 332} + {251, 399} _NS:13 @@ -900,7 +829,7 @@ 1 - {{1, 1}, {251, 332}} + {{1, 1}, {251, 399}} _NS:11 @@ -925,6 +854,7 @@ -2147483392 {{1, 147}, {52, 16}} + _NS:60 NO 1 @@ -933,7 +863,7 @@ 0.99487179487179489 - {{20, 20}, {253, 334}} + {{20, 20}, {253, 401}} _NS:9 @@ -947,7 +877,7 @@ 1 - {293, 399} + {293, 466} Attachments @@ -956,20 +886,21 @@ - + 256 268 - {{241, 362}, {32, 19}} + {{241, 429}, {32, 19}} + _NS:9 YES -2080374784 - 134217728 + 134250496 _NS:9 @@ -987,8 +918,9 @@ 268 - {{17, 365}, {80, 14}} + {{17, 432}, {80, 14}} + _NS:1535 YES @@ -1016,8 +948,9 @@ 256 - {259, 333} + {259, 400} + _NS:13 YES @@ -1078,8 +1011,9 @@ 1 - {{1, 1}, {259, 333}} + {{1, 1}, {259, 400}} + _NS:11 @@ -1091,6 +1025,7 @@ -2147483392 {{224, 17}, {15, 102}} + _NS:58 NO @@ -1103,6 +1038,8 @@ -2147483392 {{1, 119}, {223, 15}} + + _NS:60 NO 1 @@ -1111,8 +1048,9 @@ 0.99615384615384617 - {{16, 20}, {261, 335}} + {{16, 20}, {261, 402}} + _NS:9 133681 @@ -1125,7 +1063,9 @@ 1 - {293, 399} + {293, 466} + + Fields @@ -1133,41 +1073,24 @@ - + 6 YES YES - + {293, 529} - _NS:11 - - - itemImageView - - - - 111 - - - - itemNameTextfield - - - - 112 - view @@ -1795,22 +1718,54 @@ 29 3 - - + + 3 0 3 1 - 99 + 9 1000 - 9 - 40 + 3 + 9 3 + + + 9 + 0 + + 9 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + 4 @@ -1859,209 +1814,12 @@ 29 3 - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 3 - 0 - - 4 - 1 - - 8 - - 1000 - - 6 - 24 - 3 - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 10 - 0 - - 10 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 5 - 0 - - 6 - 1 - - 8 - - 1000 - - 9 - 40 - 3 - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 3 - 0 - - 3 - 1 - - 20 - - 1000 - - 9 - 40 - 3 - - - - + - - 62 - - - - - 8 - 0 - - 0 - 1 - - 48 - - 1000 - - 3 - 9 - 1 - - - - 7 - 0 - - 0 - 1 - - 48 - - 1000 - - 3 - 9 - 1 - - - - - - - 651 - - - - - 650 - - - - - 63 - - - - - 100 - - - - - - - - 648 - - - - - 517 - - - - - 516 - - - - - 101 - - - 662 @@ -2100,11 +1858,6 @@ - - 874 - - - 1349 @@ -2123,11 +1876,6 @@ - - 1354 - - - 1393 @@ -2159,6 +1907,22 @@ 1396 + + + 3 + 0 + + 3 + 1 + + 60 + + 1000 + + 3 + 9 + 3 + 6 @@ -2175,22 +1939,6 @@ 29 3 - - - 3 - 0 - - 4 - 1 - - 8 - - 1000 - - 6 - 24 - 3 - 4 @@ -2264,6 +2012,22 @@ 1397 + + + 4 + 0 + + 4 + 1 + + 34 + + 1000 + + 3 + 9 + 3 + 6 @@ -2280,22 +2044,6 @@ 29 3 - - - 4 - 0 - - 4 - 1 - - 16 - - 1000 - - 9 - 40 - 3 - 5 @@ -3058,31 +2806,10 @@ 1526 - - - 8 - 0 - - 0 - 1 - - 17 - - 1000 - - 3 - 9 - 1 - - - 1527 - - - 1529 @@ -3108,11 +2835,6 @@ - - 1705 - - - 1720 @@ -3133,16 +2855,6 @@ - - 1849 - - - - - 1851 - - - 1852 @@ -3263,22 +2975,6 @@ 29 3 - - - 3 - 0 - - 3 - 1 - - 45 - - 1000 - - 3 - 9 - 3 - 4 @@ -3295,6 +2991,22 @@ 29 3 + + + 3 + 0 + + 3 + 1 + + 45 + + 1000 + + 3 + 9 + 3 + 6 @@ -3409,7 +3121,7 @@ 29 3 - + 4 0 @@ -3750,89 +3462,11 @@ - - 1958 - - - 1959 - - 1580 - - - - - - 7 - 0 - - 0 - 1 - - 32 - - 1000 - - 3 - 9 - 1 - - - - - - 1581 - - - - - 1978 - - - - - 1979 - - - - - 1942 - - - - - 1985 - - - - - - 7 - 0 - - 0 - 1 - - 32 - - 1000 - - 3 - 9 - 1 - - - - - - 1986 - - - 1990 @@ -3846,11 +3480,6 @@ - - 1995 - - - 1996 @@ -3861,11 +3490,6 @@ - - 1941 - - - 1402 @@ -3876,16 +3500,6 @@ - - 2002 - - - - - 2004 - - - 2009 @@ -3935,16 +3549,6 @@ Horizontal Space - Scroll View - Table View - View - - 2021 - - - - - 2023 - - - 2024 @@ -4173,11 +3777,6 @@ - - 1988 - - - 2022 @@ -4213,11 +3812,6 @@ - - 2090 - - - 2098 @@ -4337,16 +3931,6 @@ - - 2191 - - - - - 2193 - - - 2198 @@ -4357,16 +3941,6 @@ - - 2200 - - - - - 2201 - - - 2202 @@ -5102,15 +4676,165 @@ + + 2409 + + + + + 1851 + + + + + 1985 + + + + + + 7 + 0 + + 0 + 1 + + 32 + + 1000 + + 3 + 9 + 1 + + + + + + 1988 + + + + + 2021 + + + + + 2004 + + + + + 1986 + + + + + 2002 + + + + + 1995 + + + + + 2200 + + + + + 1958 + + + + + 1978 + + + + + 1849 + + + + + 1580 + + + + + + 7 + 0 + + 0 + 1 + + 32 + + 1000 + + 3 + 9 + 1 + + + + + + 2201 + + + + + 2090 + + + + + 2193 + + + + + 1581 + + + + + 2449 + + + + + 2455 + + + + + 2456 + + + + + 2457 + + + + + 2459 + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -5144,7 +4868,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -5154,8 +4877,8 @@ - + com.apple.InterfaceBuilder.CocoaPlugin @@ -5195,8 +4918,8 @@ - + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -5234,12 +4957,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -5273,7 +4992,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -5296,16 +5014,14 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + @@ -5317,7 +5033,7 @@ - + @@ -5326,7 +5042,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin @@ -5358,7 +5073,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin MPCustomFieldTableCellView @@ -5418,7 +5132,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -5542,18 +5255,19 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - - - - - - - + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + - + + + @@ -5561,19 +5275,6 @@ com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - MPPopupImageView - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin @@ -5582,13 +5283,12 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - 2401 + 2459 @@ -5870,7 +5570,6 @@ {128, 128} {15, 15} {8, 8} - {128, 128} {21, 16} {8, 8} {15, 15} diff --git a/MacPass/DatabaseSettingsWindow.xib b/MacPass/DatabaseSettingsWindow.xib index 4765e9b7..1394ed3f 100644 --- a/MacPass/DatabaseSettingsWindow.xib +++ b/MacPass/DatabaseSettingsWindow.xib @@ -16,7 +16,6 @@ NSButtonCell NSCustomObject NSMenu - NSMenuItem NSPathCell NSPathControl NSPopUpButton @@ -71,6 +70,7 @@ {{473, 13}, {59, 32}} + _NS:9 YES @@ -99,6 +99,7 @@ {{13, 41}, {520, 246}} + _NS:9 @@ -210,7 +211,7 @@ 2322 {278, 121} - + _NS:13 @@ -326,7 +327,7 @@ {{136, 17}, {280, 123}} - + _NS:9 133138 @@ -347,7 +348,7 @@ - + 256 @@ -355,6 +356,7 @@ 268 {{111, 140}, {68, 17}} + _NS:1535 YES @@ -379,6 +381,7 @@ {{181, 74}, {170, 26}} + _NS:9 YES @@ -403,6 +406,7 @@ 268 {{128, 78}, {51, 17}} + _NS:1535 YES @@ -423,6 +427,7 @@ 268 {{184, 51}, {164, 19}} + _NS:9 YES @@ -451,6 +456,7 @@ 268 {{356, 136}, {31, 25}} + _NS:22 YES @@ -479,6 +485,7 @@ 268 {{356, 75}, {31, 25}} + _NS:22 YES @@ -507,6 +514,7 @@ 268 {{184, 138}, {164, 22}} + _NS:9 YES @@ -531,6 +539,7 @@ 268 {{127, 108}, {52, 17}} + _NS:1535 YES @@ -551,6 +560,7 @@ 268 {{184, 106}, {164, 22}} + _NS:9 YES @@ -575,6 +585,7 @@ 268 {{198, 168}, {137, 17}} + _NS:1535 YES @@ -599,6 +610,8 @@ {{10, 33}, {500, 200}} + + Password @@ -613,7 +626,7 @@ 268 - {{138, 154}, {98, 18}} + {{184, 156}, {98, 18}} _NS:9 @@ -644,7 +657,7 @@ 268 - {{138, 125}, {133, 18}} + {{184, 127}, {133, 18}} _NS:9 @@ -670,7 +683,7 @@ 268 - {{138, 96}, {130, 18}} + {{184, 98}, {130, 18}} _NS:9 @@ -696,7 +709,7 @@ 268 - {{138, 67}, {95, 18}} + {{184, 69}, {95, 18}} _NS:9 @@ -722,7 +735,7 @@ 268 - {{138, 38}, {107, 18}} + {{184, 40}, {107, 18}} _NS:9 @@ -839,7 +852,7 @@ 268 - {{111, 133}, {94, 17}} + {{111, 136}, {98, 17}} _NS:1535 @@ -847,7 +860,7 @@ 605028416 272630784 - Maxium Items + Maxium Items: _NS:1535 @@ -856,105 +869,10 @@ NO - - - 268 - {{111, 108}, {142, 17}} - - - _NS:1535 - YES - - 605028416 - 272630784 - Maintainance Intervall - - _NS:1535 - - - - - NO - - - - 268 - {{256, 103}, {122, 26}} - - - _NS:9 - YES - - -1539309504 - 2048 - - _NS:9 - - 109199360 - 129 - - - 400 - 75 - - - Item 1 - - 1048576 - 2147483647 - 1 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - _popUpItemAction: - - - YES - - OtherViews - - - - - Item 2 - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - Item 3 - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - - 1 - YES - YES - 2 - - NO - 268 - {{258, 131}, {96, 22}} + {{214, 134}, {96, 22}} _NS:9 @@ -975,9 +893,9 @@ 268 - {{359, 128}, {19, 27}} + {{315, 131}, {19, 27}} - + _NS:1099 YES @@ -1027,6 +945,66 @@ NO + + + 268 + {{121, 103}, {88, 17}} + + + _NS:1535 + YES + + 605028416 + 272630784 + Maxium Size: + + _NS:1535 + + + + + NO + + + + 268 + {{214, 101}, {96, 22}} + + + _NS:9 + YES + + -1267728319 + 272630784 + + + _NS:9 + + YES + + + + NO + + + + 268 + {{315, 98}, {19, 27}} + + + _NS:1099 + YES + + 537657376 + 0 + _NS:1099 + + 100 + 1 + YES + + NO + {{10, 33}, {500, 200}} @@ -1037,7 +1015,7 @@ - + 256 @@ -1045,7 +1023,6 @@ 268 {{97, 114}, {121, 17}} - _NS:1535 YES @@ -1066,8 +1043,7 @@ 268 {{223, 111}, {178, 22}} - - + _NS:9 YES @@ -1088,8 +1064,7 @@ 268 {{220, 79}, {184, 26}} - - + _NS:9 YES @@ -1124,8 +1099,7 @@ 268 {{107, 84}, {110, 17}} - - + _NS:1535 YES @@ -1142,8 +1116,6 @@ {{10, 33}, {500, 200}} - - Templates @@ -1151,13 +1123,13 @@ - + 0 YES YES - + @@ -1191,7 +1163,7 @@ - {{0, 0}, {1920, 1058}} + {{0, 0}, {2560, 1418}} {10000000000000, 10000000000000} YES @@ -1792,43 +1764,11 @@ 369 - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 3 - 0 - - 4 - 1 - - 8 - - 1000 - - 6 - 24 - 3 - - + 5 0 - + 6 1 @@ -1840,27 +1780,11 @@ 24 3 - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - + 5 0 - + 5 1 @@ -1872,11 +1796,11 @@ 24 2 - - + + 5 0 - + 6 1 @@ -1888,28 +1812,12 @@ 24 3 - - + + 3 0 - - 4 - 1 - - 8 - - 1000 - - 6 - 24 - 3 - - - - 11 - 0 - - 11 + + 3 1 0.0 @@ -1952,6 +1860,102 @@ 24 3 + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 3 + 0 + + 3 + 1 + + 77 + + 1000 + + 3 + 9 + 3 + + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + 4 @@ -1968,12 +1972,12 @@ 9 3 - - - 5 + + + 11 0 - - 5 + + 11 1 0.0 @@ -1984,6 +1988,22 @@ 24 2 + + + 5 + 0 + + 5 + 1 + + 72 + + 1000 + + 3 + 9 + 3 + 5 @@ -2016,12 +2036,12 @@ 24 2 - - - 10 + + + 11 0 - - 10 + + 11 1 0.0 @@ -2032,11 +2052,11 @@ 24 2 - - + + 3 0 - + 4 1 @@ -2048,11 +2068,11 @@ 24 3 - - + + 5 0 - + 5 1 @@ -2060,26 +2080,10 @@ 1000 - 9 - 40 + 6 + 24 2 - - - 5 - 0 - - 5 - 1 - - 72 - - 1000 - - 3 - 9 - 3 - 3 @@ -2099,12 +2103,13 @@ - - - + + - + + + @@ -2184,21 +2189,21 @@ 24 2 - + - 3 + 10 0 - 3 + 10 1 - 88 + -7 1000 - 3 - 9 - 3 + 5 + 22 + 2 @@ -2216,7 +2221,23 @@ 24 2 - + + + 9 + 0 + + 9 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + 3 0 @@ -2224,7 +2245,7 @@ 3 1 - 59 + 57 1000 @@ -2232,7 +2253,7 @@ 9 3 - + 3 0 @@ -2240,7 +2261,7 @@ 3 1 - 30 + 28 1000 @@ -2264,22 +2285,6 @@ 24 2 - - - 5 - 0 - - 5 - 1 - - 140 - - 1000 - - 3 - 9 - 3 - @@ -2526,76 +2531,6 @@ - - 564 - - - - - - 7 - 0 - - 0 - 1 - - 136 - - 1000 - - 9 - 40 - 1 - - - - - - 565 - - - - - 579 - - - - - - - - 581 - - - - - - - - 582 - - - - - - - - - - 583 - - - - - 584 - - - - - 585 - - - 593 @@ -2630,11 +2565,6 @@ - - 598 - - - 599 @@ -2648,21 +2578,6 @@ - - 527 - - - - - 521 - - - - - 488 - - - 619 @@ -3217,11 +3132,6 @@ - - 842 - - - 844 @@ -3375,86 +3285,26 @@ - - 1058 - - - - - 1064 - - - - - 1068 - - - 1078 - - 1080 - - - 1096 - - 1059 - - - - - 602 - - - - - 1071 - - - - - 1077 - - - - - 845 - - - - - 1067 - - - 1075 - - 568 - - - 1074 - - 566 - - - 1113 @@ -3475,11 +3325,6 @@ - - 1117 - - - 1120 @@ -3615,11 +3460,6 @@ - - 1209 - - - 1210 @@ -3910,6 +3750,145 @@ + + 1268 + + + + + + + + 1269 + + + + + 1273 + + + + + + + + 1275 + + + + + 1294 + + + + + + + + 1295 + + + + + 1302 + + + + + 1304 + + + + + 1307 + + + + + 1308 + + + + + 1309 + + + + + 1311 + + + + + 1321 + + + + + 1327 + + + + + 1328 + + + + + 1329 + + + + + 1330 + + + + + 1331 + + + + + 1333 + + + + + 1343 + + + + + 1344 + + + + + 1371 + + + + + 1374 + + + + + 1375 + + + + + 1376 + + + + + 1377 + + + @@ -3940,23 +3919,14 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3986,7 +3956,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -4029,6 +3998,35 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -4077,34 +4075,36 @@ com.apple.InterfaceBuilder.CocoaPlugin - - - - + + + - + + + + + + + + - - - + + - - - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - + - - + + + - + @@ -4122,7 +4122,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -4136,9 +4135,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -4155,21 +4152,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin @@ -4177,11 +4159,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -4238,9 +4218,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -4257,7 +4235,7 @@ - 1264 + 1377 @@ -4292,16 +4270,10 @@ MPDatabaseSettingsWindowController NSWindowController - id id id - id - - cancel: - id - clearKey: id @@ -4310,10 +4282,6 @@ generateKey: id - - save: - id - NSButton @@ -4439,8 +4407,6 @@ YES 3 - {11, 11} - {10, 3} {21, 16} {11, 11} {15, 15} diff --git a/MacPass/EntryView.xib b/MacPass/EntryView.xib index c08e62c6..f0b3f9da 100644 --- a/MacPass/EntryView.xib +++ b/MacPass/EntryView.xib @@ -52,13 +52,51 @@ 268 + + + 268 + {{328, 8}, {38, 14}} + + _NS:1535 + YES + + 68157504 + 272761856 + 0 Items + + LucidaGrande + 11 + 3100 + + _NS:1535 + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + NO + 268 {{7, 5}, {32, 19}} - - + _NS:9 YES @@ -88,7 +126,6 @@ {694, 30} - _NS:9 HNHGradientView @@ -107,7 +144,6 @@ {694, 548} - _NS:13 YES @@ -118,7 +154,6 @@ 256 {694, 17} - @@ -139,11 +174,7 @@ 75497536 2048 - - LucidaGrande - 11 - 3100 - + 6 System @@ -157,10 +188,7 @@ 6 System headerTextColor - - 3 - MAA - + @@ -177,17 +205,9 @@ 6 System controlBackgroundColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - + + 3 YES @@ -331,7 +351,6 @@ {{0, 17}, {694, 548}} - _NS:11 @@ -343,7 +362,6 @@ -2147483392 {{224, 17}, {15, 102}} - _NS:58 NO @@ -356,7 +374,6 @@ -2147483392 {{0, 310}, {480, 16}} - _NS:60 NO @@ -373,7 +390,6 @@ {694, 17} - @@ -382,7 +398,6 @@ {{0, 30}, {694, 565}} - _NS:9 133680 @@ -398,7 +413,6 @@ {694, 594} - _NS:9 NSView @@ -461,6 +475,14 @@ 745 + + + entryCountTextField + + + + 842 + textField @@ -471,7 +493,7 @@ 266 - {105, 17} + {104.5, 17} {250, 750} @@ -482,18 +504,13 @@ Table View Cell - - 6 - System - controlColor - - + NO - {{1, 1}, {105, 17}} + {{1, 1}, {104.5, 17}} @@ -562,7 +579,7 @@ NO - {{109, 1}, {144, 17}} + {{108.5, 1}, {144, 17}} _NS:9 @@ -605,7 +622,7 @@ NO - {{378, 1}, {113, 17}} + {{377, 1}, {113, 17}} @@ -622,7 +639,7 @@ 266 - {119, 17} + {118.5, 17} {250, 750} @@ -639,7 +656,7 @@ NO - {{256, 1}, {119, 17}} + {{255.5, 1}, {118.5, 17}} @@ -673,7 +690,7 @@ NO - {{494, 1}, {198, 17}} + {{493, 1}, {198, 17}} @@ -1459,7 +1476,7 @@ - + 10 0 @@ -1474,6 +1491,38 @@ 22 2 + + + 9 + 0 + + 9 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + 5 @@ -1507,6 +1556,7 @@ 1 + @@ -1575,7 +1625,51 @@ - 834 + 835 + + + + + + 7 + 0 + + 0 + 1 + + 32 + + 1000 + + 3 + 9 + 1 + + + + + + 836 + + + + + 837 + + + + + 839 + + + + + 840 + + + + + 841 @@ -1715,9 +1809,11 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + + + @@ -1735,117 +1831,24 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - 834 - - - - - HNHGradientView - NSView - - IBProjectSource - ./Classes/HNHGradientView.h - - - - MPEntryViewController - MPViewController - - NSButton - HNHGradientView - NSTableView - NSView - NSButton - NSTextField - NSSearchField - NSButton - NSButton - NSButton - NSLayoutConstraint - - - - addEntryButton - NSButton - - - bottomBar - HNHGradientView - - - entryTable - NSTableView - - - filterBar - NSView - - - filterDoneButton - NSButton - - - filterLabelTextField - NSTextField - - - filterSearchField - NSSearchField - - - filterTitleButton - NSButton - - - filterURLButton - NSButton - - - filterUsernameButton - NSButton - - - tableToTop - NSLayoutConstraint - - - - IBProjectSource - ./Classes/MPEntryViewController.h - - - - MPTableView - NSTableView - - IBProjectSource - ./Classes/MPTableView.h - - - - MPViewController - NSViewController - - IBProjectSource - ./Classes/MPViewController.h - - - - NSLayoutConstraint - NSObject - - IBProjectSource - ./Classes/NSLayoutConstraint.h - - - + 842 + 0 IBCocoaFramework YES diff --git a/MacPass/FilterBar.xib b/MacPass/FilterBar.xib index b1e7b3b9..b3d853f0 100644 --- a/MacPass/FilterBar.xib +++ b/MacPass/FilterBar.xib @@ -897,18 +897,10 @@ MPEntryViewController MPViewController - - _toggleFilterSpace: - id - - - _toggleFilterSpace: - - _toggleFilterSpace: - id - - + NSButton + HNHGradientView + NSTextField NSTableView NSView NSButton @@ -918,8 +910,21 @@ NSButton NSButton NSLayoutConstraint + HNHGradientView + + addEntryButton + NSButton + + + bottomBar + HNHGradientView + + + entryCountTextField + NSTextField + entryTable NSTableView @@ -956,6 +961,10 @@ tableToTop NSLayoutConstraint + + trashBar + HNHGradientView + IBProjectSource diff --git a/MacPass/MPDocument.h b/MacPass/MPDocument.h index e0e3ebe4..5b76904b 100644 --- a/MacPass/MPDocument.h +++ b/MacPass/MPDocument.h @@ -11,9 +11,7 @@ APPKIT_EXTERN NSString *const MPDocumentDidAddGroupNotification; -APPKIT_EXTERN NSString *const MPDocumentWillDelteGroupNotification; APPKIT_EXTERN NSString *const MPDocumentDidAddEntryNotification; -APPKIT_EXTERN NSString *const MPDocumentWillDeleteEntryNotification; APPKIT_EXTERN NSString *const MPDocumentDidRevertNotifiation; APPKIT_EXTERN NSString *const MPDocumentEntryKey; @@ -21,6 +19,12 @@ APPKIT_EXTERN NSString *const MPDocumentGroupKey; APPKIT_EXTERN NSString *const MPDocumentRequestPasswordSaveNotification; +/* + APPKIT_EXTERN NSString *const MPDocumentDidChangeCurrentItemNotification; +APPKIT_EXTERN NSString *const MPDocumentDidChangeCurrentGroupNotication; +APPKIT_EXTERN NSString *const MPDocumnetDidChangeCurrentEntryNotification; +*/ + @class KdbGroup; @class KdbEntry; @class KdbTree; @@ -53,6 +57,14 @@ APPKIT_EXTERN NSString *const MPDocumentRequestPasswordSaveNotification; @property (assign, readonly, getter = isReadOnly) BOOL readOnly; +/* + State (active group/entry) + */ +@property (nonatomic, weak) KdbEntry *selectedEntry; +@property (nonatomic, weak) KdbGroup *selectedGroup; +@property (nonatomic, weak) id selectedItem; + + - (id)initWithVersion:(MPDatabaseVersion)version; #pragma mark Lock/Decrypt @@ -94,7 +106,7 @@ APPKIT_EXTERN NSString *const MPDocumentRequestPasswordSaveNotification; - (void)deleteGroup:(KdbGroup *)group; - (void)deleteEntry:(KdbEntry *)entry; -- (void)emptyTrash:(id)sender; +- (IBAction)emptyTrash:(id)sender; @end diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index 1044f249..bbae8ed6 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -14,6 +14,7 @@ #import "MPIconHelper.h" #import "MPActionHelper.h" #import "MPSettingsHelper.h" +#import "MPNotifications.h" #import "KdbLib.h" #import "Kdb3Node.h" @@ -38,9 +39,7 @@ #import "DDXMLNode.h" NSString *const MPDocumentDidAddGroupNotification = @"com.hicknhack.macpass.MPDocumentDidAddGroupNotification"; -NSString *const MPDocumentWillDelteGroupNotification = @"com.hicknhack.macpass.MPDocumentDidDelteGroupNotification"; NSString *const MPDocumentDidAddEntryNotification = @"com.hicknhack.macpass.MPDocumentDidAddEntryNotification"; -NSString *const MPDocumentWillDeleteEntryNotification = @"com.hicknhack.macpass.MPDocumentDidDeleteEntryNotification"; NSString *const MPDocumentDidRevertNotifiation = @"com.hicknhack.macpass.MPDocumentDidRevertNotifiation"; NSString *const MPDocumentRequestPasswordSaveNotification = @"com.hicknhack.macpass.MPDocumentRequestPasswordSaveNotification"; @@ -257,6 +256,27 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey return NO; } +- (void)setSelectedGroup:(KdbGroup *)selectedGroup { + if(_selectedGroup != selectedGroup) { + _selectedGroup = selectedGroup; + } + self.selectedItem = _selectedGroup; +} + +- (void)setSelectedEntry:(KdbEntry *)selectedEntry { + if(_selectedEntry != selectedEntry) { + _selectedEntry = selectedEntry; + } + self.selectedItem = selectedEntry; +} + +- (void)setSelectedItem:(id)selectedItem { + if(_selectedItem != selectedItem) { + _selectedItem = selectedItem; + [[NSNotificationCenter defaultCenter] postNotificationName:MPCurrentItemChangedNotification object:self]; + } +} + #pragma mark Data Accesors - (void)setTree:(KdbTree *)tree { if(_tree != tree) { @@ -424,6 +444,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey else { [entry deleteUndoable]; } + self.selectedEntry = nil; } - (void)deleteGroup:(KdbGroup *)group { diff --git a/MacPass/MPDocumentWindowController.h b/MacPass/MPDocumentWindowController.h index 1346e0a4..cddce83d 100644 --- a/MacPass/MPDocumentWindowController.h +++ b/MacPass/MPDocumentWindowController.h @@ -18,21 +18,13 @@ @class KdbGroup; @class KdbEntry; -APPKIT_EXTERN NSString *const MPCurrentItemChangedNotification; - -@interface MPDocumentWindowController : NSWindowController +@interface MPDocumentWindowController : NSWindowController @property (readonly, strong) MPPasswordInputController *passwordInputController; @property (readonly, strong) MPEntryViewController *entryViewController; @property (readonly, strong) MPOutlineViewController *outlineViewController; @property (readonly, strong) MPInspectorViewController *inspectorViewController; - -/* Holds the current item. That is either a KdbGroup or a KdbEntry */ -@property (readonly, unsafe_unretained) id currentItem; -@property (readonly, unsafe_unretained) KdbGroup *currentGroup; -@property (readonly, unsafe_unretained) KdbEntry *currentEntry; - /** @param action The action that should be validatet @param item The item that the action affects. Pass nil to fall back for default item diff --git a/MacPass/MPDocumentWindowController.m b/MacPass/MPDocumentWindowController.m index 188539fc..5bab6316 100644 --- a/MacPass/MPDocumentWindowController.m +++ b/MacPass/MPDocumentWindowController.m @@ -19,8 +19,6 @@ #import "MPConstants.h" #import "MPSettingsHelper.h" -NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCurrentItemChangedNotification"; - @interface MPDocumentWindowController () { @private id _firstResponder; @@ -30,9 +28,6 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur @property (strong) IBOutlet NSSplitView *splitView; @property (strong) NSToolbar *toolbar; -@property (unsafe_unretained) id currentItem; -@property (unsafe_unretained) KdbGroup *currentGroup; -@property (unsafe_unretained) KdbEntry *currentEntry; @property (strong) MPPasswordInputController *passwordInputController; @property (strong) MPEntryViewController *entryViewController; @@ -54,11 +49,7 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur _outlineViewController = [[MPOutlineViewController alloc] init]; _entryViewController = [[MPEntryViewController alloc] init]; _inspectorViewController = [[MPInspectorViewController alloc] init]; - _currentItem = nil; _saveAfterPasswordEdit = NO; - - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_updateCurrentItem:) name:MPOutlineViewDidChangeGroupSelection object:_outlineViewController]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_updateCurrentItem:) name:MPDidChangeSelectedEntryNotification object:_entryViewController]; } return self; } @@ -100,8 +91,6 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur [inspectorView removeFromSuperview]; } - [[self window] setDelegate:self]; - MPDocument *document = [self document]; if(!document.decrypted) { [self showPasswordInput]; @@ -145,25 +134,6 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur [self.window makeFirstResponder:[viewController reconmendedFirstResponder]]; } -#pragma mark Notification handling -- (void)_updateCurrentItem:(NSNotification *)notification { - id sender = [notification object]; - - self.currentGroup = _outlineViewController.selectedGroup; - self.currentEntry = _entryViewController.selectedEntry; - - if( sender == _outlineViewController.outlineView || sender == _outlineViewController ) { - self.currentItem = _outlineViewController.selectedGroup; - } - else if( sender == _entryViewController.entryTable || sender == _entryViewController) { - self.currentItem = _entryViewController.selectedEntry; - } - else { - return; // no notification! - } - [[NSNotificationCenter defaultCenter] postNotificationName:MPCurrentItemChangedNotification object:self]; -} - - (void)_didRevertDocument:(NSNotification *)notification { [self.outlineViewController clearSelection]; [self showPasswordInput]; @@ -196,7 +166,7 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur enabled = (nil != document.treeV4); } if(itemAction == [MPActionHelper actionOfType:MPActionDelete]) { - enabled &= (nil != _currentItem) && (_currentItem != document.trash); + enabled &= (nil != document.selectedItem) && (document.selectedItem != document.trash); } enabled &= !( !document.decrypted || document.isLocked || document.isReadOnly ); @@ -212,11 +182,11 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur switch (actionType) { case MPActionAddGroup: case MPActionAddEntry: - return (nil != _outlineViewController.selectedGroup); + return (nil != document.selectedGroup); case MPActionDelete: { - BOOL valid = (nil != _currentItem); - valid &= (_currentItem != document.trash); - valid &= ![document isItemTrashed:_currentItem]; + BOOL valid = (nil != document.selectedItem); + valid &= (document.selectedItem != document.trash); + valid &= ![document isItemTrashed:document.selectedItem]; return valid; } case MPActionLock: @@ -241,11 +211,11 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur case MPActionAddGroup: case MPActionAddEntry: // test if Group is in trash - return (nil != _outlineViewController.selectedGroup); + return (nil != document.selectedGroup); case MPActionDelete: { - BOOL valid = (nil != _currentItem); - valid &= (_currentItem != document.trash); - valid &= ![document isItemTrashed:_currentItem]; + BOOL valid = (nil != document.selectedItem); + valid &= (document.selectedItem != document.trash); + valid &= ![document isItemTrashed:document.selectedItem]; return valid; } case MPActionLock: @@ -381,30 +351,6 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur [_outlineViewController showOutline]; } - -#pragma mark NSWindowDelegate -- (void)windowDidUpdate:(NSNotification *)notification { - id firstResonder = [[self window] firstResponder]; - if(_firstResponder == firstResonder) { - return; - } - _firstResponder = firstResonder; - if([_firstResponder isKindOfClass:[NSView class]]) { - [self _updateCurrentItem:[NSNotification notificationWithName:@"dummy" object:_firstResponder ]]; - } -} - -//- (void)windowDidBecomeKey:(NSNotification *)notification { -// if(!_requestPassword) { -// return; // Nothing to do; -// } -// MPDocument *document = [self document]; -// if(!document.hasPasswordOrKey && document.decrypted) { -// _requestPassword = NO; -// [self performSelector:@selector(editPassword:) withObject:nil afterDelay:0.5]; -// } -//} - #pragma mark MPDatabaseSettingsDelegate - (void)didCancelDatabaseSettings { _saveAfterPasswordEdit = NO; // Just Reset the flag diff --git a/MacPass/MPEntryViewController.h b/MacPass/MPEntryViewController.h index cf389183..102d22d1 100644 --- a/MacPass/MPEntryViewController.h +++ b/MacPass/MPEntryViewController.h @@ -14,8 +14,6 @@ APPKIT_EXTERN NSString *const MPEntryTablePasswordColumnIdentifier; APPKIT_EXTERN NSString *const MPEntryTableParentColumnIdentifier; APPKIT_EXTERN NSString *const MPEntryTableURLColumnIdentifier; -APPKIT_EXTERN NSString *const MPDidChangeSelectedEntryNotification; - /* Tags to determine what to copy */ typedef NS_ENUM( NSUInteger, MPCopyContentTypeTag) { MPCopyUsername, diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m index 7e490708..a31c0988 100644 --- a/MacPass/MPEntryViewController.m +++ b/MacPass/MPEntryViewController.m @@ -30,7 +30,7 @@ #import "KdbGroup+Undo.h" #import "KdbEntry+Undo.h" -NSString *const MPDidChangeSelectedEntryNotification = @"com.macpass.MPDidChangeSelectedEntryNotification"; +#import "MPNotifications.h" #define STATUS_BAR_ANIMATION_TIME 0.2 @@ -69,6 +69,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; @property (strong) NSArrayController *entryArrayController; @property (strong) NSArray *filteredEntries; @property (strong) IBOutlet NSView *filterBar; +@property (strong) IBOutlet HNHGradientView *trashBar; @property (weak) IBOutlet NSTableView *entryTable; @property (strong) IBOutlet NSLayoutConstraint *tableToTop; @property (weak) IBOutlet NSButton *filterDoneButton; @@ -80,6 +81,8 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; @property (weak) IBOutlet NSSearchField *filterSearchField; @property (weak) IBOutlet HNHGradientView *bottomBar; @property (weak) IBOutlet NSButton *addEntryButton; +@property (weak) IBOutlet NSTextField *entryCountTextField; + @property (weak) KdbEntry *selectedEntry; @@ -102,9 +105,9 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; if(self) { _filterMode = MPFilterTitles; _filterButtonToMode = @{ _toggleFilterUsernameButton : @(MPFilterUsernames), - _toggleFilterTitleButton : @(MPFilterTitles), - _toggleFilterURLButton : @(MPFilterUrls) - }; + _toggleFilterTitleButton : @(MPFilterTitles), + _toggleFilterURLButton : @(MPFilterUrls) + }; _entryArrayController = [[NSArrayController alloc] init]; _dataSource = [[MPEntryTableDataSource alloc] init]; _dataSource.viewController = self; @@ -133,6 +136,11 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; [self.entryTable setTarget:self]; [self.entryTable setFloatsGroupRows:NO]; //[self.entryTable registerForDraggedTypes:@[MPPasteBoardType]]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(_didBecomFirstResponder:) + name:MPDidBecomeFirstResonderNotification + object:_entryTable]; + [self _setupEntryMenu]; NSTableColumn *parentColumn = [self.entryTable tableColumns][0]; @@ -174,10 +182,11 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; } - (void)setupNotifications:(MPDocumentWindowController *)windowController { + MPDocument *document = [windowController document]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didChangeCurrentItem:) name:MPCurrentItemChangedNotification - object:windowController]; + object:document]; } #pragma mark NSTableViewDelgate @@ -225,27 +234,20 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; } - (void)tableViewSelectionDidChange:(NSNotification *)notification { + MPDocument *document = [[self windowController] document]; if([self.entryTable selectedRow] < 0 || [[_entryTable selectedRowIndexes] count] > 1) { - self.selectedEntry = nil; + document.selectedEntry = nil; } else { - self.selectedEntry = [self.entryArrayController arrangedObjects][[self.entryTable selectedRow]]; + document.selectedEntry = [self.entryArrayController arrangedObjects][[self.entryTable selectedRow]]; } - [[NSNotificationCenter defaultCenter] postNotificationName:MPDidChangeSelectedEntryNotification object:self userInfo:nil]; } #pragma mark Notifications - (void)_didChangeCurrentItem:(NSNotification *)notification { - if([self _showsFilterBar]) { - //[self.filterSearchField setStringValue:@""]; - [self clearFilter:nil]; - } - MPDocumentWindowController *sender = [notification object]; - id item = sender.currentItem; - /* - Filter? If no group is selected, we shouldn display a list of entries - */ - if(!sender.currentGroup) { + MPDocument *document = [notification object]; + + if(!document.selectedGroup) { [self.entryArrayController unbind:NSContentArrayBinding]; [self.entryArrayController setContent:nil]; return; @@ -253,17 +255,31 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; /* If a grup is the current item, see if we already show that group */ - if(item == sender.currentGroup) { + if(document.selectedItem == document.selectedGroup) { + /* + If we reselct the group, or just another group + we clear the filter and bind to the new selected group + */ + if([self _showsFilterBar] && ![document.selectedItem isKindOfClass:[KdbEntry class]]) { + [self clearFilter:nil]; + [self.entryArrayController bind:NSContentArrayBinding toObject:document.selectedGroup withKeyPath:@"entries" options:nil]; + return; + } if([[self.entryArrayController content] count] > 0) { KdbEntry *entry = [[self.entryArrayController content] lastObject]; - if(entry.parent == item) { + if(entry.parent == document.selectedGroup) { return; // we are showing the correct object right now. } } - [self.entryArrayController bind:NSContentArrayBinding toObject:item withKeyPath:@"entries" options:nil]; + [self.entryArrayController bind:NSContentArrayBinding toObject:document.selectedGroup withKeyPath:@"entries" options:nil]; } } +- (void)_didBecomFirstResponder:(NSNotification *)notification { + MPDocument *document = [[self windowController] document]; + document.selectedItem = document.selectedEntry; +} + #pragma mark Filtering @@ -284,8 +300,11 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; - (void)clearFilter:(id)sender { self.filter = nil; + [self.filterSearchField setStringValue:@""]; [[self.entryTable tableColumnWithIdentifier:MPEntryTableParentColumnIdentifier] setHidden:YES]; [self _hideFilterBarAnimated:YES]; + MPDocument *document = [[self windowController] document]; + document.selectedGroup = document.selectedGroup; } - (void)updateFilter { @@ -312,6 +331,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; self.filteredEntries = [[document.root childEntries] filteredArrayUsingPredicate:fullFilter]; dispatch_sync(dispatch_get_main_queue(), ^{ + document.selectedEntry = nil; [self.entryArrayController unbind:NSContentArrayBinding]; [self.entryArrayController setContent:self.filteredEntries]; [[self.entryTable tableColumnWithIdentifier:MPEntryTableParentColumnIdentifier] setHidden:NO]; @@ -382,6 +402,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; else { [self.view layoutSubtreeIfNeeded]; } + [[[self windowController] window] makeFirstResponder:self.filterSearchField]; } - (void)_hideFilterBarAnimated:(BOOL)animate { @@ -428,7 +449,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; infoImage = [[NSBundle mainBundle] imageForResource:@"09_IdentityTemplate"]; infoText = NSLocalizedString(@"COPIED_USERNAME", @"Username was copied to the pasteboard"); break; - + case MPOverlayInfoCustom: infoImage = [[NSBundle mainBundle] imageForResource:@"00_PasswordTemplate"]; infoText = [NSString stringWithFormat:NSLocalizedString(@"COPIED_FIELD_%@", "Field nam that was copied to the pasteboard"), name]; @@ -437,6 +458,56 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; [[MPOverlayWindowController sharedController] displayOverlayImage:infoImage label:infoText atView:self.view]; } +- (void)_showTrashBar { + if([self hasFilter]) { + [self clearFilter:nil]; + } + if(!self.trashBar) { + [self _setupTrashBar]; + } + NSView *scrollView = [_entryTable enclosingScrollView]; + NSDictionary *views = NSDictionaryOfVariableBindings(scrollView, _trashBar); + [[self view] layout]; + [[self view] removeConstraint:self.tableToTop]; + [[self view] addSubview:self.trashBar]; + [[self view] addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_trashBar]|" options:0 metrics:nil views:views]]; + [[self view] addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_trashBar(==30)]-0-[scrollView]" options:0 metrics:nil views:views]]; + + [NSAnimationContext runAnimationGroup:^(NSAnimationContext* context) { + context.duration = STATUS_BAR_ANIMATION_TIME; + context.allowsImplicitAnimation = YES; + [[self view] layoutSubtreeIfNeeded]; + } completionHandler:nil] ; + + + //[[self view] layoutSubtreeIfNeeded]; + +} + +- (void)_hideTrashBar { + if(![self.trashBar superview]) { + return; // Trahsbar is not visible + } + + [self.trashBar removeFromSuperview]; + [[self view] addConstraint:self.tableToTop]; + [[self view] layoutSubtreeIfNeeded]; +} + +- (void)_setupTrashBar { + /* Load the bundle */ + [[NSBundle mainBundle] loadNibNamed:@"TrashBar" owner:self topLevelObjects:nil]; + NSArray *activeColors = @[ + [NSColor colorWithCalibratedWhite:0.2 alpha:1], + [NSColor colorWithCalibratedWhite:0.4 alpha:1] + ]; + NSArray *inactiveColors = @[ [NSColor colorWithCalibratedWhite:0.3 alpha:1], + [NSColor colorWithCalibratedWhite:0.6 alpha:1] + ]; + self.trashBar.activeGradient = [[NSGradient alloc] initWithColors:activeColors]; + self.trashBar.inactiveGradient = [[NSGradient alloc] initWithColors:inactiveColors]; +} + #pragma mark EntryMenu - (void)_setupEntryMenu { diff --git a/MacPass/MPInspectorViewController.m b/MacPass/MPInspectorViewController.m index edf028c3..f4951fbd 100644 --- a/MacPass/MPInspectorViewController.m +++ b/MacPass/MPInspectorViewController.m @@ -22,6 +22,7 @@ #import "MPSelectedAttachmentTableCellView.h" #import "MPAttachmentTableViewDelegate.h" #import "MPCustomFieldTableViewDelegate.h" +#import "MPNotifications.h" #import "NSDate+Humanized.h" @@ -129,11 +130,11 @@ enum { } - (void)setupNotifications:(MPDocumentWindowController *)windowController { - /* Register for Entry selection */ + MPDocument *document = [windowController document]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didChangeCurrentItem:) name:MPCurrentItemChangedNotification - object:windowController]; + object:document]; } - (void)setModificationDate:(NSDate *)modificationDate { @@ -418,19 +419,24 @@ enum { #pragma mark Notificiations - (void)_didChangeCurrentItem:(NSNotification *)notification { - MPDocumentWindowController *sender = [notification object]; - id item = sender.currentItem; - if(!item) { + /** + Remove double handling. + Just call for documents properties when neede + */ + MPDocument *document = [[self windowController] document]; + if(!document.selectedItem) { self.selectedGroup = nil; self.selectedEntry = nil; } - if([item isKindOfClass:[KdbGroup class]]) { + BOOL isGroup = document.selectedItem == document.selectedGroup; + BOOL isEntry = document.selectedItem == document.selectedEntry; + if(isGroup) { self.selectedEntry = nil; - self.selectedGroup = sender.currentItem; + self.selectedGroup = document.selectedItem; } - else if([item isKindOfClass:[KdbEntry class]]) { + else if(isEntry) { self.selectedGroup = nil; - self.selectedEntry = sender.currentItem; + self.selectedEntry = document.selectedItem; } [self _updateContent]; } diff --git a/MacPass/MPNotifications.h b/MacPass/MPNotifications.h new file mode 100644 index 00000000..926903a1 --- /dev/null +++ b/MacPass/MPNotifications.h @@ -0,0 +1,17 @@ +// +// MPNotifications.h +// MacPass +// +// Created by Michael Starke on 23.07.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#ifndef MacPass_MPNotifications_h +#define MacPass_MPNotifications_h + +#import + +FOUNDATION_EXPORT NSString *const MPDidBecomeFirstResonderNotification; +FOUNDATION_EXPORT NSString *const MPCurrentItemChangedNotification; + +#endif diff --git a/MacPass/MPNotifications.m b/MacPass/MPNotifications.m new file mode 100644 index 00000000..0d4efde2 --- /dev/null +++ b/MacPass/MPNotifications.m @@ -0,0 +1,12 @@ +// +// MPNotifications.m +// MacPass +// +// Created by Michael Starke on 23.07.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import "MPNotifications.h" + +NSString *const MPDidBecomeFirstResonderNotification = @"com.hicknhack.macpass.MPDidBecomeFirstResonderNotification"; +NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCurrentItemChangedNotification"; \ No newline at end of file diff --git a/MacPass/MPOutlineView.h b/MacPass/MPOutlineView.h new file mode 100644 index 00000000..09ae96e0 --- /dev/null +++ b/MacPass/MPOutlineView.h @@ -0,0 +1,13 @@ +// +// MPOutlineView.h +// MacPass +// +// Created by Michael Starke on 23.07.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import + +@interface MPOutlineView : NSOutlineView + +@end diff --git a/MacPass/MPOutlineView.m b/MacPass/MPOutlineView.m new file mode 100644 index 00000000..e25d4899 --- /dev/null +++ b/MacPass/MPOutlineView.m @@ -0,0 +1,21 @@ +// +// MPOutlineView.m +// MacPass +// +// Created by Michael Starke on 23.07.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import "MPOutlineView.h" +#import "MPNotifications.h" + +@implementation MPOutlineView + +- (BOOL)becomeFirstResponder { + [[NSNotificationCenter defaultCenter] postNotificationName:MPDidBecomeFirstResonderNotification + object:self + userInfo:nil]; + return YES; +} + +@end diff --git a/MacPass/MPOutlineViewController.h b/MacPass/MPOutlineViewController.h index c6f59437..290fd211 100644 --- a/MacPass/MPOutlineViewController.h +++ b/MacPass/MPOutlineViewController.h @@ -17,9 +17,8 @@ APPKIT_EXTERN NSString *const MPOutlineViewDidChangeGroupSelection; @interface MPOutlineViewController : MPViewController -@property (readonly, weak) NSOutlineView *outlineView; + @property (weak) IBOutlet HNHGradientView *bottomBar; -@property (weak, readonly, nonatomic) KdbGroup *selectedGroup; - (void)clearSelection; - (void)showOutline; diff --git a/MacPass/MPOutlineViewController.m b/MacPass/MPOutlineViewController.m index 869c7f73..b001f071 100644 --- a/MacPass/MPOutlineViewController.m +++ b/MacPass/MPOutlineViewController.m @@ -16,6 +16,7 @@ #import "MPIconHelper.h" #import "MPUppercaseStringValueTransformer.h" #import "MPRootAdapter.h" +#import "MPNotifications.h" #import "KdbLib.h" #import "Kdb4Node.h" @@ -33,7 +34,6 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; } @property (weak) IBOutlet NSOutlineView *outlineView; @property (weak) IBOutlet NSButton *addGroupButton; -@property (nonatomic, weak) KdbGroup *selectedGroup; @property (strong) NSTreeController *treeController; @property (strong) MPOutlineDataSource *datasource; @@ -71,6 +71,11 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; [_outlineView setDraggingSourceOperationMask:NSDragOperationEvery forLocal:YES]; [_bottomBar setBorderType:HNHBorderTop]; [_addGroupButton setAction:[MPActionHelper actionOfType:MPActionAddGroup]]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(_didBecomeFirstResponder:) + name:MPDidBecomeFirstResonderNotification + object:_outlineView]; } - (void)showOutline { @@ -101,17 +106,6 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; } } -//- (void)setSelectedGroup:(KdbGroup *)selectedGroup { -// if(_selectedGroup != selectedGroup) { -// _selectedGroup = selectedGroup; -// if([selectedGroup isKindOfClass:[Kdb4Group class]]) { -// MPDocument *document = [[self windowController] document]; -// document.treeV4.lastSelectedGroup = ((Kdb4Group *)selectedGroup).uuid; -// } -// } -//} - - #pragma mark Notifications - (void)setupNotifications:(MPDocumentWindowController *)windowController { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didCreateGroup:) name:MPDocumentDidAddGroupNotification object:[windowController document]]; @@ -128,7 +122,6 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; if( selectedRow == -1) { MPDocument *document = [[self windowController] document]; indexSet = [NSIndexSet indexSetWithIndex:[document.root.groups count]]; - //TODO: Find out why selection is not set (treeUpdate?) } else { id item = [_outlineView itemAtRow:selectedRow]; @@ -137,6 +130,14 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; } } +- (void)_didBecomeFirstResponder:(NSNotification *)notification { + if( [notification object] != _outlineView ) { + return; // Nothing we need to worry about + } + MPDocument *document = [[self windowController] document]; + document.selectedItem = document.selectedGroup; +} + #pragma mark Validation - (BOOL)validateMenuItem:(NSMenuItem *)menuItem { @@ -212,8 +213,8 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; - (void)outlineViewSelectionDidChange:(NSNotification *)notification { NSTreeNode *treeNode = [_outlineView itemAtRow:[_outlineView selectedRow]]; KdbGroup *selectedGroup = [treeNode representedObject]; - self.selectedGroup = selectedGroup; - [[NSNotificationCenter defaultCenter] postNotificationName:MPOutlineViewDidChangeGroupSelection object:self userInfo:nil]; + MPDocument *document = [[self windowController] document]; + document.selectedGroup = selectedGroup; } - (BOOL)outlineView:(NSOutlineView *)outlineView shouldShowOutlineCellForItem:(id)item { diff --git a/MacPass/MPTableView.m b/MacPass/MPTableView.m index 8403cbdf..72e6fc10 100644 --- a/MacPass/MPTableView.m +++ b/MacPass/MPTableView.m @@ -7,9 +7,17 @@ // #import "MPTableView.h" +#import "MPNotifications.h" @implementation MPTableView +- (BOOL)becomeFirstResponder { + [[NSNotificationCenter defaultCenter] postNotificationName:MPDidBecomeFirstResonderNotification + object:self + userInfo:nil]; + return YES; +} + - (void)drawBackgroundInClipRect:(NSRect)clipRect { /* We need to clear the outer areas diff --git a/MacPass/OutlineView.xib b/MacPass/OutlineView.xib index 426d4d52..0741032f 100644 --- a/MacPass/OutlineView.xib +++ b/MacPass/OutlineView.xib @@ -1054,6 +1054,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + MPOutlineView com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -1163,6 +1164,14 @@ ./Classes/HNHGradientView.h + + MPOutlineView + NSOutlineView + + IBProjectSource + ./Classes/MPOutlineView.h + + MPOutlineViewController MPViewController diff --git a/MacPass/TrashBar.xib b/MacPass/TrashBar.xib new file mode 100644 index 00000000..4b325791 --- /dev/null +++ b/MacPass/TrashBar.xib @@ -0,0 +1,377 @@ + + + + 1080 + 12E55 + 3084 + 1187.39 + 626.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 3084 + + + IBNSLayoutConstraint + NSButton + NSButtonCell + NSCustomObject + NSCustomView + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + MPEntryViewController + + + FirstResponder + + + NSApplication + + + + 268 + + + + 268 + {{71, 5}, {87, 19}} + + + _NS:9 + YES + + -2080374784 + 134217728 + Empty Trash + + LucidaGrande + 12 + 16 + + _NS:9 + + -2038153216 + 164 + + + 400 + 75 + + NO + + + {178, 30} + + + + HNHGradientView + + + + + + + trashBar + + + + 22 + + + + emptyTrash: + + + + 23 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + + + 5 + 1 + + 5 + 1 + + 20 + + 1000 + + 9 + 40 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 9 + 40 + 3 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + + + + + + 13 + + + + + + + + 14 + + + + + 18 + + + + + 20 + + + + + 21 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 23 + + + + + HNHGradientView + NSView + + IBProjectSource + ./Classes/HNHGradientView.h + + + + MPDocument + NSDocument + + emptyTrash: + id + + + emptyTrash: + + emptyTrash: + id + + + + NSView + NSImageView + + + + warningView + NSView + + + warningViewImage + NSImageView + + + + IBProjectSource + ./Classes/MPDocument.h + + + + MPEntryViewController + MPViewController + + NSButton + HNHGradientView + NSTextField + NSTableView + NSView + NSButton + NSTextField + NSSearchField + NSButton + NSButton + NSButton + NSLayoutConstraint + HNHGradientView + + + + addEntryButton + NSButton + + + bottomBar + HNHGradientView + + + entryCountTextField + NSTextField + + + entryTable + NSTableView + + + filterBar + NSView + + + filterDoneButton + NSButton + + + filterLabelTextField + NSTextField + + + filterSearchField + NSSearchField + + + filterTitleButton + NSButton + + + filterURLButton + NSButton + + + filterUsernameButton + NSButton + + + tableToTop + NSLayoutConstraint + + + trashBar + HNHGradientView + + + + IBProjectSource + ./Classes/MPEntryViewController.h + + + + MPViewController + NSViewController + + IBProjectSource + ./Classes/MPViewController.h + + + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + + + + 0 + IBCocoaFramework + YES + 3 + YES + + diff --git a/MacPass/de.lproj/Localizable.strings b/MacPass/de.lproj/Localizable.strings index 6ec2e42c..be3ab848 100644 Binary files a/MacPass/de.lproj/Localizable.strings and b/MacPass/de.lproj/Localizable.strings differ diff --git a/MacPass/en.lproj/Localizable.strings b/MacPass/en.lproj/Localizable.strings index 135e3db7..d34d6880 100644 Binary files a/MacPass/en.lproj/Localizable.strings and b/MacPass/en.lproj/Localizable.strings differ diff --git a/MacPassTests/KPKTreeLoadingTest.h b/MacPassTests/KPKLegacyLoadingTest.h similarity index 85% rename from MacPassTests/KPKTreeLoadingTest.h rename to MacPassTests/KPKLegacyLoadingTest.h index 0e59237e..d4199ae1 100644 --- a/MacPassTests/KPKTreeLoadingTest.h +++ b/MacPassTests/KPKLegacyLoadingTest.h @@ -10,7 +10,7 @@ @class KPKPassword; -@interface KPKTreeLoadingTest : SenTestCase { +@interface KPKLegacyLoadingTest : SenTestCase { @private NSData *_data; KPKPassword *_password; diff --git a/MacPassTests/KPKTreeLoadingTest.m b/MacPassTests/KPKLegacyLoadingTest.m similarity index 89% rename from MacPassTests/KPKTreeLoadingTest.m rename to MacPassTests/KPKLegacyLoadingTest.m index 0ab4637e..a627e836 100644 --- a/MacPassTests/KPKTreeLoadingTest.m +++ b/MacPassTests/KPKLegacyLoadingTest.m @@ -6,15 +6,15 @@ // Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. // -#import "KPKTreeLoadingTest.h" +#import "KPKLegacyLoadingTest.h" #import "KPKTreeCryptor.h" #import "KPKPassword.h" -@implementation KPKTreeLoadingTest +@implementation KPKLegacyLoadingTest - (void)setUp { NSBundle *myBundle = [NSBundle bundleForClass:[self class]]; - NSURL *url = [myBundle URLForResource:@"Test_Password_1234" withExtension:@"kdbx"]; + NSURL *url = [myBundle URLForResource:@"Test_Password_1234" withExtension:@"kdb"]; _data = [NSData dataWithContentsOfURL:url]; _password = [[KPKPassword alloc] initWithPassword:@"1234" key:nil]; } diff --git a/MacPassTests/KPKXmlLoadingTest.h b/MacPassTests/KPKXmlLoadingTest.h new file mode 100644 index 00000000..47476f7b --- /dev/null +++ b/MacPassTests/KPKXmlLoadingTest.h @@ -0,0 +1,18 @@ +// +// KPKXmlLoadingTest.h +// MacPass +// +// Created by Michael Starke on 23.07.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import +@class KPKPassword; + +@interface KPKXmlLoadingTest : SenTestCase { +@private + NSData *_data; + KPKPassword *_password; +} + +@end diff --git a/MacPassTests/KPKXmlLoadingTest.m b/MacPassTests/KPKXmlLoadingTest.m new file mode 100644 index 00000000..5e6429ea --- /dev/null +++ b/MacPassTests/KPKXmlLoadingTest.m @@ -0,0 +1,33 @@ +// +// KPKXmlLoadingTest.m +// MacPass +// +// Created by Michael Starke on 23.07.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import "KPKXmlLoadingTest.h" +#import "KPKTreeCryptor.h" +#import "KPKPassword.h" + +@implementation KPKXmlLoadingTest + +- (void)setUp { + NSBundle *myBundle = [NSBundle bundleForClass:[self class]]; + NSURL *url = [myBundle URLForResource:@"Test_Password_1234" withExtension:@"kdbx"]; + _data = [NSData dataWithContentsOfURL:url]; + _password = [[KPKPassword alloc] initWithPassword:@"1234" key:nil]; +} + +- (void)tearDown { + _data = nil; + _password = nil; +} + +- (void)testLoading { + KPKTreeCryptor *cryptor = [KPKTreeCryptor treeCryptorWithData:_data password:_password]; + KPKTree *tree = [cryptor decryptTree:NULL]; + STAssertNotNil(tree, @"Loading should result in a tree object"); +} + +@end