diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index 0f98ee73..f289c1ed 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -122,7 +122,7 @@ 4C77E37D15B84A240093A587 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C77E37B15B84A240093A587 /* MainMenu.xib */; }; 4C79DF2A176685870083708F /* HNHRoundedTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C79DF29176685870083708F /* HNHRoundedTextField.m */; }; 4C7E832A172DE2F2002493D8 /* MPPasswordEditViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C7E8329172DE2F2002493D8 /* MPPasswordEditViewController.m */; }; - 4C80BB6F176DE06F00E5E248 /* HNHFlippedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C80BB6E176DE06F00E5E248 /* HNHFlippedView.m */; }; + 4C80BB6F176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C80BB6E176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.m */; }; 4C811C8316ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C811C8216ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m */; }; 4C83814215BF4677001AE468 /* MPDocumentWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C83814115BF4677001AE468 /* MPDocumentWindowController.m */; }; 4C888C9016EB6C91003D34A1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4C888C8E16EB6C91003D34A1 /* Localizable.strings */; }; @@ -407,8 +407,8 @@ 4C79DF2F1766941D0083708F /* MPResponderQuery.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPResponderQuery.h; sourceTree = ""; }; 4C7E8328172DE2F2002493D8 /* MPPasswordEditViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPasswordEditViewController.h; sourceTree = ""; }; 4C7E8329172DE2F2002493D8 /* MPPasswordEditViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPPasswordEditViewController.m; sourceTree = ""; }; - 4C80BB6D176DE06F00E5E248 /* HNHFlippedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHFlippedView.h; sourceTree = ""; }; - 4C80BB6E176DE06F00E5E248 /* HNHFlippedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHFlippedView.m; sourceTree = ""; }; + 4C80BB6D176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHScrollDocumentViewAdapter.h; sourceTree = ""; }; + 4C80BB6E176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHScrollDocumentViewAdapter.m; sourceTree = ""; }; 4C811C8116ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPKeyfilePathControlDelegate.h; sourceTree = ""; }; 4C811C8216ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPKeyfilePathControlDelegate.m; sourceTree = ""; }; 4C83814015BF4677001AE468 /* MPDocumentWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPDocumentWindowController.h; sourceTree = ""; }; @@ -453,6 +453,7 @@ 4CB9339816D3A0DD00A13B5D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; 4CBA2AB617074B59006D8139 /* MPSettingsHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSettingsHelper.h; sourceTree = ""; }; 4CBA2AB917074C07006D8139 /* MPSettingsHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSettingsHelper.m; sourceTree = ""; }; + 4CC0B8DA1773729F00311E8C /* MPFirstResonderNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPFirstResonderNotification.h; sourceTree = ""; }; 4CC1AEBC16D4467C006D2AAB /* KdbTree+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbTree+MPAdditions.h"; sourceTree = ""; }; 4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbTree+MPAdditions.m"; sourceTree = ""; }; 4CC299FD176F99E50050C939 /* MPRequestHandlerService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRequestHandlerService.h; sourceTree = ""; }; @@ -993,6 +994,7 @@ 4CF6C715176F5183007A811D /* MPServerRequestHandler.h */, 4CA0B30D15BCB6FD00654E32 /* MPSettingsTab.h */, 4C79DF2F1766941D0083708F /* MPResponderQuery.h */, + 4CC0B8DA1773729F00311E8C /* MPFirstResonderNotification.h */, ); name = Protocolls; sourceTree = ""; @@ -1075,8 +1077,8 @@ 4C37A6721769393300AD0A40 /* HNHTableHeaderCell.m */, 4C099931176D4EA600C885CB /* HNHScrollView.h */, 4C099932176D4EA600C885CB /* HNHScrollView.m */, - 4C80BB6D176DE06F00E5E248 /* HNHFlippedView.h */, - 4C80BB6E176DE06F00E5E248 /* HNHFlippedView.m */, + 4C80BB6D176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.h */, + 4C80BB6E176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.m */, 4CF78058176E6D5F0032EE71 /* HNHTableRowView.h */, 4CF78059176E6D5F0032EE71 /* HNHTableRowView.m */, ); @@ -1354,7 +1356,7 @@ 4C37A6731769393300AD0A40 /* HNHTableHeaderCell.m in Sources */, 4C099933176D4EA600C885CB /* HNHScrollView.m in Sources */, 4CA2335A176DBFE100F0B6AC /* MPLockDaemon.m in Sources */, - 4C80BB6F176DE06F00E5E248 /* HNHFlippedView.m in Sources */, + 4C80BB6F176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.m in Sources */, 4C245B76176E1E3D0086100E /* DDData.m in Sources */, 4C245B77176E1E3D0086100E /* DDNumber.m in Sources */, 4C245B78176E1E3D0086100E /* DDRange.m in Sources */, diff --git a/MacPass/Base.lproj/GeneralSettings.xib b/MacPass/Base.lproj/GeneralSettings.xib index 19e31600..41b0b479 100644 --- a/MacPass/Base.lproj/GeneralSettings.xib +++ b/MacPass/Base.lproj/GeneralSettings.xib @@ -134,7 +134,7 @@ _NS:1535 - + 6 System controlColor @@ -143,7 +143,7 @@ MC42NjY2NjY2NjY3AA - + 6 System controlTextColor @@ -251,7 +251,7 @@ {{16, 70}, {172, 18}} - + _NS:9 {250, 251} YES @@ -283,7 +283,7 @@ _NS:9 YES - -1539309504 + -2076180416 2048 _NS:9 @@ -294,27 +294,38 @@ 400 75 - - - 1 Minute - - 1048576 - 2147483647 - 1 - - - _popUpItemAction: - 60 - - + YES LockTimes - + + + Never + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + + + for 1 Minute + + 1048576 + 2147483647 + + + _popUpItemAction: + 60 + + - 5 Minutes + for 5 Minutes 1048576 2147483647 @@ -326,7 +337,7 @@ - 15 Minutes + for 15 Minutes 2147483647 @@ -346,39 +357,13 @@ NO - - - 268 - {{16, 36}, {138, 18}} - - - - _NS:9 - YES - - -1543503872 - 268435456 - Lock while idle for - - _NS:9 - - 1211912448 - 2 - - - - - 200 - 25 - - NO - 268 {{16, 12}, {122, 18}} + _NS:9 YES @@ -399,6 +384,27 @@ NO + + + 268 + {{18, 38}, {98, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + Lock while idle + + _NS:1535 + + + + + NO + {{1, 1}, {364, 124}} @@ -509,6 +515,22 @@ 1 + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + 4 @@ -679,21 +701,21 @@ 465 - - - 10 + + + 4 0 - - 10 + + 4 1 - 0.0 + 32 1000 - 6 - 24 - 2 + 3 + 9 + 3 @@ -775,6 +797,22 @@ 40 3 + + + 4 + 0 + + 4 + 1 + + 11 + + 1000 + + 8 + 29 + 3 + 4 @@ -791,22 +829,6 @@ 40 3 - - - 3 - 0 - - 4 - 1 - - 10 - - 1000 - - 9 - 40 - 3 - 5 @@ -823,36 +845,36 @@ 29 3 - - - 3 + + + 11 0 - - 4 + + 11 1 - 20 + 0.0 1000 - 9 - 40 - 3 + 6 + 24 + 2 - - + + 5 0 5 1 - 16 + 19 1000 - 8 - 29 + 3 + 9 3 @@ -936,11 +958,11 @@ 3 - + @@ -949,6 +971,22 @@ + + + 8 + 0 + + 0 + 1 + + 17 + + 1000 + + 3 + 9 + 1 + @@ -1138,6 +1176,7 @@ + @@ -1156,24 +1195,6 @@ - - 605 - - - - - - - - 606 - - - - - 627 - - - 660 @@ -1227,21 +1248,6 @@ - - 765 - - - - - 769 - - - - - 771 - - - 773 @@ -1282,6 +1288,54 @@ + + 800 + + + + + 801 + + + + + 802 + + + + + 803 + + + + + 804 + + + + + 805 + + + + + + + + 806 + + + + + 807 + + + + + 808 + + + @@ -1299,6 +1353,7 @@ + @@ -1314,6 +1369,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -1323,23 +1381,23 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + - - + + - + - + com.apple.InterfaceBuilder.CocoaPlugin @@ -1366,10 +1424,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 @@ -1380,9 +1434,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 @@ -1390,12 +1441,22 @@ 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 - 799 + 808 diff --git a/MacPass/Base.lproj/InspectorView.xib b/MacPass/Base.lproj/InspectorView.xib index 029bc1ae..84725e28 100644 --- a/MacPass/Base.lproj/InspectorView.xib +++ b/MacPass/Base.lproj/InspectorView.xib @@ -22,8 +22,14 @@ NSScroller NSSegmentedCell NSSegmentedControl + NSTabView + NSTabViewItem + NSTableCellView + NSTableColumn + NSTableView NSTextField NSTextFieldCell + NSTextView NSView @@ -58,7 +64,7 @@ NeXT Encapsulated PostScript v1.2 pasteboard type NeXT TIFF v4.0 pasteboard type - {{20, 264}, {48, 48}} + {{20, 433}, {48, 48}} @@ -83,7 +89,7 @@ 268 - {{73, 280}, {155, 17}} + {{73, 449}, {151, 17}} @@ -105,12 +111,12 @@ 6 System controlColor - + 3 MC42NjY2NjY2NjY3AA - + 6 System controlTextColor @@ -125,7 +131,7 @@ 268 - {{0, 254}, {245, 2}} + {{0, 423}, {241, 2}} @@ -136,10 +142,9 @@ 268 - {245, 30} + {241, 30} - _NS:9 HNHGradientView @@ -155,282 +160,339 @@ 274 - + - 268 - {{17, 186}, {35, 14}} - - - - _NS:1535 - YES - - 68157504 - 272761856 - Name - - LucidaGrande - 11 - 3100 - - _NS:1535 - - - - 6 - System - disabledControlTextColor - - 3 - MC4zMzMzMzMzMzMzAA - - - - NO - - - - 268 - {{80, 182}, {145, 22}} - - - - _NS:9 - YES - - -1804599231 - 272630784 - - - _NS:9 - - YES - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 6 - System - textColor - - - - NO - - - - 268 - {{17, 154}, {58, 14}} - - - - _NS:1535 - YES - - 68157504 - 272761856 - Username - - _NS:1535 - - - - - NO - - - - 268 - {{80, 150}, {145, 22}} - - - - _NS:9 - YES - - -1804599231 - 272631040 - - - _NS:9 - - YES - - - - NO - - - - 268 - {{80, 118}, {145, 22}} - - - - _NS:9 - YES - - -1804599231 - 272630784 - - - _NS:9 - - YES - - - - NO - - - - 268 - {{17, 122}, {25, 14}} - - - - _NS:1535 - YES - - 68157504 - 272761856 - URL - - _NS:1535 - - - - - NO - - - - 268 - {{17, 68}, {58, 14}} - - - - _NS:1535 - YES - - 68157504 - 272761856 - Password - - _NS:1535 - - - - - NO - - - - 268 - {{80, 64}, {145, 22}} - - - - _NS:9 - YES - - -1804599231 - 272630784 - - - _NS:9 - - YES - - - - NO - - - - 268 - {{80, 37}, {145, 19}} - - - - _NS:9 - {250, 750} - YES - - -2080374784 - 134217728 - Generate - - LucidaGrande - 12 - 16 - - _NS:9 - - -2038153216 - 164 - - - 400 - 75 - - NO - - - - 268 - {{80, 6}, {85, 25}} - - - _NS:9 - YES - - 67108864 - 0 - - _NS:9 - - - - 39 - - NSImage - 07_NotepadTemplate + 274 + + + + 268 + {{17, 355}, {35, 14}} + + + + _NS:1535 + YES + + 68157504 + 272761856 + Name + + LucidaGrande + 11 + 3100 - YES - 0 - - - 39 - - NSImage - 04_KlipperTemplate + _NS:1535 + + + + 6 + System + disabledControlTextColor + + 3 + MC4zMzMzMzMzMzMzAA + - 1 - YES - 0 - - 1 - 2 - - NO + NO + + + + 268 + {{80, 351}, {141, 22}} + + + + _NS:9 + YES + + -1804599231 + 272630784 + + + _NS:9 + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + + + NO + + + + 268 + {{17, 323}, {58, 14}} + + + + _NS:1535 + YES + + 68157504 + 272761856 + Username + + _NS:1535 + + + + + NO + + + + 268 + {{80, 319}, {141, 22}} + + + + _NS:9 + YES + + -1804599231 + 272631040 + + + _NS:9 + + YES + + + + NO + + + + 268 + {{80, 287}, {141, 22}} + + + + _NS:9 + YES + + -1804599231 + 272630784 + + + _NS:9 + + YES + + + + NO + + + + 268 + {{17, 291}, {25, 14}} + + + + _NS:1535 + YES + + 68157504 + 272761856 + URL + + _NS:1535 + + + + + NO + + + + 268 + {{17, 237}, {58, 14}} + + + + _NS:1535 + YES + + 68157504 + 272761856 + Password + + _NS:1535 + + + + + NO + + + + 268 + {{80, 233}, {141, 22}} + + + + _NS:9 + YES + + -1804599231 + 272630784 + + + _NS:9 + + YES + + + + NO + + + + 268 + {{80, 206}, {141, 19}} + + + + _NS:9 + {250, 750} + YES + + -2080374784 + 134217728 + Generate + + LucidaGrande + 12 + 16 + + _NS:9 + + -2038153216 + 164 + + + 400 + 75 + + NO + + + + 268 + {{80, 175}, {81, 25}} + + + + _NS:9 + YES + + 67108864 + 0 + + _NS:9 + + + + 39 + + NSImage + 07_NotepadTemplate + + YES + 0 + + + 39 + + NSImage + 04_KlipperTemplate + + 1 + YES + 0 + + + 1 + 4 + + NO + + + + 12 + {{20, 10}, {201, 165}} + + + _NS:9 + + + 1 + + + 256 + {201, 165} + + + + _NS:11 + + Tab + + + + + 2 + + + 256 + {201, 165} + _NS:28 + + View + + + + + + + 6 + YES + YES + + + + + + {241, 393} + + + + _NS:13 - {245, 224} + {241, 393} - + _NS:13 - {245, 224} + {241, 393} @@ -442,7 +504,7 @@ 256 - {{229, 0}, {16, 224}} + {{225, 0}, {16, 393}} @@ -456,7 +518,7 @@ 256 - {{0, 208}, {245, 16}} + {{0, 377}, {241, 16}} @@ -468,7 +530,7 @@ 0.50602412223815918 - {{0, 30}, {245, 224}} + {{0, 30}, {241, 393}} @@ -482,12 +544,316 @@ 1 - {245, 332} + {241, 501} _NS:11 + + + 256 + + + + 2304 + + + + 2322 + + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + Apple URL pasteboard type + CorePasteboardFlavorType 0x6D6F6F76 + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + NeXT font pasteboard type + NeXT ruler pasteboard type + WebURLsWithTitlesPboardType + public.url + + {244, 137} + + + + _NS:13 + + + + + + + + + + + + 166 + + + + 244 + 1 + + + 1140854659 + 0 + + + + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + 1 + MCAwIDEAA + + + {8, -8} + 13 + + + + + + 2 + + 6 + {463, 10000000} + + + + {{1, 1}, {244, 137}} + + + + _NS:11 + + + + {4, 5} + + 79691776 + + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + 3 + MCAwAA + + + + 4 + + + + 256 + {{229, 1}, {16, 137}} + + + _NS:83 + NO + + _doScroller: + 0.95811518324607325 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + + _NS:33 + NO + 1 + + _doScroller: + 1 + 0.94565218687057495 + + + {246, 139} + + + + _NS:9 + 133138 + + + + 0.25 + 4 + 1 + + + + 268 + + + + 2304 + + + + 256 + + {235, 114} + + + + _NS:13 + YES + NO + YES + + + -2147483392 + {{224, 0}, {16, 17}} + + _NS:19 + + + + 232 + 40 + 1000 + + 75497536 + 2048 + + + + 3 + MC4zMzMzMzI5ODU2AA + + + 6 + System + headerTextColor + + + + + 337641536 + 2048 + Text Cell + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 373293056 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {235, 114} + + + + _NS:11 + + + 4 + + + + -2147483392 + {{224, 17}, {15, 102}} + + + + _NS:58 + NO + + _doScroller: + 0.99532710280373837 + + + + -2147483392 + {{1, 119}, {223, 15}} + + + _NS:60 + NO + 1 + + _doScroller: + 0.99596774193548387 + + + {235, 114} + + + + _NS:9 + 133680 + + + + QSAAAEEgAABBmAAAQZgAAA + 0.25 + 4 + 1 + @@ -523,62 +889,6 @@ 711 - - - titleOrNameLabel - - - - 521 - - - - titleTextField - - - - 522 - - - - usernameTextField - - - - 524 - - - - URLTextField - - - - 523 - - - - passwordTextField - - - - 644 - - - - _popUpPasswordGenerator: - - - - 710 - - - - generatePasswordButton - - - - 733 - scrollContentView @@ -587,6 +897,187 @@ 993 + + + attachmenScrollView + + + + 1222 + + + + attachmentTableView + + + + 1223 + + + + notesScrollView + + + + 1224 + + + + notesTextView + + + + 1225 + + + + _popUpPasswordGenerator: + + + + 1276 + + + + generatePasswordButton + + + + 1282 + + + + notesOrAttachmentControl + + + + 1283 + + + + passwordTextField + + + + 1284 + + + + URLTextField + + + + 1287 + + + + usernameTextField + + + + 1288 + + + + titleOrNameLabel + + + + 1317 + + + + titleTextField + + + + 1318 + + + + documentView + + + + 1289 + + + + imageView + + + 274 + + + + 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 + + {{3, 0}, {17, 17}} + + + _NS:11 + YES + + 134217728 + 33554432 + + NSImage + NSActionTemplate + + _NS:11 + 0 + 0 + 0 + NO + + NO + YES + + + + 266 + {{25, 0}, {207, 17}} + + + _NS:20 + {250, 750} + YES + + 67108928 + 272631808 + Table View Cell + + _NS:20 + + + + + NO + + + {{1, 1}, {232, 17}} + + _NS:9 + + + + 1213 + + + + textField + + + + 1214 + @@ -1040,6 +1531,260 @@ + + 109 + + + + + 1181 + + + + + + + + + + 1182 + + + + + 1183 + + + + + 1184 + + + + + 1185 + + + + + + + + + + 1186 + + + + + + + + 1187 + + + + + 1189 + + + + + 1190 + + + + + + + + + 1193 + + + + + 1208 + + + + + + + 6 + 0 + + 6 + 1 + + 3 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + + + 5 + 0 + + 5 + 1 + + 3 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + + + 1209 + + + + + + 7 + 0 + + 0 + 1 + + 17 + + 1000 + + 3 + 9 + 1 + + + + + + 1210 + + + + + + + + 1211 + + + + + 1212 + + + + + 1215 + + + + + 1216 + + + + + 1217 + + + + + 1218 + + + + + 1219 + + + + + 1220 + + + + + 1221 + + + 897 @@ -1051,436 +1796,28 @@ - 898 - - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 5 - 22 - 2 - - - - 3 - 0 - - 4 - 1 - - 8 - - 1000 - - 6 - 24 - 3 - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 3 - 0 - - 4 - 1 - - 8 - - 1000 - - 9 - 40 - 3 - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 5 - 0 - - 6 - 1 - - 8 - - 1000 - - 6 - 24 - 3 - - - - 3 - 0 - - 3 - 1 - - 138 - - 1000 - - 3 - 9 - 3 - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 10 - 0 - - 10 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 3 - 0 - - 4 - 1 - - 10 - - 1000 - - 6 - 24 - 3 - - - - 10 - 0 - - 10 - 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 - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 10 - 0 - - 10 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 3 - 0 - - 4 - 1 - - 10 - - 1000 - - 6 - 24 - 3 - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 3 - 0 - - 3 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 10 - 0 - - 10 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - - - - - - - - - + 1051 + + + + + 1050 + + + + + 970 + + + + + 906 + + + + + 900 + @@ -1489,294 +1826,930 @@ - 900 - + 898 + + + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + + 9 + 40 + 3 + + + + 4 + 0 + + 4 + 1 + + 0.0 + + 1000 + + 9 + 40 + 3 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + - 906 - - - - - 466 - + 1229 + - + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 10 + + 1000 + + 3 + 9 + 3 + + + + 3 + 0 + + 3 + 1 + + 218 + + 1000 + + 3 + 9 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 4 + 1 + + 4 + 1 + + 20 + + 1000 + + 9 + 40 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 9 + 40 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 9 + 40 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 3 + 0 + + 3 + 1 + + 138 + + 1000 + + 9 + 40 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 4 + 1 + + 10 + + 1000 + + 6 + 24 + 3 + + + + 10 + 0 + + 10 + 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 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 3 + 0 + + 4 + 1 + + 10 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + + + + + + + + + - 495 - - + 1281 + + - 465 - + 1280 + + + + + 1279 + + + + + 1278 + + + + + 1230 + - + - + - 496 - - + 1275 + + - 463 - + 1231 + - + - + - 498 - - + 1274 + + - 464 - + 1232 + - + - + - 497 - - + 1273 + + - 462 - + 1233 + - + - + - 499 - - + 1272 + + - 461 - + 1234 + - + - + - 500 - - + 1271 + + - 459 - + 1235 + - + - + - 502 - - + 1270 + + - 635 - + 1236 + - + - + - 636 - - + 1269 + + - 703 - + 1237 + - + - + - 704 - - + 1268 + + - 941 - - + 1238 + + + + + - 942 - - + 1267 + + - 943 - - + 1239 + + + + + - 946 - - + 1266 + + - 952 - - + 1240 + + - 963 - - + 1241 + + - 964 - - + 1242 + + - 965 + 1243 - + - 970 - - + 1244 + + - 971 - - + 1245 + + - 973 - - + 1246 + + - 974 - - + 1247 + + - 975 + 1248 + + + + + 1249 + + + + + 1250 + + + + + 1251 + + + + + 1252 + + + + + 1253 + + + + + 1254 + + + + + 1255 + + + + + 1256 - + - 109 - - + 1257 + + - 1005 - - + 1258 + + - 1003 - - - - - 1002 - - - - - 1010 - - - - - 1008 - - - - - 1050 - - - - - 1051 - - - - - 1108 + 1259 - + - 1156 - - - - - - - - 1157 - - - - - 1159 - - - - - 1168 + 1260 - + - 1169 - - - - - 1171 - - - - - 1172 - - - - - 1174 - - - - - 1175 + 1261 - + - 1179 - - + 1262 + + + + + 1263 + + + + + 1265 + + + + + 1290 + + + + + 1301 + + + + + + + + + 1302 + + + + + + + + 1303 + + + + + + + + 1304 + + + + + 1305 + + + + + 1310 + + + + + 1311 + + + + + 1313 + + + + + 1314 + + + + + 1316 + + @@ -1786,28 +2759,166 @@ 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 + + + + + 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 + HNHRoundedTextField + + 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 + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + HNHRoundedTextFieldCell + com.apple.InterfaceBuilder.CocoaPlugin + HNHRoundedTextFieldCell + com.apple.InterfaceBuilder.CocoaPlugin + HNHRoundedTextFieldCell + com.apple.InterfaceBuilder.CocoaPlugin + HNHRoundedSecureTextFieldCell + 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 @@ -1828,31 +2939,6 @@ com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - HNHRoundedTextField - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - HNHRoundedTextFieldCell - com.apple.InterfaceBuilder.CocoaPlugin - HNHRoundedTextFieldCell - 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 @@ -1872,10 +2958,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - HNHRoundedSecureTextFieldCell - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -1888,76 +2970,31 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin HNHScrollView com.apple.InterfaceBuilder.CocoaPlugin - HNHFlippedView - - - - - - - - - - - - - - - - - - - - - - - - - - - + HNHScrollDocumentViewAdapter + + + + + 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 - 1179 + 1318 - - HNHFlippedView - NSView - - IBProjectSource - ./Classes/HNHFlippedView.h - - HNHGradientView NSView @@ -1990,6 +3027,25 @@ ./Classes/HNHRoundedTextFieldCell.h + + HNHScrollDocumentViewAdapter + NSView + + documentView + NSView + + + documentView + + documentView + NSView + + + + IBProjectSource + ./Classes/HNHScrollDocumentViewAdapter.h + + HNHScrollView NSScrollView @@ -2009,15 +3065,29 @@ MPInspectorViewController MPViewController + + _popUpPasswordGenerator: + id + + + _popUpPasswordGenerator: + + _popUpPasswordGenerator: + id + + NSTextField + NSScrollView NSTableView HNHGradientView NSButton NSTextField MPPopupImageView NSTextField - NSTextField + NSSegmentedControl + NSScrollView + NSTextView NSTextField NSView NSTextField @@ -2029,6 +3099,10 @@ URLTextField NSTextField + + attachmenScrollView + NSScrollView + attachmentTableView NSTableView @@ -2053,9 +3127,17 @@ itemNameTextfield NSTextField - - notesTextField - NSTextField + + notesOrAttachmentControl + NSSegmentedControl + + + notesScrollView + NSScrollView + + + notesTextView + NSTextView passwordTextField @@ -2116,6 +3198,7 @@ {128, 128} {128, 128} + {15, 15} {128, 128} YES diff --git a/MacPass/EntryView.xib b/MacPass/EntryView.xib index 7676a11b..854c75ab 100644 --- a/MacPass/EntryView.xib +++ b/MacPass/EntryView.xib @@ -57,11 +57,10 @@ 268 {{7, 5}, {32, 19}} - _NS:9 YES - -1543503872 + -2080374784 134217728 Round Rect Button @@ -87,7 +86,6 @@ {684, 30} - _NS:9 HNHGradientView @@ -106,7 +104,6 @@ {684, 548} - _NS:13 YES @@ -117,7 +114,6 @@ 256 {684, 17} - @@ -340,7 +336,6 @@ {{0, 17}, {684, 548}} - _NS:11 @@ -352,7 +347,6 @@ -2147483392 {{224, 17}, {15, 102}} - _NS:58 NO @@ -365,7 +359,6 @@ -2147483392 {{0, 310}, {480, 16}} - _NS:60 NO @@ -382,7 +375,6 @@ {684, 17} - @@ -391,7 +383,6 @@ {{0, 30}, {684, 565}} - _NS:9 133680 @@ -407,7 +398,6 @@ {684, 594} - _NS:9 NSView @@ -462,6 +452,14 @@ 744 + + + addEntryButton + + + + 745 + textField @@ -472,7 +470,7 @@ 266 - {105, 17} + {104, 17} {250, 750} @@ -494,7 +492,7 @@ NO - {{1, 1}, {105, 17}} + {{1, 1}, {104.5, 17}} @@ -563,7 +561,7 @@ NO - {{109, 1}, {144, 17}} + {{108.5, 1}, {144, 17}} _NS:9 @@ -606,7 +604,7 @@ NO - {{378, 1}, {113, 17}} + {{377, 1}, {113, 17}} @@ -623,7 +621,7 @@ 266 - {119, 17} + {118, 17} {250, 750} @@ -640,7 +638,7 @@ NO - {{256, 1}, {119, 17}} + {{255.5, 1}, {118.5, 17}} @@ -674,7 +672,7 @@ NO - {{494, 1}, {188, 17}} + {{493, 1}, {188, 17}} @@ -1742,106 +1740,9 @@ - 744 - - - - - HNHGradientView - NSView - - IBProjectSource - ./Classes/HNHGradientView.h - - - - MPEntryViewController - MPViewController - - HNHGradientView - NSTableView - NSView - NSButton - NSTextField - NSSearchField - NSButton - NSButton - NSButton - NSLayoutConstraint - - - - 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 - - - + 745 + 0 IBCocoaFramework YES diff --git a/MacPass/MPAppDelegate.m b/MacPass/MPAppDelegate.m index b8a36f85..4ae84be2 100644 --- a/MacPass/MPAppDelegate.m +++ b/MacPass/MPAppDelegate.m @@ -14,10 +14,12 @@ #import "MPUppercaseStringValueTransformer.h" #import "MPStringLengthValueTransformer.h" #import "MPServerDaemon.h" +#import "MPLockDaemon.h" @interface MPAppDelegate () { @private MPServerDaemon *serverDaemon; + MPLockDaemon *lockDaemon; } @property (retain, nonatomic) MPSettingsWindowController *settingsController; @@ -41,6 +43,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification { serverDaemon = [[MPServerDaemon alloc] init]; + lockDaemon = [[MPLockDaemon alloc] init]; } @@ -48,6 +51,7 @@ [_settingsController release]; [_passwordCreatorController release]; [serverDaemon release]; + [lockDaemon release]; [super dealloc]; } diff --git a/MacPass/MPDocumentWindowController.h b/MacPass/MPDocumentWindowController.h index 9f0c660d..a6938ea1 100644 --- a/MacPass/MPDocumentWindowController.h +++ b/MacPass/MPDocumentWindowController.h @@ -16,6 +16,10 @@ @class MPOutlineViewController; @class MPCreationViewController; +@class KdbGroup; +@class KdbEntry; + +APPKIT_EXTERN NSString *const MPCurrentItemChangedNotification; @interface MPDocumentWindowController : NSWindowController @@ -26,11 +30,13 @@ @property (readonly, retain) MPInspectorViewController *inspectorViewController; @property (readonly, retain) MPCreationViewController *creationViewController; +/* Holds the current item. That is either a KdbGroup or a KdbEntry */ +@property (readonly, assign) id currentItem; + - (void)showEntries; - (void)showPasswordInput; - (void)performFindPanelAction:(id)sender; -- (void)clearOutlineSelection:(id)sender; - (IBAction)editPassword:(id)sender; - (void)lock:(id)sender; diff --git a/MacPass/MPDocumentWindowController.m b/MacPass/MPDocumentWindowController.m index d726eb40..05c6f445 100644 --- a/MacPass/MPDocumentWindowController.m +++ b/MacPass/MPDocumentWindowController.m @@ -18,6 +18,8 @@ #import "MPAppDelegate.h" #import "MPActionHelper.h" +NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCurrentItemChangedNotification"; + @interface MPDocumentWindowController () { @private id _firstResponder; @@ -26,6 +28,7 @@ @property (retain) IBOutlet NSSplitView *splitView; @property (retain) NSToolbar *toolbar; +@property (assign) id currentItem; @property (retain) MPPasswordInputController *passwordInputController; @property (retain) MPPasswordEditViewController *passwordEditController; @@ -49,6 +52,11 @@ _passwordEditController = [[MPPasswordEditViewController alloc] init]; _entryViewController = [[MPEntryViewController alloc] init]; _inspectorViewController = [[MPInspectorViewController alloc] init]; + _currentItem = nil; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_updateCurrentItem:) name:MPOutlineViewDidChangeGroupSelection object:_outlineViewController.outlineDelegate]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_updateCurrentItem:) name:MPDidChangeSelectedEntryNotification object:_entryViewController]; + } return self; } @@ -134,6 +142,21 @@ [self.window makeFirstResponder:[viewController reconmendedFirstResponder]]; } +#pragma mark Resonder handling +- (void)_updateCurrentItem:(NSNotification *)notification { + id sender = [notification object]; + if( sender == _outlineViewController.outlineView || sender == _outlineViewController.outlineDelegate ) { + self.currentItem = _outlineViewController.outlineDelegate.selectedGroup; + } + else if( sender == _entryViewController.entryTable || sender == _entryViewController) { + self.currentItem = _entryViewController.selectedEntry; + } + else { + return; // no notification! + } + [[NSNotificationCenter defaultCenter] postNotificationName:MPCurrentItemChangedNotification object:self]; +} + #pragma mark Actions - (void)performFindPanelAction:(id)sender { [self.entryViewController showFilter:sender]; @@ -151,10 +174,10 @@ return showsNoLockScreen && document.isProtected; } if(itemAction == [MPActionHelper actionOfType:MPActionAddEntry]) { - return (nil != _entryViewController.activeGroup); + return (nil != _outlineViewController.outlineDelegate.selectedGroup); } if(itemAction == [MPActionHelper actionOfType:MPActionDelete]) { - return (_entryViewController.activeGroup || _entryViewController.selectedEntry); + return (nil != _currentItem); } if(itemAction == [MPActionHelper actionOfType:MPActionToggleInspector]) { return (nil != [_splitView superview]); @@ -171,10 +194,6 @@ [self.passwordInputController requestPassword]; } -- (void)clearOutlineSelection:(id)sender { - [self.outlineViewController clearSelection]; -} - - (void)editPassword:(id)sender { if(!self.passwordEditController) { _passwordEditController = [[MPPasswordEditViewController alloc] init]; @@ -190,6 +209,10 @@ [_outlineViewController createGroup:nil]; } +- (void)createEntry:(id)sender { + [_outlineViewController createEntry:nil]; +} + - (void)toggleInspector:(id)sender { NSView *inspectorView = [_inspectorViewController view]; if([inspectorView superview]) { @@ -263,22 +286,18 @@ } #pragma mark NSWindowDelegate - - (void)windowDidUpdate:(NSNotification *)notification { - if(_firstResponder != [[self window] firstResponder]) { - _firstResponder = [[self window] firstResponder]; - if(![_firstResponder isKindOfClass:[NSView class]]) { - return; // wrong responder - } - if( [_firstResponder isDescendantOf:[_entryViewController view]] ) { - //[_inspectorTabViewController showEntry]; - } - else if([_firstResponder isDescendantOf:[_outlineViewController view]]) { - //[_inspectorTabViewController showGroup]; - } + id firstResonder = [[self window] firstResponder]; + if(_firstResponder == firstResonder) { + return; + } + _firstResponder = firstResonder; + if([_firstResponder isKindOfClass:[NSView class]]) { + [self _updateCurrentItem:[NSNotification notificationWithName:@"dummy" object:_firstResponder ]]; } } + #pragma mark Helper - (NSSearchField *)locateToolbarSearchField { for(NSToolbarItem *toolbarItem in [[self.window toolbar] items]) { diff --git a/MacPass/MPEntryViewController.h b/MacPass/MPEntryViewController.h index 9bd0c1f2..88dedb53 100644 --- a/MacPass/MPEntryViewController.h +++ b/MacPass/MPEntryViewController.h @@ -31,9 +31,9 @@ typedef enum { @interface MPEntryViewController : MPViewController -@property (assign) KdbGroup *activeGroup; @property (readonly, assign, nonatomic) KdbEntry *selectedEntry; +@property (assign,readonly) NSTableView *entryTable; @property (readonly, retain) NSArrayController *entryArrayController; @property (nonatomic, retain) NSString *filter; @@ -52,7 +52,6 @@ typedef enum { - (void)openURL:(id)sender; /* Entry Handling*/ -- (void)createEntry:(id)sender; - (void)deleteEntry:(id)sender; @end diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m index d4179cc0..edd35983 100644 --- a/MacPass/MPEntryViewController.m +++ b/MacPass/MPEntryViewController.m @@ -17,6 +17,7 @@ #import "MPOverlayWindowController.h" #import "MPContextMenuHelper.h" +#import "MPActionHelper.h" #import "MPConstants.h" #import "MPEntryTableDataSource.h" #import "MPStringLengthValueTransformer.h" @@ -74,6 +75,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; @property (assign) IBOutlet NSTextField *filterLabelTextField; @property (assign) IBOutlet NSSearchField *filterSearchField; @property (assign) IBOutlet HNHGradientView *bottomBar; +@property (assign) IBOutlet NSButton *addEntryButton; @property (assign) KdbEntry *selectedEntry; @@ -102,7 +104,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; _entryArrayController = [[NSArrayController alloc] init]; _dataSource = [[MPEntryTableDataSource alloc] init]; _dataSource.viewController = self; - _selectedEntry = nil; + _selectedEntry = nil; } return self; } @@ -123,6 +125,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; [self.view setWantsLayer:YES]; [self _hideFilterBarAnimated:NO]; [_bottomBar setBorderType:HNHBorderTop]; + [self.addEntryButton setAction:[MPActionHelper actionOfType:MPActionAddEntry]]; [self.entryTable setDelegate:self]; [self.entryTable setDoubleAction:@selector(_columnDoubleClick:)]; @@ -130,13 +133,13 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; [self.entryTable setFloatsGroupRows:NO]; [self.entryTable registerForDraggedTypes:@[MPPasteBoardType]]; [self _setupEntryMenu]; - + NSTableColumn *parentColumn = [self.entryTable tableColumns][0]; NSTableColumn *titleColumn = [self.entryTable tableColumns][1]; NSTableColumn *userNameColumn = [self.entryTable tableColumns][2]; NSTableColumn *passwordColumn = [self.entryTable tableColumns][3]; NSTableColumn *urlColumn = [self.entryTable tableColumns][4]; - + [parentColumn setIdentifier:MPEntryTableParentColumnIdentifier]; [titleColumn setIdentifier:MPEntryTableTitleColumnIdentifier]; @@ -161,15 +164,15 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; [self.entryTable bind:NSContentBinding toObject:self.entryArrayController withKeyPath:@"arrangedObjects" options:nil]; [self.entryTable bind:NSSortDescriptorsBinding toObject:self.entryArrayController withKeyPath:@"sortDescriptors" options:nil]; [self.entryTable setDataSource:_dataSource]; - + [parentColumn setHidden:YES]; } - (void)setupNotifications:(MPDocumentWindowController *)windowController { [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(_didChangeGroupSelectionInOutlineView:) - name:MPOutlineViewDidChangeGroupSelection - object:windowController.outlineViewController.outlineDelegate]; + selector:@selector(_didChangeCurrentItem:) + name:MPCurrentItemChangedNotification + object:windowController]; } #pragma mark NSTableViewDelgate @@ -227,20 +230,27 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; } #pragma mark Notifications -- (void)_didChangeGroupSelectionInOutlineView:(NSNotification *)notification { +- (void)_didChangeCurrentItem:(NSNotification *)notification { if([self _showsFilterBar]) { //[self.filterSearchField setStringValue:@""]; [self clearFilter:nil]; } - MPOutlineViewDelegate *delegate = [notification object]; - self.activeGroup = delegate.selectedGroup; - - if(_activeGroup) { - [self.entryArrayController bind:NSContentArrayBinding toObject:_activeGroup withKeyPath:@"entries" options:nil]; - } - else { - [self.entryArrayController unbind:NSContentArrayBinding]; - [self.entryArrayController setContent:nil]; + MPDocumentWindowController *sender = [notification object]; + if([sender.currentItem isKindOfClass:[KdbGroup class]]) { + KdbGroup *item = sender.currentItem; + if(item) { + if([[self.entryArrayController content] count] > 0) { + KdbEntry *entry = [[self.entryArrayController content] lastObject]; + if(entry.parent == item) { + return; // we are showing the correct object right now. + } + } + [self.entryArrayController bind:NSContentArrayBinding toObject:item withKeyPath:@"entries" options:nil]; + } + else { + [self.entryArrayController unbind:NSContentArrayBinding]; + [self.entryArrayController setContent:nil]; + } } } @@ -263,10 +273,6 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; } } -- (void)deselectAll:(id)sender { - [self.entryTable deselectAll:nil]; -} - - (void)clearFilter:(id)sender { self.filter = nil; [[self.entryTable tableColumnWithIdentifier:MPEntryTableParentColumnIdentifier] setHidden:YES]; @@ -347,9 +353,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; if([self _showsFilterBar]) { return; // nothing to to } - - [[[self.view window] windowController] clearOutlineSelection:nil]; - + NSView *scrollView = [_entryTable enclosingScrollView]; NSDictionary *views = NSDictionaryOfVariableBindings(scrollView, _filterBar); [self.view layout]; @@ -357,7 +361,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; [self.view addSubview:self.filterBar]; [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_filterBar]|" options:0 metrics:nil views:views]]; [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_filterBar(==30)]-0-[scrollView]" options:0 metrics:nil views:views]]; - + if(animate) { [NSAnimationContext runAnimationGroup:^(NSAnimationContext* context) { @@ -475,15 +479,6 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; } } -- (void)createEntry:(id)sender { - if(!_activeGroup) { - return; // Entries are not allowed in root group - } - - MPDocument *document = [[NSDocumentController sharedDocumentController] currentDocument]; - [document createEntry:_activeGroup]; -} - - (void)deleteEntry:(id)sender { KdbEntry *entry =[self _clickedOrSelectedEntry]; [entry.parent removeEntryUndoable:entry]; diff --git a/MacPass/MPFirstResonderNotification.h b/MacPass/MPFirstResonderNotification.h index 22dd0e91..6c93f1f7 100644 --- a/MacPass/MPFirstResonderNotification.h +++ b/MacPass/MPFirstResonderNotification.h @@ -10,4 +10,7 @@ @protocol MPFirstResonderNotification +@required +- (BOOL)becomeFirstResponder; + @end diff --git a/MacPass/MPInspectorViewController.h b/MacPass/MPInspectorViewController.h index eac266e4..8d5f015d 100644 --- a/MacPass/MPInspectorViewController.h +++ b/MacPass/MPInspectorViewController.h @@ -24,11 +24,14 @@ @property (assign) IBOutlet NSTextField *URLTextField; @property (assign) IBOutlet NSTextField *passwordTextField; @property (assign) IBOutlet NSTextField *titleOrNameLabel; -@property (assign) IBOutlet NSTextField *notesTextField; @property (assign) IBOutlet HNHGradientView *bottomBar; @property (assign) IBOutlet NSTextField *infoTextField; @property (assign) IBOutlet NSTableView *attachmentTableView; @property (assign) IBOutlet NSView *scrollContentView; +@property (assign) IBOutlet NSSegmentedControl *notesOrAttachmentControl; +@property (retain) IBOutlet NSScrollView *attachmenScrollView; +@property (assign) IBOutlet NSScrollView *notesScrollView; +@property (assign) IBOutlet NSTextView *notesTextView; - (void)closeActivePopup:(id)sender; /* Seperate call to ensure alle registered objects are in place */ diff --git a/MacPass/MPInspectorViewController.m b/MacPass/MPInspectorViewController.m index a8127bcb..5e2ce450 100644 --- a/MacPass/MPInspectorViewController.m +++ b/MacPass/MPInspectorViewController.m @@ -23,6 +23,11 @@ #import "KdbEntry+Undo.h" #import "HNHGradientView.h" +enum { + MPNotesTab, + MPAttachmentTab +}; + @interface MPInspectorViewController () { BOOL _visible; } @@ -30,7 +35,6 @@ @property (assign, nonatomic) KdbEntry *selectedEntry; @property (assign, nonatomic) KdbGroup *selectedGroup; -@property (assign, nonatomic) BOOL showsEntry; @property (retain) NSPopover *activePopover; @property (assign) IBOutlet NSButton *generatePasswordButton; @property (nonatomic, assign) NSDate *modificationDate; @@ -50,7 +54,6 @@ if (self) { _selectedEntry = nil; _selectedGroup = nil; - _showsEntry = NO; _attachmentController = [[NSArrayController alloc] init]; } return self; @@ -72,6 +75,11 @@ [_attachmentTableView setDelegate:self]; [_attachmentTableView bind:NSContentBinding toObject:_attachmentController withKeyPath:@"arrangedObjects" options:nil]; [_attachmentTableView setHidden:YES]; + + [_notesOrAttachmentControl setAction:@selector(_toggleInfoTab:)]; + [_notesOrAttachmentControl setTarget:self]; + [[_notesOrAttachmentControl cell] setTag:MPAttachmentTab forSegment:MPAttachmentTab]; + [[_notesOrAttachmentControl cell] setTag:MPNotesTab forSegment:MPNotesTab]; [self _clearContent]; } @@ -79,21 +87,15 @@ - (void)setupNotifications:(MPDocumentWindowController *)windowController { /* Register for Entry selection */ [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(_didChangeSelectedEntry:) - name:MPDidChangeSelectedEntryNotification - object:windowController.entryViewController]; - - /* Register for Group selection */ - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(_didChangeSelectedGroup:) - name:MPOutlineViewDidChangeGroupSelection - object:windowController.outlineViewController.outlineDelegate]; + selector:@selector(_didChangeCurrentItem:) + name:MPCurrentItemChangedNotification + object:windowController]; } - (void)_updateInfoString { NSDate *modificationDate; NSDate *creationDate; - if(_showsEntry) { + if(self.selectedEntry) { modificationDate = self.selectedEntry.lastModificationTime; creationDate = self.selectedEntry.creationTime; } @@ -113,10 +115,10 @@ } - (void)_updateContent { - if(self.showsEntry && self.selectedEntry) { + if(self.selectedEntry) { [self _showEntry]; } - else if(!self.showsEntry && self.selectedGroup) { + else if(self.selectedGroup) { [self _showGroup]; } else { @@ -137,7 +139,7 @@ [self.titleOrNameLabel setStringValue:NSLocalizedString(@"TITLE",@"")]; [self.titleTextField bind:NSValueBinding toObject:self.selectedEntry withKeyPath:MPEntryTitleUndoableKey options:nil]; [self.URLTextField bind:NSValueBinding toObject:self.selectedEntry withKeyPath:MPEntryUrlUndoableKey options:nil]; - [self.notesTextField bind:NSValueBinding toObject:self.selectedEntry withKeyPath:MPEntryNotesUndoableKey options:nil]; + [self.notesTextView bind:NSValueBinding toObject:self.selectedEntry withKeyPath:MPEntryNotesUndoableKey options:nil]; [self _setInputEnabled:YES]; } @@ -160,7 +162,11 @@ [self.passwordTextField setStringValue:@""]; [self.usernameTextField setStringValue:@""]; [self.URLTextField setStringValue:@""]; - [self.notesTextField setStringValue:@""]; + [self.notesTextView setString:@""]; + + // Reste toggle + [self.notesOrAttachmentControl setSelected:NO forSegment:MPNotesTab]; + [self.notesOrAttachmentControl setSelected:NO forSegment:MPAttachmentTab]; [self _setInputEnabled:YES]; } @@ -174,7 +180,7 @@ [self.usernameTextField unbind:NSValueBinding]; [self.titleTextField unbind:NSValueBinding]; [self.URLTextField unbind:NSValueBinding]; - [self.notesTextField unbind:NSValueBinding]; + [self.notesTextView unbind:NSValueBinding]; [self.itemNameTextfield setStringValue:NSLocalizedString(@"INSPECTOR_NO_SELECTION", @"No item selected in inspector")]; [self.itemImageView setImage:[NSImage imageNamed:NSImageNameActionTemplate]]; @@ -184,7 +190,7 @@ [self.usernameTextField setStringValue:@""]; [self.titleTextField setStringValue:@""]; [self.URLTextField setStringValue:@""]; - [self.notesTextField setStringValue:@""]; + [self.notesTextView setString:@""]; } @@ -196,17 +202,18 @@ [self.itemNameTextfield setEnabled:enabled]; [self.titleTextField setEnabled:enabled]; - enabled &= self.showsEntry; + enabled &= (self.selectedEntry != nil); [self.passwordTextField setEnabled:enabled]; [self.usernameTextField setEnabled:enabled]; [self.URLTextField setEnabled:enabled]; [self.generatePasswordButton setEnabled:enabled]; - [self.notesTextField setEditable:enabled]; - + [self.notesTextView setEditable:enabled]; + [self.notesOrAttachmentControl setEnabled:enabled forSegment:MPNotesTab]; + [self.notesOrAttachmentControl setEnabled:enabled forSegment:MPAttachmentTab]; } - (void)_updateAttachments { - if(self.selectedEntry && self.showsEntry) { + if(self.selectedEntry) { if([self.selectedEntry isKindOfClass:[Kdb4Entry class]]) { [self.attachmentController bind:NSContentArrayBinding toObject:self.selectedEntry withKeyPath:@"binaries" options:nil]; } @@ -220,6 +227,38 @@ #pragma mark Actions +- (void)_toggleInfoTab:(id)sender { + NSUInteger selectedSegment = [sender selectedSegment]; + NSUInteger tab = [[sender cell] tagForSegment:selectedSegment]; + NSView *infoView = nil; + NSView *oldView = nil; + switch (tab) { + case MPNotesTab: + infoView = _notesScrollView; + oldView = _attachmenScrollView; + break; + case MPAttachmentTab: + oldView = _notesScrollView; + infoView = _attachmenScrollView; + default: + break; + } + if([oldView superview]) { + [oldView removeFromSuperview]; + } + [self.scrollContentView addSubview:infoView]; + NSDictionary *views = NSDictionaryOfVariableBindings(_notesOrAttachmentControl, infoView); + [self.scrollContentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[_notesOrAttachmentControl]-10-[infoView(>=100)]-10-|" + options:0 + metrics:nil + views:views]]; + [self.scrollContentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-10-[infoView]-10-|" + options:0 + metrics:nil + views:views]]; + [[self view] layout]; +} + - (void)_showImagePopup:(id)sender { [self _showPopopver:[[[MPIconSelectViewController alloc] init] autorelease] atView:self.itemImageView onEdge:NSMinYEdge]; } @@ -241,36 +280,40 @@ } #pragma mark Notificiations -- (void)_didChangeSelectedEntry:(NSNotification *)notification { - MPEntryViewController *entryViewController = [notification object]; - if(entryViewController) { - self.selectedEntry = entryViewController.selectedEntry; +- (void)_didChangeCurrentItem:(NSNotification *)notification { + MPDocumentWindowController *sender = [notification object]; + id item = sender.currentItem; + if(!item) { + self.selectedGroup = nil; + self.selectedEntry = nil; } -} - -- (void)_didChangeSelectedGroup:(NSNotification *)notification { - MPOutlineViewDelegate *outlineViewDelegae = [notification object]; - if(outlineViewDelegae) { - self.selectedGroup = outlineViewDelegae.selectedGroup; + if([item isKindOfClass:[KdbGroup class]]) { + self.selectedEntry = nil; + self.selectedGroup = sender.currentItem; } + else if([item isKindOfClass:[KdbEntry class]]) { + self.selectedGroup = nil; + self.selectedEntry = sender.currentItem; + } + [self _updateContent]; } #pragma mark Properties -- (void)setSelectedEntry:(KdbEntry *)selectedEntry { - if(_selectedEntry != selectedEntry) { - _selectedEntry = selectedEntry; - self.showsEntry = YES; - [self _updateContent]; - } -} - -- (void)setSelectedGroup:(KdbGroup *)selectedGroup { - if(_selectedGroup != selectedGroup) { - _selectedGroup = selectedGroup; - self.showsEntry = NO; - [self _updateContent]; - } -} +//- (void)setSelectedEntry:(KdbEntry *)selectedEntry { +// if(_selectedEntry != selectedEntry) { +// _selectedEntry = selectedEntry; +// self.showsEntry = YES; +// [self _updateContent]; +// } +//} +// +//- (void)setSelectedGroup:(KdbGroup *)selectedGroup { +// if(_selectedGroup != selectedGroup) { +// _selectedGroup = selectedGroup; +// self.showsEntry = NO; +// [self _updateContent]; +// } +//} #pragma mark NSTableViewDelegate - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { diff --git a/MacPass/MPLockDaemon.m b/MacPass/MPLockDaemon.m index f8d3cb71..a639bb44 100644 --- a/MacPass/MPLockDaemon.m +++ b/MacPass/MPLockDaemon.m @@ -7,9 +7,17 @@ // #import "MPLockDaemon.h" +#import "MPSettingsHelper.h" NSString *const MPShouldLockDatabaseNotification = @"com.hicknhack.macpass.MPShouldLockDatabaseNotification"; +@interface MPLockDaemon () + +@property (nonatomic,assign) BOOL lockOnSleep; +@property (nonatomic,assign) NSUInteger idleLockTime; + +@end + @implementation MPLockDaemon + (MPLockDaemon *)sharedInstance { @@ -24,8 +32,11 @@ NSString *const MPShouldLockDatabaseNotification = @"com.hicknhack.macpass.MPSho - (id)init { self = [super init]; if (self) { - NSNotificationCenter *notificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter]; - [notificationCenter addObserver:self selector:@selector(_willSleepNotification:) name:NSWorkspaceWillSleepNotification object:nil]; + NSString *lockOnSleepKey = [NSString stringWithFormat:@"values.%@", kMPSettingsKeyLockOnSleep]; + NSString *idleTimeOutKey = [NSString stringWithFormat:@"values.%@", kMPSEttingsKeyIdleLockTimeOut]; + NSUserDefaultsController *defaultsController = [NSUserDefaultsController sharedUserDefaultsController]; + [self bind:@"lockOnSleep" toObject:defaultsController withKeyPath:lockOnSleepKey options:nil]; + [self bind:@"idleLockTime" toObject:defaultsController withKeyPath:idleTimeOutKey options:nil]; } return self; } @@ -36,6 +47,30 @@ NSString *const MPShouldLockDatabaseNotification = @"com.hicknhack.macpass.MPSho [super dealloc]; } +- (void)setLockOnSleep:(BOOL)lockOnSleep { + if(_lockOnSleep != lockOnSleep) { + _lockOnSleep = lockOnSleep; + NSNotificationCenter *notificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter]; + if(_lockOnSleep) { + [notificationCenter addObserver:self selector:@selector(_willSleepNotification:) name:NSWorkspaceWillSleepNotification object:nil]; + } + else { + [notificationCenter removeObserver:self]; + } + } +} + +- (void)setIdleLockTime:(NSUInteger)idleLockTime { + if(_idleLockTime != idleLockTime) { + _idleLockTime = idleLockTime; + if(_idleLockTime == 0) { + // disable + } + else { + // update timer + } + } +} - (void)_willSleepNotification:(NSNotification *)notification { [[NSNotificationCenter defaultCenter] postNotificationName:MPShouldLockDatabaseNotification object:self]; diff --git a/MacPass/MPOutlineViewController.h b/MacPass/MPOutlineViewController.h index 70c589f0..f6a210e8 100644 --- a/MacPass/MPOutlineViewController.h +++ b/MacPass/MPOutlineViewController.h @@ -14,10 +14,10 @@ @interface MPOutlineViewController : MPViewController +@property (readonly, assign) NSOutlineView *outlineView; @property (retain, readonly) MPOutlineViewDelegate *outlineDelegate; @property (assign) IBOutlet HNHGradientView *bottomBar; -- (void)clearSelection; - (void)showOutline; - (void)createGroup:(id)sender; diff --git a/MacPass/MPOutlineViewController.m b/MacPass/MPOutlineViewController.m index 9f4ebba2..a3ae43fa 100644 --- a/MacPass/MPOutlineViewController.m +++ b/MacPass/MPOutlineViewController.m @@ -9,12 +9,16 @@ #import "MPOutlineViewController.h" #import "MPOutlineViewDelegate.h" #import "MPOutlineDataSource.h" + #import "MPDocument.h" #import "MPAppDelegate.h" -#import "KdbLib.h" -#import "KdbGroup+Undo.h" #import "MPContextMenuHelper.h" #import "MPConstants.h" +#import "MPActionHelper.h" + +#import "KdbLib.h" +#import "KdbGroup+Undo.h" + #import "HNHGradientView.h" @@ -22,6 +26,7 @@ BOOL _bindingEstablished; } @property (assign) IBOutlet NSOutlineView *outlineView; +@property (assign) IBOutlet NSButton *addGroupButton; @property (retain) NSTreeController *treeController; @property (retain) MPOutlineDataSource *datasource; @@ -50,20 +55,22 @@ - (void)dealloc { - self.datasource = nil; - self.outlineDelegate = nil; - self.menu = nil; + [_datasource release]; + [_outlineDelegate release]; + [_menu release]; + [super dealloc]; } - (void)didLoadView { - [self.outlineView setDelegate:self.outlineDelegate]; - [self.outlineView setMenu:[self _contextMenu]]; - [self.outlineView setAllowsEmptySelection:YES]; - [self.outlineView setFloatsGroupRows:NO]; + [_outlineView setDelegate:_outlineDelegate]; + [_outlineView setMenu:[self _contextMenu]]; + [_outlineView setAllowsEmptySelection:YES]; + [_outlineView setFloatsGroupRows:NO]; [_outlineView registerForDraggedTypes:@[ MPPasteBoardType ]]; - [self.outlineView setDraggingSourceOperationMask:NSDragOperationEvery forLocal:YES]; + [_outlineView setDraggingSourceOperationMask:NSDragOperationEvery forLocal:YES]; [_bottomBar setBorderType:HNHBorderTop]; + [_addGroupButton setAction:[MPActionHelper actionOfType:MPActionAddGroup]]; } - (void)showOutline { @@ -79,10 +86,6 @@ [_outlineView expandItem:node expandChildren:NO]; } -- (void)clearSelection { - [self.outlineView deselectAll:nil]; -} - - (NSMenu *)_contextMenu { NSMenu *menu = [[NSMenu alloc] init]; NSArray *items = [MPContextMenuHelper contextMenuItemsWithItems:MPContextMenuMinimal]; diff --git a/MacPass/MPOutlineViewDelegate.m b/MacPass/MPOutlineViewDelegate.m index 81362c6c..ddcab11c 100644 --- a/MacPass/MPOutlineViewDelegate.m +++ b/MacPass/MPOutlineViewDelegate.m @@ -59,8 +59,9 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; - (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item { NSTreeNode *treeNode = item; KdbGroup *group = [treeNode representedObject]; + return YES; //KdbGroup *group = item; - return (nil != [group parent]); + //return (nil != [group parent]); } - (void)outlineViewSelectionDidChange:(NSNotification *)notification { diff --git a/MacPass/MPSettingsHelper.h b/MacPass/MPSettingsHelper.h index 62da0497..f346d9e1 100644 --- a/MacPass/MPSettingsHelper.h +++ b/MacPass/MPSettingsHelper.h @@ -8,14 +8,24 @@ #import +/* Clipboard */ APPKIT_EXTERN NSString *const kMPSettingsKeyPasteboardClearTimeout; APPKIT_EXTERN NSString *const kMPSettingsKeyClearPasteboardOnQuit; + +/* Behaviour */ APPKIT_EXTERN NSString *const kMPSettingsKeyPasswordEncoding; APPKIT_EXTERN NSString *const kMPSettingsKeyOpenEmptyDatabaseOnLaunch; + +/* Server Settings */ APPKIT_EXTERN NSString *const kMPSettingsKeyHttpPort; APPKIT_EXTERN NSString *const kMPSettingsKeyEnableHttpServer; APPKIT_EXTERN NSString *const kMPSettingsKeyShowMenuItem; +/* Autolock */ +APPKIT_EXTERN NSString *const kMPSettingsKeyLockOnSleep; +APPKIT_EXTERN NSString *const kMPSEttingsKeyIdleLockTimeOut; + + typedef NS_ENUM(NSUInteger, MPPasswordEncoding) { MPPasswordEncodingUTF8, MPPasswordEncodingASCII, diff --git a/MacPass/MPSettingsHelper.m b/MacPass/MPSettingsHelper.m index b0aa20ec..ff4675bf 100644 --- a/MacPass/MPSettingsHelper.m +++ b/MacPass/MPSettingsHelper.m @@ -14,7 +14,8 @@ NSString *const kMPSettingsKeyOpenEmptyDatabaseOnLaunch = @"OpenEmptyDatabaseOnL NSString *const kMPSettingsKeyHttpPort =@"HttpPort"; NSString *const kMPSettingsKeyEnableHttpServer = @"EnableHttpServer"; NSString *const kMPSettingsKeyShowMenuItem = @"ShowMenuItem"; - +NSString *const kMPSettingsKeyLockOnSleep = @"LockOnSleep"; +NSString *const kMPSEttingsKeyIdleLockTimeOut = @"IdleLockTimeOut"; @implementation MPSettingsHelper @@ -24,12 +25,14 @@ NSString *const kMPSettingsKeyShowMenuItem = @"ShowMenuItem"; + (NSDictionary *)_standardDefaults { return @{ - kMPSettingsKeyPasteboardClearTimeout: @10, + kMPSettingsKeyPasteboardClearTimeout: @30, // 30 seconds kMPSettingsKeyClearPasteboardOnQuit: @YES, kMPSettingsKeyOpenEmptyDatabaseOnLaunch: @YES, kMPSettingsKeyHttpPort: @19455, kMPSettingsKeyEnableHttpServer: @NO, kMPSettingsKeyShowMenuItem: @YES, + kMPSettingsKeyLockOnSleep: @YES, + kMPSEttingsKeyIdleLockTimeOut: @300 // 5 minutes }; } diff --git a/MacPass/MPViewController.m b/MacPass/MPViewController.m index 0e39d917..dce049d0 100644 --- a/MacPass/MPViewController.m +++ b/MacPass/MPViewController.m @@ -29,11 +29,6 @@ return nil; // override } -- (BOOL)becomeFirstResponder { - NSLog(@"%@: about to become firt responder.", [self class]); - return YES; -} - - (void)updateResponderChain { if(self.view && [self.view nextResponder] != self) { NSResponder *nextResponder = [[self view] nextResponder]; diff --git a/MacPass/MacPass-Info.plist b/MacPass/MacPass-Info.plist index 844cce40..24823cfa 100644 --- a/MacPass/MacPass-Info.plist +++ b/MacPass/MacPass-Info.plist @@ -48,7 +48,7 @@ CFBundleSignature ???? CFBundleVersion - 592 + 747 LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHumanReadableCopyright @@ -57,5 +57,7 @@ MainMenu NSPrincipalClass NSApplication + NSSupportsAutomaticGraphicsSwitching + diff --git a/MacPass/OutlineView.xib b/MacPass/OutlineView.xib index 19494c5b..a2307505 100644 --- a/MacPass/OutlineView.xib +++ b/MacPass/OutlineView.xib @@ -60,7 +60,7 @@ _NS:9 YES - -1543503872 + -2080374784 134217728 @@ -304,6 +304,14 @@ 433 + + + addGroupButton + + + + 434 + textField @@ -1126,7 +1134,7 @@ - 433 + 434 @@ -1158,10 +1166,15 @@ MPOutlineViewController MPViewController + NSButton HNHGradientView NSOutlineView + + addGroupButton + NSButton + bottomBar HNHGradientView