diff --git a/HNHUi b/HNHUi index 5409efc9..f274bfbe 160000 --- a/HNHUi +++ b/HNHUi @@ -1 +1 @@ -Subproject commit 5409efc9331e8543e92918f4c35e366851fa5aaa +Subproject commit f274bfbec9d964affe2f11f42c72f429cc990b69 diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index da1eb420..c09248bd 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -58,6 +58,7 @@ 4C245BF0176E1E3D0086100E /* ContextFilterLogFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C245B70176E1E3D0086100E /* ContextFilterLogFormatter.m */; }; 4C245BF1176E1E3D0086100E /* DispatchQueueLogFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C245B72176E1E3D0086100E /* DispatchQueueLogFormatter.m */; }; 4C25D58716CF0FAA00F6806C /* EntryView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C25D58616CF0FAA00F6806C /* EntryView.xib */; }; + 4C2671AD17A7D8FC00F3A645 /* HNHColorWell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2671AC17A7D8FC00F3A645 /* HNHColorWell.m */; }; 4C2724CE1778EFB100FD8456 /* NSData+Random.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2724CD1778EFB100FD8456 /* NSData+Random.m */; }; 4C2724D11778EFE300FD8456 /* NSString+Empty.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2724D01778EFE300FD8456 /* NSString+Empty.m */; }; 4C2724D41778FA0700FD8456 /* NSDate+Packed.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2724D31778FA0700FD8456 /* NSDate+Packed.m */; }; @@ -196,11 +197,12 @@ 4C888C9316EB6F5E003D34A1 /* MPToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C888C9216EB6F5E003D34A1 /* MPToolbarItem.m */; }; 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 /* MPOutlineMenuDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C8B36AA17A6ED4B005E1FF1 /* MPOutlineMenuDelegate.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 */; }; + 4CA08DA017A831B200A6544B /* MPAddEntryContextMenuDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CA08D9F17A831B200A6544B /* MPAddEntryContextMenuDelegate.m */; }; 4CA0B2ED15BCADAC00654E32 /* SettingsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CA0B2EC15BCADAC00654E32 /* SettingsWindow.xib */; }; 4CA0B2F915BCAF6700654E32 /* MPGeneralSettingsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CA0B2F815BCAF6700654E32 /* MPGeneralSettingsController.m */; }; 4CA0B2FC15BCAF8600654E32 /* MPSettingsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CA0B2FB15BCAF8600654E32 /* MPSettingsWindowController.m */; }; @@ -234,6 +236,8 @@ 4CD5D702177A5EE400100649 /* DatabaseSettingsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CD5D701177A5EE400100649 /* DatabaseSettingsWindow.xib */; }; 4CD5D705177A5F3300100649 /* MPDatabaseSettingsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD5D704177A5F3300100649 /* MPDatabaseSettingsWindowController.m */; }; 4CD6C5AE1789FDE6000891F6 /* HNHRoundedSecureTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD6C5AD1789FDE6000891F6 /* HNHRoundedSecureTextField.m */; }; + 4CD7223817A7C9EA00F5A1E1 /* WorkflowSettings.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CD7223717A7C9EA00F5A1E1 /* WorkflowSettings.xib */; }; + 4CD7223B17A7CB0700F5A1E1 /* MPWorkflowSettingsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD7223A17A7CB0700F5A1E1 /* MPWorkflowSettingsController.m */; }; 4CD78ABC16D155FF00768A1D /* 07_NotepadTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CD78AB716D155FF00768A1D /* 07_NotepadTemplate.pdf */; }; 4CD78ABD16D155FF00768A1D /* 08_SocketTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CD78AB816D155FF00768A1D /* 08_SocketTemplate.pdf */; }; 4CD78ABE16D155FF00768A1D /* 09_IdentityTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CD78AB916D155FF00768A1D /* 09_IdentityTemplate.pdf */; }; @@ -242,7 +246,7 @@ 4CD884B715BD47080042BBF8 /* DocumentWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CD884B615BD47080042BBF8 /* DocumentWindow.xib */; }; 4CDB5C421794AA4F0017667E /* KPKTree+Serializing.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CDB5C411794AA4F0017667E /* KPKTree+Serializing.m */; }; 4CDF01A316D1B76700D0AC08 /* MPEntryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CDF01A216D1B76700D0AC08 /* MPEntryViewController.m */; }; - 4CE298EB1795FC2A00DF7BDB /* MPEntryMenuDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE298EA1795FC2A00DF7BDB /* MPEntryMenuDelegate.m */; }; + 4CE298EB1795FC2A00DF7BDB /* MPEntryContextMenuDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE298EA1795FC2A00DF7BDB /* MPEntryContextMenuDelegate.m */; }; 4CE39ABF16ECE34A000FE29D /* MPIconSelectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE39ABE16ECE34A000FE29D /* MPIconSelectViewController.m */; }; 4CE39AC116ECE359000FE29D /* IconSelection.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CE39AC016ECE359000FE29D /* IconSelection.xib */; }; 4CE39AC416ECE4F7000FE29D /* MPPopupImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE39AC316ECE4F7000FE29D /* MPPopupImageView.m */; }; @@ -370,6 +374,8 @@ 4C245B71176E1E3D0086100E /* DispatchQueueLogFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DispatchQueueLogFormatter.h; sourceTree = ""; }; 4C245B72176E1E3D0086100E /* DispatchQueueLogFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DispatchQueueLogFormatter.m; sourceTree = ""; }; 4C25D58616CF0FAA00F6806C /* EntryView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = EntryView.xib; sourceTree = ""; }; + 4C2671AB17A7D8FC00F3A645 /* HNHColorWell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHColorWell.h; sourceTree = ""; }; + 4C2671AC17A7D8FC00F3A645 /* HNHColorWell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHColorWell.m; sourceTree = ""; }; 4C2724CC1778EFB100FD8456 /* NSData+Random.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Random.h"; sourceTree = ""; }; 4C2724CD1778EFB100FD8456 /* NSData+Random.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Random.m"; sourceTree = ""; }; 4C2724CF1778EFE300FD8456 /* NSString+Empty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Empty.h"; sourceTree = ""; }; @@ -626,14 +632,16 @@ 4C888C9616EB754B003D34A1 /* MPActionHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPActionHelper.m; sourceTree = ""; }; 4C8A173B1790AA41008B5C17 /* NSData+Keyfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Keyfile.h"; sourceTree = ""; }; 4C8A173C1790AA41008B5C17 /* NSData+Keyfile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Keyfile.m"; sourceTree = ""; }; - 4C8B36A917A6ED4B005E1FF1 /* MPOutlineMenuDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineMenuDelegate.h; sourceTree = ""; }; - 4C8B36AA17A6ED4B005E1FF1 /* MPOutlineMenuDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPOutlineMenuDelegate.m; sourceTree = ""; }; + 4C8B36A917A6ED4B005E1FF1 /* MPOutlineContextMenuDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineContextMenuDelegate.h; sourceTree = ""; }; + 4C8B36AA17A6ED4B005E1FF1 /* MPOutlineContextMenuDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPOutlineContextMenuDelegate.m; sourceTree = ""; }; 4C8B36AC17A734A1005E1FF1 /* HNHContextButtonSegmentedCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHContextButtonSegmentedCell.h; sourceTree = ""; }; 4C8B36AD17A734A1005E1FF1 /* HNHContextButtonSegmentedCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHContextButtonSegmentedCell.m; sourceTree = ""; }; 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 = ""; }; 4C9D6AA717615199001C660C /* HNHRoundedSecureTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHRoundedSecureTextFieldCell.h; sourceTree = ""; }; 4C9D6AA817615199001C660C /* HNHRoundedSecureTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHRoundedSecureTextFieldCell.m; sourceTree = ""; }; + 4CA08D9E17A831B200A6544B /* MPAddEntryContextMenuDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAddEntryContextMenuDelegate.h; sourceTree = ""; }; + 4CA08D9F17A831B200A6544B /* MPAddEntryContextMenuDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAddEntryContextMenuDelegate.m; sourceTree = ""; }; 4CA0B2EC15BCADAC00654E32 /* SettingsWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SettingsWindow.xib; sourceTree = ""; }; 4CA0B2F715BCAF6700654E32 /* MPGeneralSettingsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPGeneralSettingsController.h; sourceTree = ""; }; 4CA0B2F815BCAF6700654E32 /* MPGeneralSettingsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPGeneralSettingsController.m; sourceTree = ""; }; @@ -703,6 +711,9 @@ 4CD5D704177A5F3300100649 /* MPDatabaseSettingsWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPDatabaseSettingsWindowController.m; sourceTree = ""; }; 4CD6C5AC1789FDE6000891F6 /* HNHRoundedSecureTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHRoundedSecureTextField.h; sourceTree = ""; }; 4CD6C5AD1789FDE6000891F6 /* HNHRoundedSecureTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHRoundedSecureTextField.m; sourceTree = ""; }; + 4CD7223717A7C9EA00F5A1E1 /* WorkflowSettings.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WorkflowSettings.xib; sourceTree = ""; }; + 4CD7223917A7CB0700F5A1E1 /* MPWorkflowSettingsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPWorkflowSettingsController.h; sourceTree = ""; }; + 4CD7223A17A7CB0700F5A1E1 /* MPWorkflowSettingsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPWorkflowSettingsController.m; sourceTree = ""; }; 4CD78AB716D155FF00768A1D /* 07_NotepadTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 07_NotepadTemplate.pdf; sourceTree = ""; }; 4CD78AB816D155FF00768A1D /* 08_SocketTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 08_SocketTemplate.pdf; sourceTree = ""; }; 4CD78AB916D155FF00768A1D /* 09_IdentityTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 09_IdentityTemplate.pdf; sourceTree = ""; }; @@ -714,8 +725,8 @@ 4CDE28D0179C8E010036C771 /* MPDatabaseSettingsDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPDatabaseSettingsDelegate.h; sourceTree = ""; }; 4CDF01A116D1B76700D0AC08 /* MPEntryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPEntryViewController.h; sourceTree = ""; }; 4CDF01A216D1B76700D0AC08 /* MPEntryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPEntryViewController.m; sourceTree = ""; }; - 4CE298E91795FC2A00DF7BDB /* MPEntryMenuDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPEntryMenuDelegate.h; sourceTree = ""; }; - 4CE298EA1795FC2A00DF7BDB /* MPEntryMenuDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPEntryMenuDelegate.m; sourceTree = ""; }; + 4CE298E91795FC2A00DF7BDB /* MPEntryContextMenuDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPEntryContextMenuDelegate.h; sourceTree = ""; }; + 4CE298EA1795FC2A00DF7BDB /* MPEntryContextMenuDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPEntryContextMenuDelegate.m; sourceTree = ""; }; 4CE39ABD16ECE34A000FE29D /* MPIconSelectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPIconSelectViewController.h; sourceTree = ""; }; 4CE39ABE16ECE34A000FE29D /* MPIconSelectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPIconSelectViewController.m; sourceTree = ""; }; 4CE39AC016ECE359000FE29D /* IconSelection.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IconSelection.xib; sourceTree = ""; }; @@ -1106,16 +1117,18 @@ 4C3BD51416D276F800389F1F /* MPToolbarDelegate.m */, 4C811C8116ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.h */, 4C811C8216ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m */, - 4CE298E91795FC2A00DF7BDB /* MPEntryMenuDelegate.h */, - 4CE298EA1795FC2A00DF7BDB /* MPEntryMenuDelegate.m */, + 4CE298E91795FC2A00DF7BDB /* MPEntryContextMenuDelegate.h */, + 4CE298EA1795FC2A00DF7BDB /* MPEntryContextMenuDelegate.m */, + 4CA08D9E17A831B200A6544B /* MPAddEntryContextMenuDelegate.h */, + 4CA08D9F17A831B200A6544B /* MPAddEntryContextMenuDelegate.m */, 4CC0D2CC17974A47000B4BDA /* MPCustomFieldTableViewDelegate.h */, 4CC0D2CD17974A47000B4BDA /* MPCustomFieldTableViewDelegate.m */, 4CC0D2CF17974A5A000B4BDA /* MPAttachmentTableViewDelegate.h */, 4CC0D2D017974A5A000B4BDA /* MPAttachmentTableViewDelegate.m */, 4C17D8E317A1C780006C8C1E /* MPDocumentWindowDelegate.h */, 4C17D8E417A1C780006C8C1E /* MPDocumentWindowDelegate.m */, - 4C8B36A917A6ED4B005E1FF1 /* MPOutlineMenuDelegate.h */, - 4C8B36AA17A6ED4B005E1FF1 /* MPOutlineMenuDelegate.m */, + 4C8B36A917A6ED4B005E1FF1 /* MPOutlineContextMenuDelegate.h */, + 4C8B36AA17A6ED4B005E1FF1 /* MPOutlineContextMenuDelegate.m */, ); name = Delegates; sourceTree = ""; @@ -1390,6 +1403,8 @@ 4CA0B2F815BCAF6700654E32 /* MPGeneralSettingsController.m */, 4CF78062176E75AD0032EE71 /* MPServerSettingsController.h */, 4CF78063176E75AD0032EE71 /* MPServerSettingsController.m */, + 4CD7223917A7CB0700F5A1E1 /* MPWorkflowSettingsController.h */, + 4CD7223A17A7CB0700F5A1E1 /* MPWorkflowSettingsController.m */, 4C2E382416D1470200037A9D /* MPViewController.h */, 4C2E382516D1470200037A9D /* MPViewController.m */, 4C65FAE616D16DDB006E0577 /* MPPasswordInputController.h */, @@ -1507,6 +1522,8 @@ 4C52A243177D7B9F0000D88F /* HNHScrollView.m */, 4C8B36AC17A734A1005E1FF1 /* HNHContextButtonSegmentedCell.h */, 4C8B36AD17A734A1005E1FF1 /* HNHContextButtonSegmentedCell.m */, + 4C2671AB17A7D8FC00F3A645 /* HNHColorWell.h */, + 4C2671AC17A7D8FC00F3A645 /* HNHColorWell.m */, ); path = HNHUi; sourceTree = ""; @@ -1660,6 +1677,7 @@ children = ( 4C76155E1764C04C0015A1A6 /* GeneralSettings.xib */, 4CF7805E176E75110032EE71 /* ServerSettings.xib */, + 4CD7223717A7C9EA00F5A1E1 /* WorkflowSettings.xib */, ); name = Settings; sourceTree = ""; @@ -1806,6 +1824,7 @@ 4C4B7EEA17A45EC6000234C7 /* DatePickingView.xib in Resources */, 4C4B7EEF17A467E1000234C7 /* GroupInspectorView.xib in Resources */, 4C4B7EF417A467FC000234C7 /* EntryInspectorView.xib in Resources */, + 4CD7223817A7C9EA00F5A1E1 /* WorkflowSettings.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2003,7 +2022,7 @@ 4CF62B86179385D700B660B6 /* KPKAttribute.m in Sources */, 4CDB5C421794AA4F0017667E /* KPKTree+Serializing.m in Sources */, 4C5AA591179549A1008ECAD7 /* KPKXmlTreeWriter.m in Sources */, - 4CE298EB1795FC2A00DF7BDB /* MPEntryMenuDelegate.m in Sources */, + 4CE298EB1795FC2A00DF7BDB /* MPEntryContextMenuDelegate.m in Sources */, 4C055E74179620BF00BD2BAB /* NSString+CommandString.m in Sources */, 4CC0D2CE17974A47000B4BDA /* MPCustomFieldTableViewDelegate.m in Sources */, 4CC0D2D117974A5A000B4BDA /* MPAttachmentTableViewDelegate.m in Sources */, @@ -2036,8 +2055,11 @@ 4C4B7EF317A467FC000234C7 /* MPEntryInspectorViewController.m in Sources */, 4C4B7EF817A4B335000234C7 /* MPUniqueCharactersFormatter.m in Sources */, 4C5FA86D17A5F26800C781C9 /* KPKDataStreamWriter.m in Sources */, - 4C8B36AB17A6ED4B005E1FF1 /* MPOutlineMenuDelegate.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 */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/MacPass/Base.lproj/PasswordInputView.xib b/MacPass/Base.lproj/PasswordInputView.xib index 4861f3fb..8e863646 100644 --- a/MacPass/Base.lproj/PasswordInputView.xib +++ b/MacPass/Base.lproj/PasswordInputView.xib @@ -51,7 +51,6 @@ 268 {{366, 108}, {31, 25}} - _NS:22 YES @@ -84,7 +83,6 @@ 268 {{366, 139}, {31, 25}} - _NS:22 YES @@ -113,7 +111,6 @@ 268 {{167, 141}, {191, 22}} - _NS:9 YES @@ -154,7 +151,6 @@ 268 {{206, 171}, {113, 17}} - _NS:1535 YES @@ -196,7 +192,6 @@ {{238, 196}, {48, 48}} - _NS:9 YES @@ -225,7 +220,6 @@ {{164, 109}, {197, 26}} - _NS:9 YES @@ -246,7 +240,6 @@ 268 {{98, 143}, {64, 17}} - _NS:1535 YES @@ -267,7 +260,6 @@ 268 {{116, 113}, {46, 17}} - _NS:1535 YES @@ -288,7 +280,6 @@ 268 {{320, 65}, {83, 32}} - _NS:9 {250, 250} YES @@ -311,7 +302,6 @@ {524, 303} - {751, 750} NSView @@ -1207,96 +1197,7 @@ 507 - - - - HNHRoundedSecureTextField - NSSecureTextField - - toggleDisplay: - id - - - toggleDisplay: - - toggleDisplay: - id - - - - IBProjectSource - ./Classes/HNHRoundedSecureTextField.h - - - - MPPasswordInputController - MPViewController - - id - id - - - - _clearKey: - id - - - _decrypt: - id - - - - NSImageView - NSTextField - NSPathControl - HNHRoundedSecureTextField - NSButton - - - - errorImageView - NSImageView - - - errorInfoTextField - NSTextField - - - keyPathControl - NSPathControl - - - passwordTextField - HNHRoundedSecureTextField - - - togglePasswordButton - NSButton - - - - IBProjectSource - ./Classes/MPPasswordInputController.h - - - - MPViewController - NSViewController - - IBProjectSource - ./Classes/MPViewController.h - - - - NSLayoutConstraint - NSObject - - IBProjectSource - ./Classes/NSLayoutConstraint.h - - - - + 0 IBCocoaFramework YES diff --git a/MacPass/GroupInspectorView.xib b/MacPass/GroupInspectorView.xib index 9a25854a..ae313834 100644 --- a/MacPass/GroupInspectorView.xib +++ b/MacPass/GroupInspectorView.xib @@ -51,11 +51,12 @@ 268 - {{159, 99}, {81, 26}} + {{18, 99}, {222, 26}} _NS:9 + {249, 750} YES -2076180416 @@ -73,32 +74,32 @@ 400 75 - + + + Inherit Autotype Settings + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + YES OtherViews - - - Inherit - - 1048576 - 2147483647 - 1 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - _popUpItemAction: - - + - Enable + Enable Autotype 1048576 2147483647 @@ -109,7 +110,7 @@ - Disable + Disable Autotype 1048576 2147483647 @@ -132,11 +133,12 @@ 268 - {{159, 130}, {81, 26}} + {{18, 130}, {222, 26}} - + _NS:9 + {249, 750} YES -2076180416 @@ -150,25 +152,25 @@ 400 75 - + + + Inherit Search Settings + + 2147483647 + 1 + + + _popUpItemAction: + + YES OtherViews - - - Inherit - - 131072 - 2147483647 - - - _popUpItemAction: - - + - Enable + Include in Search 1048576 2147483647 @@ -179,7 +181,7 @@ - Disable + Exclude from Search 1048576 2147483647 @@ -199,71 +201,13 @@ NO - - - 268 - {{17, 104}, {66, 17}} - - - - _NS:1535 - YES - - 68157504 - 272630784 - Autotype: - - _NS:1535 - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - - - NO - - - - 268 - {{17, 135}, {50, 17}} - - - - _NS:1535 - YES - - 68157504 - 272630784 - Search: - - _NS:1535 - - - - - NO - 268 {{174, 163}, {63, 19}} - + _NS:9 YES @@ -338,7 +282,15 @@ _NS:1535 - + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + 6 System @@ -384,7 +336,7 @@ {215, 257} - + _NS:13 @@ -423,7 +375,10 @@ 6 System selectedTextColor - + + 3 + MAA + @@ -507,7 +462,7 @@ {{20, 190}, {217, 259}} - + _NS:9 {750, 750} 133138 @@ -594,7 +549,7 @@ {255, 421} - + _NS:13 @@ -627,7 +582,6 @@ {{0, 405}, {255, 16}} - _NS:26 NO 1 @@ -639,7 +593,7 @@ {255, 421} - + _NS:9 133152 @@ -741,20 +695,36 @@ 3 - - - 5 - 1 - - 6 + + + 4 + 0 + + 4 1 - - 8 + + 102 1000 - 9 - 40 + 3 + 9 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 3 @@ -773,22 +743,6 @@ 29 3 - - - 4 - 0 - - 4 - 1 - - 102 - - 1000 - - 3 - 9 - 3 - 3 @@ -805,38 +759,6 @@ 24 3 - - - 10 - 0 - - 10 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - - 9 - 40 - 3 - 4 @@ -901,38 +823,22 @@ 29 3 - + 5 - 1 - - 6 + 0 + + 5 1 - 8 + 20 1000 - 9 - 40 + 8 + 29 3 - - - 10 - 0 - - 10 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - 6 @@ -949,22 +855,6 @@ 29 3 - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - - 9 - 40 - 3 - 5 @@ -1149,8 +1039,6 @@ - - @@ -1335,42 +1223,6 @@ - - 213 - - - - - - - - 214 - - - - - 216 - - - - - 218 - - - - - - - - 219 - - - - - 222 - - - 226 @@ -1468,34 +1320,24 @@ - - 249 - - - 250 - 251 - + 255 + - 252 - + 256 + - 253 - - - - - 254 - + 263 + @@ -1516,14 +1358,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 @@ -1545,19 +1379,17 @@ 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 HNHRoundedTextFieldCell com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + @@ -1569,20 +1401,16 @@ - - - + - - - - + + @@ -1616,7 +1444,7 @@ - 254 + 263 diff --git a/MacPass/MPActionHelper.h b/MacPass/MPActionHelper.h index 231eb3ef..0fc89a62 100644 --- a/MacPass/MPActionHelper.h +++ b/MacPass/MPActionHelper.h @@ -20,7 +20,8 @@ typedef NS_ENUM(NSUInteger, MPActionType) { MPActionToggleInspector, MPActionLock, // show the lock screen MPActionEmptyTrash, // empties the trashcan, if there is one - MPActionDatabaseSettings // Show the settings for the database + MPActionDatabaseSettings, // Show the settings for the database + MPActionEditTemplateGroup }; /** * Helper to retrieve commonly used actions diff --git a/MacPass/MPActionHelper.m b/MacPass/MPActionHelper.m index eff90ca7..9251751b 100644 --- a/MacPass/MPActionHelper.m +++ b/MacPass/MPActionHelper.m @@ -25,7 +25,8 @@ @(MPActionToggleInspector) : @"toggleInspector:", @(MPActionLock) : @"lock:", @(MPActionEmptyTrash) : @"emptyTrash:", - @(MPActionDatabaseSettings) : @"showDatabaseSettings:" + @(MPActionDatabaseSettings) : @"showDatabaseSettings:", + @(MPActionEditTemplateGroup) : @"editTemplateGroup:" }; }); return actionDict; diff --git a/MacPass/MPAddEntryContextMenuDelegate.h b/MacPass/MPAddEntryContextMenuDelegate.h new file mode 100644 index 00000000..ce665832 --- /dev/null +++ b/MacPass/MPAddEntryContextMenuDelegate.h @@ -0,0 +1,13 @@ +// +// MPAddEntryContextMenuDelegate.h +// MacPass +// +// Created by Michael Starke on 30.07.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import + +@interface MPAddEntryContextMenuDelegate : NSObject + +@end diff --git a/MacPass/MPAddEntryContextMenuDelegate.m b/MacPass/MPAddEntryContextMenuDelegate.m new file mode 100644 index 00000000..af677706 --- /dev/null +++ b/MacPass/MPAddEntryContextMenuDelegate.m @@ -0,0 +1,43 @@ +// +// MPAddEntryContextMenuDelegate.m +// MacPass +// +// Created by Michael Starke on 30.07.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import "MPAddEntryContextMenuDelegate.h" +#import "MPDocument.h" +#import "MPDocumentWindowController.h" +#import "MPActionHelper.h" + +#import "KdbGroup+MPTreeTools.h" + +#define EDIT_TEMPLATES_ITEM_TAG 10; + +@implementation MPAddEntryContextMenuDelegate + +- (void)menuNeedsUpdate:(NSMenu *)menu { + /* + The Method is rather brute force + It's possible nicer to cache the entries and just update + the menu entries, that actuyll need updating + */ + MPDocument *document = [[NSDocumentController sharedDocumentController] currentDocument]; + if(!document) { + [menu removeAllItems]; + } + [menu removeAllItems]; + [menu addItemWithTitle:NSLocalizedString(@"EDIT_TEMPLATE_GROUP", "") action:[MPActionHelper actionOfType:MPActionEditTemplateGroup] keyEquivalent:@""]; + [menu addItem:[NSMenuItem separatorItem]]; + for(KdbEntry *entry in [document.templates childEntries]) { + NSString *templateMask = NSLocalizedString(@"NEW_ENTRY_WITH_TEMPLATE_%@", ""); + NSMenuItem *templateItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:[NSString stringWithFormat:templateMask, entry.title] + action:@selector(createEntryFromTemplate:) + keyEquivalent:@""]; + [templateItem setRepresentedObject:entry]; + [menu addItem:templateItem]; + } +} + +@end diff --git a/MacPass/MPContextToolbarButton.h b/MacPass/MPContextToolbarButton.h index 413239ec..b7aea3de 100644 --- a/MacPass/MPContextToolbarButton.h +++ b/MacPass/MPContextToolbarButton.h @@ -11,4 +11,5 @@ @interface MPContextToolbarButton : NSSegmentedControl - (void)setImage:(NSImage *)image; + @end diff --git a/MacPass/MPContextToolbarButton.m b/MacPass/MPContextToolbarButton.m index 127854f0..840cfd2d 100644 --- a/MacPass/MPContextToolbarButton.m +++ b/MacPass/MPContextToolbarButton.m @@ -16,25 +16,23 @@ self = [super initWithFrame:frame]; if (self) { [self setFocusRingType:NSFocusRingTypeNone]; - [self setSegmentCount:2]; - [[self cell] setTag:-1 forSegment:0]; - [[self cell] setTag:-1 forSegment:1]; - [[self cell] setWidth:15 forSegment:1]; + [self setSegmentCount:1]; [[self cell] setTrackingMode:NSSegmentSwitchTrackingMomentary]; [self setSegmentStyle:NSSegmentStyleTexturedSquare]; - NSMutableData *data = [[NSMutableData alloc] init]; - NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data]; - [[self cell] encodeWithCoder:archiver]; - [archiver finishEncoding]; - - NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; - HNHContextButtonSegmentedCell *cell = [[HNHContextButtonSegmentedCell alloc] initWithCoder:unarchiver]; - [unarchiver finishDecoding]; - [self setCell:cell]; +// NSMutableData *data = [[NSMutableData alloc] init]; +// NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data]; +// [[self cell] encodeWithCoder:archiver]; +// [archiver finishEncoding]; +// +// NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; +// HNHContextButtonSegmentedCell *cell = [[HNHContextButtonSegmentedCell alloc] initWithCoder:unarchiver]; +// [unarchiver finishDecoding]; +// [self setCell:cell]; } return self; } + /* Block the segment setter to prevent accidential settings */ @@ -45,7 +43,7 @@ } - (void)setSegmentCount:(NSInteger)count { - if(count == 2) { + if(count == 1) { [super setSegmentCount:count]; } } diff --git a/MacPass/MPDatabaseSettingsWindowController.m b/MacPass/MPDatabaseSettingsWindowController.m index 68ae17f9..86d220f2 100644 --- a/MacPass/MPDatabaseSettingsWindowController.m +++ b/MacPass/MPDatabaseSettingsWindowController.m @@ -318,6 +318,7 @@ if(tree) { [self.defaultUsernameTextField setStringValue:tree.defaultUserName]; [self.defaultUsernameTextField setEditable:YES]; + [self _updateTemplateGroup:tree]; } else { [self.defaultUsernameTextField setStringValue:_missingFeature]; @@ -357,11 +358,12 @@ } - (void)_updateTemplateGroup:(Kdb4Tree *)tree { - // + NSMenu *menu = [self _buildTemplateTreeMenu:tree]; + [self.templateGroupPopUpButton setMenu:menu]; } - (NSMenu *)_buildTrashTreeMenu:(Kdb4Tree *)tree { - NSMenu *menu = [self _buildTreeMenu:tree]; + NSMenu *menu = [self _buildTreeMenu:tree preselect:tree.recycleBinUuid]; NSMenuItem *selectItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"AUTOCREATE_TRASH_FOLDER", @"Menu item for automatic trash creation") action:NULL @@ -373,7 +375,7 @@ } - (NSMenu *)_buildTemplateTreeMenu:(Kdb4Tree *)tree { - NSMenu *menu = [self _buildTreeMenu:tree]; + NSMenu *menu = [self _buildTreeMenu:tree preselect:tree.entryTemplatesGroup]; NSMenuItem *selectItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"NO_TEMPLATE_GROUP", @"Menu item to reset the template groups") action:NULL @@ -385,17 +387,22 @@ } -- (NSMenu *)_buildTreeMenu:(Kdb4Tree *)tree { +- (NSMenu *)_buildTreeMenu:(Kdb4Tree *)tree preselect:(UUID *)uuid { NSMenu *menu = [[NSMenu alloc] init]; [menu setAutoenablesItems:NO]; + + /* + Trash and Templates can be nested, so wee need to adhere to this :( + */ + for(Kdb4Group *group in tree.root.groups) { NSMenuItem *groupItem = [[NSMenuItem alloc] init]; [groupItem setImage:group.icon]; [groupItem setTitle:group.name]; [groupItem setRepresentedObject:group]; [groupItem setEnabled:YES]; - if([group.uuid isEqual:tree.recycleBinUuid]) { + if(uuid && [group.uuid isEqual:uuid]) { [groupItem setState:NSOnState]; } [menu addItem:groupItem]; diff --git a/MacPass/MPDocument.h b/MacPass/MPDocument.h index 03cee62f..3a64ea2f 100644 --- a/MacPass/MPDocument.h +++ b/MacPass/MPDocument.h @@ -108,7 +108,7 @@ APPKIT_EXTERN NSString *const MPDocumnetDidChangeCurrentEntryNotification; - (void)deleteEntry:(KdbEntry *)entry; - (IBAction)emptyTrash:(id)sender; - +- (IBAction)createEntryFromTemplate:(id)sender; @end @interface MPDocument (Attachments) diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index f7118655..befec16f 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -392,8 +392,11 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { } - (void)useGroupAsTemplate:(KdbGroup *)group { + if(self.version != MPDatabaseVersion4) { + return; // wrong database version + } Kdb4Group *groupv4 = (Kdb4Group *)group; - if([self.treeV4.entryTemplatesGroup isEqual:groupv4.uuid]) { + if(![self.treeV4.entryTemplatesGroup isEqual:groupv4.uuid]) { self.treeV4.entryTemplatesGroup = groupv4.uuid; } } @@ -529,6 +532,15 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { } } +- (void)createEntryFromTemplate:(id)sender { + NSMenuItem *item = sender; + KdbEntry *entry = [item representedObject]; + if(entry) { + // Create Entry from template; + } + return; +} + - (BOOL)validateUserInterfaceItem:(id)anItem { if([anItem action] == [MPActionHelper actionOfType:MPActionEmptyTrash]) { BOOL hasGroups = [self.trash.groups count] > 0; diff --git a/MacPass/MPDocumentWindowController.m b/MacPass/MPDocumentWindowController.m index 310b1956..2b59c637 100644 --- a/MacPass/MPDocumentWindowController.m +++ b/MacPass/MPDocumentWindowController.m @@ -20,6 +20,8 @@ #import "MPSettingsHelper.h" #import "MPDocumentWindowDelegate.h" +#import "MPContextToolbarButton.h" + @interface MPDocumentWindowController () { @private id _firstResponder; diff --git a/MacPass/MPEntryMenuDelegate.h b/MacPass/MPEntryContextMenuDelegate.h similarity index 81% rename from MacPass/MPEntryMenuDelegate.h rename to MacPass/MPEntryContextMenuDelegate.h index 322a3fd8..5a16c1e9 100644 --- a/MacPass/MPEntryMenuDelegate.h +++ b/MacPass/MPEntryContextMenuDelegate.h @@ -9,7 +9,7 @@ #import @class MPEntryViewController; -@interface MPEntryMenuDelegate : NSObject +@interface MPEntryContextMenuDelegate : NSObject @property (weak) MPEntryViewController *viewController; diff --git a/MacPass/MPEntryMenuDelegate.m b/MacPass/MPEntryContextMenuDelegate.m similarity index 95% rename from MacPass/MPEntryMenuDelegate.m rename to MacPass/MPEntryContextMenuDelegate.m index 555bf0bb..f6aa05ed 100644 --- a/MacPass/MPEntryMenuDelegate.m +++ b/MacPass/MPEntryContextMenuDelegate.m @@ -6,7 +6,7 @@ // Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. // -#import "MPEntryMenuDelegate.h" +#import "MPEntryContextMenuDelegate.h" #import "MPEntryViewController.h" #import "Kdb4Node.h" @@ -14,7 +14,7 @@ static NSUInteger const kMPCustomFieldMenuItem = 1000; static NSUInteger const kMPAttachmentsMenuItem = 2000; -@implementation MPEntryMenuDelegate +@implementation MPEntryContextMenuDelegate - (void)menuNeedsUpdate:(NSMenu *)menu { NSMenuItem *fieldsMenu = [menu itemWithTag:kMPCustomFieldMenuItem]; diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m index 1f061668..316be541 100644 --- a/MacPass/MPEntryViewController.m +++ b/MacPass/MPEntryViewController.m @@ -21,7 +21,7 @@ #import "MPConstants.h" #import "MPEntryTableDataSource.h" #import "MPStringLengthValueTransformer.h" -#import "MPEntryMenuDelegate.h" +#import "MPEntryContextMenuDelegate.h" #import "HNHTableHeaderCell.h" #import "HNHGradientView.h" @@ -64,7 +64,7 @@ NSString *const _toggleFilterTitleButton = @"SearchTitle"; NSString *const _toggleFilterUsernameButton = @"SearchUsername"; @interface MPEntryViewController () { - MPEntryMenuDelegate *_menuDelegate; + MPEntryContextMenuDelegate *_menuDelegate; } @property (strong) NSArrayController *entryArrayController; @@ -113,7 +113,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; _entryArrayController = [[NSArrayController alloc] init]; _dataSource = [[MPEntryTableDataSource alloc] init]; _dataSource.viewController = self; - _menuDelegate = [[MPEntryMenuDelegate alloc] init]; + _menuDelegate = [[MPEntryContextMenuDelegate alloc] init]; _menuDelegate.viewController = self; _selectedEntry = nil; @@ -625,6 +625,10 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; if(0 == [[self.entryArrayController arrangedObjects] count]) { return; // No data available } + NSInteger columnIndex = [self.entryTable clickedColumn]; + if(columnIndex < 0 || columnIndex >= [[self.entryTable tableColumns] count]) { + return; // No Colum to use + } NSTableColumn *column = [self.entryTable tableColumns][[self.entryTable clickedColumn]]; NSString *identifier = [column identifier]; if([identifier isEqualToString:MPEntryTablePasswordColumnIdentifier]) { diff --git a/MacPass/MPGeneralSettingsController.m b/MacPass/MPGeneralSettingsController.m index 8b39da1b..9380d0f4 100644 --- a/MacPass/MPGeneralSettingsController.m +++ b/MacPass/MPGeneralSettingsController.m @@ -23,7 +23,7 @@ NSString *const MPGeneralSetingsIdentifier = @"GeneralSettingsTab"; } - (NSImage *)image { - return [MPIconHelper icon:MPIconWarning]; + return [NSImage imageNamed:NSImageNamePreferencesGeneral]; } - (NSString *)label { diff --git a/MacPass/MPOutlineMenuDelegate.h b/MacPass/MPOutlineContextMenuDelegate.h similarity index 81% rename from MacPass/MPOutlineMenuDelegate.h rename to MacPass/MPOutlineContextMenuDelegate.h index ceae57d8..ea1764d6 100644 --- a/MacPass/MPOutlineMenuDelegate.h +++ b/MacPass/MPOutlineContextMenuDelegate.h @@ -10,7 +10,7 @@ @class MPOutlineViewController; -@interface MPOutlineMenuDelegate : NSObject +@interface MPOutlineContextMenuDelegate : NSObject @property (weak) MPOutlineViewController *viewController; diff --git a/MacPass/MPOutlineMenuDelegate.m b/MacPass/MPOutlineContextMenuDelegate.m similarity index 80% rename from MacPass/MPOutlineMenuDelegate.m rename to MacPass/MPOutlineContextMenuDelegate.m index 0df808bf..2dd3f0a2 100644 --- a/MacPass/MPOutlineMenuDelegate.m +++ b/MacPass/MPOutlineContextMenuDelegate.m @@ -6,7 +6,7 @@ // Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. // -#import "MPOutlineMenuDelegate.h" +#import "MPOutlineContextMenuDelegate.h" #import "MPOutlineViewController.h" #import "MPRootAdapter.h" @@ -23,7 +23,7 @@ NSString *const _MPOutlineMenuTrashItem = @"TrashItem"; NSString *const _MPOutlineMenuRoot = @"Root"; NSString *const _MPOutlineMenuTemplate = @"Template"; -@implementation MPOutlineMenuDelegate +@implementation MPOutlineContextMenuDelegate - (void)menuNeedsUpdate:(NSMenu *)menu { /* @@ -47,6 +47,9 @@ NSString *const _MPOutlineMenuTemplate = @"Template"; if(group && document.trash == group) { [self _updateTrashMenu:menu]; } + else if( group && document.templates == group) { + [self _updateTemplateMenu:menu]; + } else if([document isItemTrashed:group]) { [self _updateTrashItemMenu:menu]; } @@ -100,6 +103,21 @@ NSString *const _MPOutlineMenuTemplate = @"Template"; [menu setTitle:_MPOutlineMenuTrashItem]; } +- (void)_updateTemplateMenu:(NSMenu *)menu { + if([[menu title] isEqualToString:_MPOutlineMenuTemplate]) { + return; // nothing to do, all fine + } + [menu removeAllItems]; + [menu addItemWithTitle:NSLocalizedString(@"EDIT_TEMPLATE_GROUP", "") + action:[MPActionHelper actionOfType:MPActionEditTemplateGroup] + keyEquivalent:@""]; + [menu addItem:[NSMenuItem separatorItem]]; + for(NSMenuItem *item in [MPContextMenuHelper contextMenuItemsWithItems:MPContextMenuMinimal]) { + [menu addItem:item]; + } + [menu setTitle:_MPOutlineMenuTemplate]; +} + - (void)_updateDefaultMenu:(NSMenu *)menu { if([[menu title] isEqualToString:_MPOutlineMenuDefault]) { diff --git a/MacPass/MPOutlineViewController.m b/MacPass/MPOutlineViewController.m index 3608ee8d..815ac450 100644 --- a/MacPass/MPOutlineViewController.m +++ b/MacPass/MPOutlineViewController.m @@ -17,7 +17,7 @@ #import "MPUppercaseStringValueTransformer.h" #import "MPRootAdapter.h" #import "MPNotifications.h" -#import "MPOutlineMenuDelegate.h" +#import "MPOutlineContextMenuDelegate.h" #import "KdbLib.h" #import "Kdb4Node.h" @@ -32,7 +32,7 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; @interface MPOutlineViewController () { BOOL _bindingEstablished; - MPOutlineMenuDelegate *_menuDelegate; + MPOutlineContextMenuDelegate *_menuDelegate; } @property (weak) IBOutlet NSOutlineView *outlineView; @@ -59,7 +59,7 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; _bindingEstablished = NO; _datasource = [[MPOutlineDataSource alloc] init]; _databaseNameWrapper = NSLocalizedString(@"NEW_DATABASE", "Name for a newly created Database"); - _menuDelegate = [[MPOutlineMenuDelegate alloc] init]; + _menuDelegate = [[MPOutlineContextMenuDelegate alloc] init]; _menuDelegate.viewController = self; } diff --git a/MacPass/MPPasswordCreatorViewController.m b/MacPass/MPPasswordCreatorViewController.m index 1cbe12a9..83f752df 100644 --- a/MacPass/MPPasswordCreatorViewController.m +++ b/MacPass/MPPasswordCreatorViewController.m @@ -12,13 +12,24 @@ #import "MPUniqueCharactersFormatter.h" typedef NS_ENUM(NSUInteger, MPPasswordRating) { - MPPasswordTerrible, - MPPasswordWeak, - MPPasswordOk, - MPPasswordGood, - MPPasswordStrong + MPPasswordTerrible = 10, + MPPasswordWeak = 20, + MPPasswordOk = 30, + MPPasswordGood = 50, + MPPasswordStrong = 60 }; + +/* + + 0 - 20 Terrible + 21 - 31 Weak + 32 - 55 Good + 56 - 85 Excellent + 85 - Fantastic + + Skale 0-90 + */ #define MIN_PASSWORD_LENGTH 1 #define MAX_PASSWORD_LENGTH 64 diff --git a/MacPass/MPServerSettingsController.m b/MacPass/MPServerSettingsController.m index a4352e84..22053b62 100644 --- a/MacPass/MPServerSettingsController.m +++ b/MacPass/MPServerSettingsController.m @@ -21,7 +21,7 @@ } - (NSImage *)image { - return [MPIconHelper icon:MPIconServer]; + return [NSImage imageNamed:NSImageNameNetwork]; } - (NSString *)label { diff --git a/MacPass/MPSettingsWindowController.m b/MacPass/MPSettingsWindowController.m index 5cf62b7b..58c38b68 100644 --- a/MacPass/MPSettingsWindowController.m +++ b/MacPass/MPSettingsWindowController.m @@ -9,6 +9,7 @@ #import "MPSettingsWindowController.h" #import "MPGeneralSettingsController.h" #import "MPServerSettingsController.h" +#import "MPWorkflowSettingsController.h" @interface MPSettingsWindowController () { NSString *lastIdentifier; @@ -109,11 +110,15 @@ - (void)_setupDefaultSettingsTabs { MPGeneralSettingsController *generalSettingsController = [[MPGeneralSettingsController alloc] init]; MPServerSettingsController *serverSettingsController = [[MPServerSettingsController alloc] init]; + MPWorkflowSettingsController *workflowSettingsController = [[MPWorkflowSettingsController alloc] init]; [self _addSettingsTab:generalSettingsController]; [self _addSettingsTab:serverSettingsController]; + [self _addSettingsTab:workflowSettingsController]; - self.defaultToolbarItems = @[ [generalSettingsController identifier], [serverSettingsController identifier] ]; + self.defaultToolbarItems = @[ [generalSettingsController identifier], + [workflowSettingsController identifier], + [serverSettingsController identifier] ]; } diff --git a/MacPass/MPToolbarDelegate.m b/MacPass/MPToolbarDelegate.m index eb16b297..b7107a53 100644 --- a/MacPass/MPToolbarDelegate.m +++ b/MacPass/MPToolbarDelegate.m @@ -14,6 +14,7 @@ #import "MPActionHelper.h" #import "MPContextMenuHelper.h" #import "MPContextToolbarButton.h" +#import "MPAddEntryContextMenuDelegate.h" NSString *const MPToolbarItemLock = @"TOOLBAR_LOCK"; NSString *const MPToolbarItemAddGroup = @"TOOLBAR_ADD_GROUP"; @@ -22,7 +23,9 @@ NSString *const MPToolbarItemDelete =@"TOOLBAR_DELETE"; NSString *const MPToolbarItemAction = @"TOOLBAR_ACTION"; NSString *const MPToolbarItemInspector = @"TOOLBAR_INSPECTOR"; -@interface MPToolbarDelegate() +@interface MPToolbarDelegate() { + MPAddEntryContextMenuDelegate *_entryMenuDelegate; +} @property (strong) NSMutableDictionary *toolbarItems; @property (strong) NSArray *toolbarIdentifiers; @@ -42,6 +45,7 @@ NSString *const MPToolbarItemInspector = @"TOOLBAR_INSPECTOR"; _toolbarIdentifiers = @[ MPToolbarItemAddEntry, MPToolbarItemDelete, MPToolbarItemAddGroup, MPToolbarItemAction, NSToolbarFlexibleSpaceItemIdentifier, MPToolbarItemLock, MPToolbarItemInspector ]; _toolbarImages = [self createToolbarImages]; _toolbarItems = [[NSMutableDictionary alloc] initWithCapacity:[self.toolbarIdentifiers count]]; + _entryMenuDelegate = [[MPAddEntryContextMenuDelegate alloc] init]; } return self; } @@ -91,8 +95,9 @@ NSString *const MPToolbarItemInspector = @"TOOLBAR_INSPECTOR"; [button sizeToFit]; NSMenu *menu = [NSMenu allocWithZone:[NSMenu menuZone]]; - [menu addItemWithTitle:@"Test" action:NULL keyEquivalent:@""]; - [[button cell] setMenu:menu forSegment:1]; + [menu addItemWithTitle:@"Dummy" action:NULL keyEquivalent:@""]; + [menu setDelegate:_entryMenuDelegate]; + [[button cell] setMenu:menu forSegment:0]; NSRect fittingRect = [button frame]; @@ -113,7 +118,7 @@ NSString *const MPToolbarItemInspector = @"TOOLBAR_INSPECTOR"; [button setImage:image]; [button sizeToFit]; [button setAction:[self _actionForToolbarItemIdentifier:itemIdentifier]]; - + NSRect fittingRect = [button frame]; fittingRect.size.width = MAX( (CGFloat)32.0,fittingRect.size.width); [button setFrame:fittingRect]; diff --git a/MacPass/MPWorkflowSettingsController.h b/MacPass/MPWorkflowSettingsController.h new file mode 100644 index 00000000..6ff621e4 --- /dev/null +++ b/MacPass/MPWorkflowSettingsController.h @@ -0,0 +1,14 @@ +// +// MPWorkflowSettingsController.h +// MacPass +// +// Created by Michael Starke on 30.07.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import "MPViewController.h" +#import "MPSettingsTab.h" + +@interface MPWorkflowSettingsController : MPViewController + +@end diff --git a/MacPass/MPWorkflowSettingsController.m b/MacPass/MPWorkflowSettingsController.m new file mode 100644 index 00000000..80651070 --- /dev/null +++ b/MacPass/MPWorkflowSettingsController.m @@ -0,0 +1,42 @@ +// +// MPWorkflowSettingsController.m +// MacPass +// +// Created by Michael Starke on 30.07.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import "MPWorkflowSettingsController.h" + +@interface MPWorkflowSettingsController () + +@end + +@implementation MPWorkflowSettingsController + +- (id)init { + self = [self initWithNibName:@"WorkflowSettings" bundle:nil]; + return self; +} + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + } + + return self; +} + +- (NSString *)identifier { + return @"WorkflowSettings"; +} + +- (NSImage *)image { + return [NSImage imageNamed:NSImageNameAdvanced]; +} + +- (NSString *)label { + return NSLocalizedString(@"WORKFLOW", ""); +} + +@end diff --git a/MacPass/MacPass-Info.plist b/MacPass/MacPass-Info.plist index 26d9dc8a..71d05b9a 100644 --- a/MacPass/MacPass-Info.plist +++ b/MacPass/MacPass-Info.plist @@ -48,7 +48,7 @@ CFBundleSignature ???? CFBundleVersion - 2524 + 2525 LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHumanReadableCopyright diff --git a/MacPass/PasswordCreatorView.xib b/MacPass/PasswordCreatorView.xib index 5c0f8786..418dbac3 100644 --- a/MacPass/PasswordCreatorView.xib +++ b/MacPass/PasswordCreatorView.xib @@ -167,10 +167,10 @@ 0 _NS:9 - 2 - 2 - 2 - 2 + 10 + 90 + 55 + 30 1 NO @@ -267,7 +267,6 @@ {{226, 18}, {100, 25}} - _NS:22 YES @@ -1078,6 +1077,22 @@ 24 2 + + + 3 + 0 + + 4 + 1 + + 12 + + 1000 + + 9 + 40 + 3 + 4 @@ -1090,8 +1105,8 @@ 1000 - 8 - 29 + 9 + 40 3 @@ -1106,8 +1121,8 @@ 1000 - 6 - 24 + 9 + 40 3 @@ -1186,8 +1201,8 @@ 1000 - 6 - 24 + 9 + 40 3 @@ -1298,8 +1313,8 @@ 1000 - 3 - 9 + 9 + 40 3 @@ -1916,11 +1931,6 @@ - - 517 - - - 518 @@ -2129,15 +2139,25 @@ + + 681 + + + 680 - 681 - - + 517 + + + + + 684 + + @@ -2145,7 +2165,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + @@ -2163,6 +2183,7 @@ + @@ -2315,12 +2336,13 @@ com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - 681 + 684 diff --git a/MacPass/WorkflowSettings.xib b/MacPass/WorkflowSettings.xib new file mode 100644 index 00000000..e4cf150d --- /dev/null +++ b/MacPass/WorkflowSettings.xib @@ -0,0 +1,844 @@ + + + + 1080 + 12E55 + 3084 + 1187.39 + 626.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 3084 + + + IBNSLayoutConstraint + NSBox + NSCustomObject + NSCustomView + NSMenu + NSMenuItem + NSPopUpButton + NSPopUpButtonCell + NSTextField + NSTextFieldCell + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + MPWorkflowSettingsController + + + FirstResponder + + + NSApplication + + + + 268 + + + + 12 + + + + 274 + + + + 268 + {{19, 47}, {138, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + Double-click on URL: + + LucidaGrande + 13 + 1044 + + _NS:1535 + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + NO + + + + 268 + {{160, 42}, {106, 26}} + + + + _NS:9 + YES + + -1539309504 + 2048 + + _NS:9 + + 109199360 + 129 + + + 400 + 75 + + + Copies URL + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + + + + Opens URL + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + -1 + 1 + YES + YES + 2 + + NO + + + + 268 + {{15, 16}, {142, 17}} + + + + _NS:1535 + YES + + 605028416 + 272630784 + Double-click on Title: + + _NS:1535 + + + + + NO + + + + 268 + {{160, 11}, {138, 26}} + + + _NS:9 + YES + + -1539309504 + 2048 + + _NS:9 + + 109199360 + 129 + + + 400 + 75 + + + Opens Inspector + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + OtherViews + + + + + is Ignored + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + -1 + 1 + YES + YES + 2 + + NO + + + {{1, 1}, {364, 76}} + + + + _NS:11 + + + {{17, 16}, {366, 92}} + + + + _NS:9 + {0, 0} + + 67108864 + 0 + Entry Table + + LucidaGrande + 11 + 3100 + + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 1 + 0 + 2 + NO + + + {400, 128} + + + + NSView + + + + + + + view + + + + 52 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 8 + 0 + + 0 + 1 + + 128 + + 1000 + + 9 + 40 + 1 + + + + 7 + 0 + + 0 + 1 + + 400 + + 1000 + + 9 + 40 + 1 + + + + + + 2 + + + + + 4 + 0 + + 4 + 1 + + 11 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 3 + 0 + + 3 + 1 + + 25 + + 1000 + + 8 + 29 + 3 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 16 + + 1000 + + 8 + 29 + 3 + + + + + + + + + + 3 + + + + + 5 + + + + + 8 + + + + + 9 + + + + + + + + 10 + + + + + 13 + + + + + + + + 14 + + + + + + + + 15 + + + + + + + + + 16 + + + + + 17 + + + + + 29 + + + + + 31 + + + + + 36 + + + + + + + + 37 + + + + + 38 + + + + + 40 + + + + + + + + 41 + + + + + + + + 42 + + + + + + + + + 43 + + + + + 44 + + + + + 46 + + + + + 47 + + + + + 48 + + + + + 49 + + + + + 50 + + + + + 51 + + + + + 53 + + + + + 54 + + + + + + + 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 + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 54 + + + + + MPViewController + NSViewController + + IBProjectSource + ./Classes/MPViewController.h + + + + MPWorkflowSettingsController + MPViewController + + IBProjectSource + ./Classes/MPWorkflowSettingsController.h + + + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + + + + 0 + IBCocoaFramework + YES + 3 + + {11, 11} + {10, 3} + + YES + + diff --git a/MacPass/de.lproj/GeneralSettings.strings b/MacPass/de.lproj/GeneralSettings.strings index bda05754..f8bd587a 100644 --- a/MacPass/de.lproj/GeneralSettings.strings +++ b/MacPass/de.lproj/GeneralSettings.strings @@ -30,7 +30,7 @@ "928.title" = "Allgemeine"; /* Class = "NSButtonCell"; title = "Double-click entry URL to Launch"; ObjectID = "937"; */ -"937.title" = "Doppelklicken Sie auf Eintrag URL zu öffnen"; +"937.title" = "Doppelklick auf URL öffnet Website"; /* Class = "NSMenu"; title = "LockTimes"; ObjectID = "586"; */ "586.title" = "LockTimes"; diff --git a/MacPass/en.lproj/Localizable.strings b/MacPass/en.lproj/Localizable.strings index ad20dd61..08d3ba1f 100644 Binary files a/MacPass/en.lproj/Localizable.strings and b/MacPass/en.lproj/Localizable.strings differ