diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index 6d908b3b..e1d10961 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -152,6 +152,10 @@ 4CC299FF176F99E50050C939 /* MPRequestHandlerService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC299FE176F99E50050C939 /* MPRequestHandlerService.m */; }; 4CC29A02176F9D140050C939 /* MPTestAssociateRequestHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC29A01176F9D140050C939 /* MPTestAssociateRequestHandler.m */; }; 4CC3AABD175F4983003EF01B /* HNHRoundedTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC3AAB9175F4983003EF01B /* HNHRoundedTextFieldCell.m */; }; + 4CC3CE011774D6EE00AD2296 /* MPAttachmentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC3CE001774D6EE00AD2296 /* MPAttachmentViewController.m */; }; + 4CC3CE041774D70200AD2296 /* MPNotesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC3CE031774D70200AD2296 /* MPNotesViewController.m */; }; + 4CC3CE061774D73800AD2296 /* AttachmentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CC3CE051774D73800AD2296 /* AttachmentView.xib */; }; + 4CC3CE081774D74700AD2296 /* NotesView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CC3CE071774D74700AD2296 /* NotesView.xib */; }; 4CC6259115BA1C99002F5B11 /* MPOutlineViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6259015BA1C99002F5B11 /* MPOutlineViewDelegate.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 */; }; @@ -468,6 +472,12 @@ 4CC29A01176F9D140050C939 /* MPTestAssociateRequestHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTestAssociateRequestHandler.m; sourceTree = ""; }; 4CC3AAB8175F4983003EF01B /* HNHRoundedTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHRoundedTextFieldCell.h; sourceTree = ""; }; 4CC3AAB9175F4983003EF01B /* HNHRoundedTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHRoundedTextFieldCell.m; sourceTree = ""; }; + 4CC3CDFF1774D6ED00AD2296 /* MPAttachmentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAttachmentViewController.h; sourceTree = ""; }; + 4CC3CE001774D6EE00AD2296 /* MPAttachmentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAttachmentViewController.m; sourceTree = ""; }; + 4CC3CE021774D70200AD2296 /* MPNotesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNotesViewController.h; sourceTree = ""; }; + 4CC3CE031774D70200AD2296 /* MPNotesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNotesViewController.m; sourceTree = ""; }; + 4CC3CE051774D73800AD2296 /* AttachmentView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AttachmentView.xib; sourceTree = ""; }; + 4CC3CE071774D74700AD2296 /* NotesView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NotesView.xib; sourceTree = ""; }; 4CC6258F15BA1C99002F5B11 /* MPOutlineViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineViewDelegate.h; sourceTree = ""; }; 4CC6259015BA1C99002F5B11 /* MPOutlineViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPOutlineViewDelegate.m; sourceTree = ""; }; 4CD78AB716D155FF00768A1D /* 07_NotepadTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 07_NotepadTemplate.pdf; sourceTree = ""; }; @@ -534,6 +544,8 @@ 4C3FFD9D16DAF60600DF9186 /* FilterBar.xib */, 4C76156F1764C0E20015A1A6 /* InspectorView.xib */, 4CE39AC016ECE359000FE29D /* IconSelection.xib */, + 4CC3CE051774D73800AD2296 /* AttachmentView.xib */, + 4CC3CE071774D74700AD2296 /* NotesView.xib */, 4CE8247316E2F2B900573141 /* MPOverlayView.h */, 4CE8247416E2F2B900573141 /* MPOverlayView.m */, 4CFC53BD16E94729007396BE /* MPShadowBox.h */, @@ -994,6 +1006,10 @@ 4C77547416E55FE800970E02 /* MPInspectorViewController.m */, 4CE39ABD16ECE34A000FE29D /* MPIconSelectViewController.h */, 4CE39ABE16ECE34A000FE29D /* MPIconSelectViewController.m */, + 4CC3CDFF1774D6ED00AD2296 /* MPAttachmentViewController.h */, + 4CC3CE001774D6EE00AD2296 /* MPAttachmentViewController.m */, + 4CC3CE021774D70200AD2296 /* MPNotesViewController.h */, + 4CC3CE031774D70200AD2296 /* MPNotesViewController.m */, ); name = "View Controller"; sourceTree = ""; @@ -1245,6 +1261,8 @@ 4C7714AA176C998F00549F2A /* 43_TrashTemplate.pdf in Resources */, 4C7714AC176C9D4600549F2A /* 99_InfoTemplate.pdf in Resources */, 4CF7805F176E75110032EE71 /* ServerSettings.xib in Resources */, + 4CC3CE061774D73800AD2296 /* AttachmentView.xib in Resources */, + 4CC3CE081774D74700AD2296 /* NotesView.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1403,6 +1421,8 @@ 4CA0E3A7176FAF99004D18CB /* MPDocumentQueryService.m in Sources */, 4C83F4AA1774B155006C5FC0 /* Kdb3Tree+NewTree.m in Sources */, 4C83F4AD1774B25F006C5FC0 /* Kdb4Tree+NewTree.m in Sources */, + 4CC3CE011774D6EE00AD2296 /* MPAttachmentViewController.m in Sources */, + 4CC3CE041774D70200AD2296 /* MPNotesViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/MacPass/AttachmentView.xib b/MacPass/AttachmentView.xib new file mode 100644 index 00000000..c4a5e858 --- /dev/null +++ b/MacPass/AttachmentView.xib @@ -0,0 +1,529 @@ + + + + 1080 + 12E55 + 3084 + 1187.39 + 626.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 3084 + + + IBNSLayoutConstraint + NSCustomObject + NSCustomView + NSScrollView + NSScroller + NSTableColumn + NSTableHeaderView + NSTableView + NSTextFieldCell + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + MPAttachmentViewController + + + FirstResponder + + + NSApplication + + + + 268 + + + + 268 + + + + 2304 + + + + 256 + {258, 242} + + + + _NS:13 + YES + NO + YES + + + 256 + {258, 17} + + + + _NS:16 + + + + + -2147483392 + {{224, 0}, {16, 17}} + + _NS:19 + + + + 116 + 40 + 1000 + + 75497536 + 2048 + + + LucidaGrande + 11 + 3100 + + + 3 + MC4zMzMzMzI5ODU2AA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337641536 + 2048 + Text Cell + + LucidaGrande + 13 + 1044 + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + 3 + YES + YES + + + + 136 + 40 + 1000 + + 75497536 + 2048 + + + + + + + 337641536 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + -700448768 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 17}, {258, 242}} + + + + _NS:11 + + + 4 + + + + -2147483392 + {{224, 17}, {15, 102}} + + + + _NS:58 + NO + + _doScroller: + 37 + 0.1947367936372757 + + + + -2147483392 + {{1, 119}, {223, 15}} + + + + _NS:60 + NO + 1 + + _doScroller: + 0.57142859697341919 + + + + 2304 + + + + {{1, 0}, {258, 17}} + + + + _NS:15 + + + 4 + + + {{20, 20}, {260, 260}} + + + + _NS:9 + 133682 + + + + + QSAAAEEgAABBmAAAQZgAAA + 0.25 + 4 + 1 + + + {300, 300} + + + + NSView + + + + + + + view + + + + 27 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + + + 2 + + + + + + + + + + + 3 + + + + + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + + + + 8 + + + + + + + + 9 + + + + + 10 + + + + + 16 + + + + + 17 + + + + + 25 + + + + + 26 + + + + + + + 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 + + + + + + 27 + + + + + MPAttachmentViewController + MPViewController + + IBProjectSource + ./Classes/MPAttachmentViewController.h + + + + MPViewController + NSViewController + + IBProjectSource + ./Classes/MPViewController.h + + + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + + + + 0 + IBCocoaFramework + YES + 3 + YES + + diff --git a/MacPass/Base.lproj/InspectorView.xib b/MacPass/Base.lproj/InspectorView.xib index 84725e28..8c50b336 100644 --- a/MacPass/Base.lproj/InspectorView.xib +++ b/MacPass/Base.lproj/InspectorView.xib @@ -22,14 +22,8 @@ NSScroller NSSegmentedCell NSSegmentedControl - NSTabView - NSTabViewItem - NSTableCellView - NSTableColumn - NSTableView NSTextField NSTextFieldCell - NSTextView NSView @@ -64,7 +58,7 @@ NeXT Encapsulated PostScript v1.2 pasteboard type NeXT TIFF v4.0 pasteboard type - {{20, 433}, {48, 48}} + {{20, 236}, {48, 48}} @@ -89,7 +83,7 @@ 268 - {{73, 449}, {151, 17}} + {{73, 252}, {151, 17}} @@ -111,12 +105,12 @@ 6 System controlColor - + 3 MC42NjY2NjY2NjY3AA - + 6 System controlTextColor @@ -131,7 +125,7 @@ 268 - {{0, 423}, {241, 2}} + {{0, 226}, {241, 2}} @@ -141,10 +135,54 @@ 268 - + + + + 268 + {{87, 2}, {67, 25}} + + + + _NS:9 + YES + + 67108864 + 0 + + _NS:9 + + + + 32 + + NSImage + 07_NotepadTemplate + + + 0 + + + 32 + + NSImage + 04_KlipperTemplate + + + 1 + 0 + + + 1 + 2 + 4 + + NO + + {241, 30} + _NS:9 HNHGradientView @@ -167,7 +205,7 @@ 268 - {{17, 355}, {35, 14}} + {{17, 158}, {35, 14}} @@ -200,7 +238,7 @@ 268 - {{80, 351}, {141, 22}} + {{80, 154}, {141, 22}} @@ -218,7 +256,7 @@ 6 System textBackgroundColor - + 3 MQA @@ -235,7 +273,7 @@ 268 - {{17, 323}, {58, 14}} + {{17, 126}, {58, 14}} @@ -256,7 +294,7 @@ 268 - {{80, 319}, {141, 22}} + {{80, 122}, {141, 22}} @@ -278,7 +316,7 @@ 268 - {{80, 287}, {141, 22}} + {{80, 90}, {141, 22}} @@ -300,7 +338,7 @@ 268 - {{17, 291}, {25, 14}} + {{17, 94}, {25, 14}} @@ -321,7 +359,7 @@ 268 - {{17, 237}, {58, 14}} + {{17, 40}, {58, 14}} @@ -342,7 +380,7 @@ 268 - {{80, 233}, {141, 22}} + {{80, 36}, {141, 22}} @@ -364,10 +402,10 @@ 268 - {{80, 206}, {141, 19}} + {{80, 9}, {141, 19}} - + _NS:9 {250, 750} YES @@ -391,108 +429,22 @@ 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} + {241, 196} _NS:13 - {241, 393} + {241, 196} _NS:13 - {241, 393} + {241, 196} @@ -504,7 +456,7 @@ 256 - {{225, 0}, {16, 393}} + {{225, 0}, {16, 196}} @@ -518,7 +470,7 @@ 256 - {{0, 377}, {241, 16}} + {{0, 180}, {241, 16}} @@ -530,7 +482,7 @@ 0.50602412223815918 - {{0, 30}, {241, 393}} + {{0, 30}, {241, 196}} @@ -544,316 +496,12 @@ 1 - {241, 501} + {241, 304} _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 - @@ -897,38 +545,6 @@ 993 - - - attachmenScrollView - - - - 1222 - - - - attachmentTableView - - - - 1223 - - - - notesScrollView - - - - 1224 - - - - notesTextView - - - - 1225 - _popUpPasswordGenerator: @@ -945,14 +561,6 @@ 1282 - - - notesOrAttachmentControl - - - - 1283 - passwordTextField @@ -993,6 +601,14 @@ 1318 + + + notesOrAttachmentControl + + + + 1347 + documentView @@ -1001,83 +617,6 @@ 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 - @@ -1487,6 +1026,38 @@ 662 + + + 9 + 0 + + 9 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + 8 @@ -1503,6 +1074,7 @@ 40 1 + @@ -1536,255 +1108,6 @@ - - 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 @@ -1901,118 +1224,6 @@ 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 @@ -2406,8 +1617,6 @@ - - @@ -2431,19 +1640,6 @@ - - 1230 - - - - - - - - 1275 - - - 1231 @@ -2682,74 +1878,27 @@ - 1265 - - - - - 1290 - - - - - 1301 - + 1342 + - - + - + - 1302 - - - - - + 1343 + + - 1303 - - - - - + 1344 + + - 1304 - - - - - 1305 - - - - - 1310 - - - - - 1311 - - - - - 1313 - - - - - 1314 - - - - - 1316 - - + 1346 + + @@ -2763,50 +1912,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - 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 @@ -2832,18 +1937,9 @@ - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2887,7 +1983,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 @@ -2901,24 +1996,16 @@ 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 + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -2963,6 +2050,8 @@ com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin @@ -2991,7 +2080,7 @@ - 1318 + 1347 @@ -3065,29 +2154,14 @@ MPInspectorViewController MPViewController - - _popUpPasswordGenerator: - id - - - _popUpPasswordGenerator: - - _popUpPasswordGenerator: - id - - NSTextField - NSScrollView - NSTableView HNHGradientView NSButton NSTextField MPPopupImageView NSTextField NSSegmentedControl - NSScrollView - NSTextView NSTextField NSView NSTextField @@ -3099,14 +2173,6 @@ URLTextField NSTextField - - attachmenScrollView - NSScrollView - - - attachmentTableView - NSTableView - bottomBar HNHGradientView @@ -3131,14 +2197,6 @@ notesOrAttachmentControl NSSegmentedControl - - notesScrollView - NSScrollView - - - notesTextView - NSTextView - passwordTextField NSTextField @@ -3198,7 +2256,6 @@ {128, 128} {128, 128} - {15, 15} {128, 128} YES diff --git a/MacPass/MPAttachmentViewController.h b/MacPass/MPAttachmentViewController.h new file mode 100644 index 00000000..7901ce26 --- /dev/null +++ b/MacPass/MPAttachmentViewController.h @@ -0,0 +1,13 @@ +// +// MPAttachmentViewController.h +// MacPass +// +// Created by Michael Starke on 21.06.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import "MPViewController.h" + +@interface MPAttachmentViewController : MPViewController + +@end diff --git a/MacPass/MPAttachmentViewController.m b/MacPass/MPAttachmentViewController.m new file mode 100644 index 00000000..51a26364 --- /dev/null +++ b/MacPass/MPAttachmentViewController.m @@ -0,0 +1,38 @@ +// +// MPAttachmentViewController.m +// MacPass +// +// Created by Michael Starke on 21.06.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import "MPAttachmentViewController.h" +#import "Kdb4Node.h" + +@interface MPAttachmentViewController () + +@property (retain) NSArrayController *attachmentController; + +@end + +@implementation MPAttachmentViewController + +- (id)init { + self = [super initWithNibName:@"AttachmentView" bundle:nil]; + if(self) { + } + return self; +} + +- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { + NSTableCellView *tableCellView = [tableView makeViewWithIdentifier:[tableColumn identifier] owner:tableView]; + BinaryRef *binaryRef = [self.attachmentController arrangedObjects][row]; + [tableCellView.textField bind:NSValueBinding toObject:binaryRef withKeyPath:@"key" options:nil]; + return tableCellView; +} + +- (void)tableView:(NSTableView *)tableView didAddRowView:(NSTableRowView *)rowView forRow:(NSInteger)row { + NSLog(@"didAddRowView"); +} + +@end diff --git a/MacPass/MPInspectorViewController.h b/MacPass/MPInspectorViewController.h index 8b6ffa6f..3b30b247 100644 --- a/MacPass/MPInspectorViewController.h +++ b/MacPass/MPInspectorViewController.h @@ -14,7 +14,7 @@ @class HNHGradientView; @class MPDocumentWindowController; -@interface MPInspectorViewController : MPViewController +@interface MPInspectorViewController : MPViewController @property (assign) IBOutlet MPPopupImageView *itemImageView; @property (assign) IBOutlet NSTextField *itemNameTextfield; @@ -26,14 +26,10 @@ @property (assign) IBOutlet NSTextField *titleOrNameLabel; @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 */ - (void)setupNotifications:(MPDocumentWindowController *)windowController; diff --git a/MacPass/MPInspectorViewController.m b/MacPass/MPInspectorViewController.m index b19c2a73..e28fd898 100644 --- a/MacPass/MPInspectorViewController.m +++ b/MacPass/MPInspectorViewController.m @@ -17,10 +17,14 @@ #import "MPDocumentWindowController.h" #import "MPOutlineViewController.h" #import "MPOutlineViewDelegate.h" +#import "MPAttachmentViewController.h" +#import "MPNotesViewController.h" + #import "KdbLib.h" #import "Kdb4Node.h" #import "KdbGroup+Undo.h" #import "KdbEntry+Undo.h" + #import "HNHGradientView.h" enum { @@ -39,7 +43,6 @@ enum { @property (assign) IBOutlet NSButton *generatePasswordButton; @property (nonatomic, assign) NSDate *modificationDate; @property (nonatomic, assign) NSDate *creationDate; -@property (retain, nonatomic) NSArrayController *attachmentController; @end @@ -54,14 +57,12 @@ enum { if (self) { _selectedEntry = nil; _selectedGroup = nil; - _attachmentController = [[NSArrayController alloc] init]; } return self; } - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; - [_attachmentController release]; [_activePopover release]; [super dealloc]; } @@ -71,10 +72,6 @@ enum { [[self.itemImageView cell] setBackgroundStyle:NSBackgroundStyleRaised]; [self.itemImageView setTarget:self]; [_bottomBar setBorderType:HNHBorderTop]; - [[_infoTextField cell] setBackgroundStyle:NSBackgroundStyleRaised]; - [_attachmentTableView setDelegate:self]; - [_attachmentTableView bind:NSContentBinding toObject:_attachmentController withKeyPath:@"arrangedObjects" options:nil]; - [_attachmentTableView setHidden:YES]; [_notesOrAttachmentControl setAction:@selector(_toggleInfoTab:)]; [_notesOrAttachmentControl setTarget:self]; @@ -124,7 +121,6 @@ enum { else { [self _clearContent]; } - [self _updateAttachments]; } - (void)_showEntry { @@ -139,7 +135,7 @@ enum { [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.notesTextView bind:NSValueBinding toObject:self.selectedEntry withKeyPath:MPEntryNotesUndoableKey options:nil]; + //[self.notesTextView bind:NSValueBinding toObject:self.selectedEntry withKeyPath:MPEntryNotesUndoableKey options:nil]; [self _setInputEnabled:YES]; } @@ -162,7 +158,6 @@ enum { [self.passwordTextField setStringValue:@""]; [self.usernameTextField setStringValue:@""]; [self.URLTextField setStringValue:@""]; - [self.notesTextView setString:@""]; // Reste toggle [self.notesOrAttachmentControl setSelected:NO forSegment:MPNotesTab]; @@ -180,7 +175,6 @@ enum { [self.usernameTextField unbind:NSValueBinding]; [self.titleTextField unbind:NSValueBinding]; [self.URLTextField unbind:NSValueBinding]; - [self.notesTextView unbind:NSValueBinding]; [self.itemNameTextfield setStringValue:NSLocalizedString(@"INSPECTOR_NO_SELECTION", @"No item selected in inspector")]; [self.itemImageView setImage:[NSImage imageNamed:NSImageNameActionTemplate]]; @@ -190,7 +184,6 @@ enum { [self.usernameTextField setStringValue:@""]; [self.titleTextField setStringValue:@""]; [self.URLTextField setStringValue:@""]; - [self.notesTextView setString:@""]; } @@ -207,59 +200,45 @@ enum { [self.usernameTextField setEnabled:enabled]; [self.URLTextField setEnabled:enabled]; [self.generatePasswordButton setEnabled:enabled]; - [self.notesTextView setEditable:enabled]; [self.notesOrAttachmentControl setEnabled:enabled forSegment:MPNotesTab]; [self.notesOrAttachmentControl setEnabled:enabled forSegment:MPAttachmentTab]; } -- (void)_updateAttachments { - if(self.selectedEntry) { - if([self.selectedEntry isKindOfClass:[Kdb4Entry class]]) { - [self.attachmentController bind:NSContentArrayBinding toObject:self.selectedEntry withKeyPath:@"binaries" options:nil]; - } - } - else { - [self.attachmentController unbind:NSContentArrayBinding]; - [self.attachmentController setContent:nil]; - } - [self.attachmentTableView setHidden:(0 == [[self.attachmentController arrangedObjects] count])]; -} - #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; + [self _showNotesPopover]; break; case MPAttachmentTab: - oldView = _notesScrollView; - infoView = _attachmenScrollView; + [self _showAttachmentPopover]; + break; + 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]; } #pragma mark Popovers +- (void)_showNotesPopover { + [self.notesOrAttachmentControl setEnabled:NO forSegment:MPNotesTab]; + MPNotesViewController *notesController = [[MPNotesViewController alloc] init]; + // setup entry + [self _showPopopver:notesController atView:self.notesOrAttachmentControl onEdge:NSMinYEdge]; + [notesController release]; +} + +- (void)_showAttachmentPopover { + [self.notesOrAttachmentControl setEnabled:NO forSegment:MPAttachmentTab]; + MPAttachmentViewController *attachmentController = [[MPAttachmentViewController alloc] init]; + // setup entry + [self _showPopopver:attachmentController atView:self.notesOrAttachmentControl onEdge:NSMinYEdge]; + [attachmentController release]; +} + - (void)_showImagePopup:(id)sender { [self _showPopopver:[[[MPIconSelectViewController alloc] init] autorelease] atView:self.itemImageView onEdge:NSMinYEdge]; } @@ -285,6 +264,8 @@ enum { - (void)popoverDidClose:(NSNotification *)notification { /* We do not enable the button all the time, but it's wokring find this way */ [self.generatePasswordButton setEnabled:YES]; + [self.notesOrAttachmentControl setEnabled:YES forSegment:MPNotesTab]; + [self.notesOrAttachmentControl setEnabled:YES forSegment:MPAttachmentTab]; id controller = _activePopover.contentViewController; if([controller respondsToSelector:@selector(password)]) { [self.selectedEntry setPasswordUndoable:[controller password]]; @@ -312,16 +293,4 @@ enum { [self _updateContent]; } -#pragma mark NSTableViewDelegate -- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { - NSTableCellView *tableCellView = [tableView makeViewWithIdentifier:[tableColumn identifier] owner:tableView]; - BinaryRef *binaryRef = [self.attachmentController arrangedObjects][row]; - [tableCellView.textField bind:NSValueBinding toObject:binaryRef withKeyPath:@"key" options:nil]; - return tableCellView; -} - -- (void)tableView:(NSTableView *)tableView didAddRowView:(NSTableRowView *)rowView forRow:(NSInteger)row { - NSLog(@"didAddRowView"); -} - @end diff --git a/MacPass/MPNotesViewController.h b/MacPass/MPNotesViewController.h new file mode 100644 index 00000000..04d3e5e5 --- /dev/null +++ b/MacPass/MPNotesViewController.h @@ -0,0 +1,13 @@ +// +// MPNotesViewController.h +// MacPass +// +// Created by Michael Starke on 21.06.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import "MPViewController.h" + +@interface MPNotesViewController : MPViewController + +@end diff --git a/MacPass/MPNotesViewController.m b/MacPass/MPNotesViewController.m new file mode 100644 index 00000000..d50f2fa1 --- /dev/null +++ b/MacPass/MPNotesViewController.m @@ -0,0 +1,24 @@ +// +// MPNotesViewController.m +// MacPass +// +// Created by Michael Starke on 21.06.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import "MPNotesViewController.h" + +@interface MPNotesViewController () + +@end + +@implementation MPNotesViewController + +- (id)init { + self = [super initWithNibName:@"NotesView" bundle:nil]; + if(self) { + } + return self; +} + +@end diff --git a/MacPass/MacPass-Info.plist b/MacPass/MacPass-Info.plist index fca1ec4a..14449890 100644 --- a/MacPass/MacPass-Info.plist +++ b/MacPass/MacPass-Info.plist @@ -48,7 +48,7 @@ CFBundleSignature ???? CFBundleVersion - 843 + 866 LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHumanReadableCopyright diff --git a/MacPass/NotesView.xib b/MacPass/NotesView.xib new file mode 100644 index 00000000..038b4238 --- /dev/null +++ b/MacPass/NotesView.xib @@ -0,0 +1,440 @@ + + + + 1080 + 12E55 + 3084 + 1187.39 + 626.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 3084 + + + IBNSLayoutConstraint + NSCustomObject + NSCustomView + NSScrollView + NSScroller + NSTextView + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + MPNotesViewController + + + FirstResponder + + + NSApplication + + + + 268 + + + + 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 + + {358, 358} + + + + _NS:13 + + + + + + + + + + + + 166 + + + + 358 + 1 + + + 67121127 + 0 + + + 3 + MQA + + + + 6 + System + selectedTextBackgroundColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + selectedTextColor + + 3 + MAA + + + + + + + 1 + MCAwIDEAA + + + {8, -8} + 13 + + + + + + 1 + + 6 + {697, 10000000} + + + + {{1, 1}, {358, 358}} + + + + _NS:11 + + + + {4, 5} + + 79691776 + + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + 3 + MCAwAA + + + + 4 + + + + 256 + {{343, 1}, {16, 358}} + + + + _NS:83 + NO + + _doScroller: + 0.9487951807228916 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + + _NS:33 + NO + 1 + + _doScroller: + 1 + 0.94565218687057495 + + + {{20, 20}, {360, 360}} + + + + _NS:9 + 133138 + + + + 0.25 + 4 + 1 + + + {400, 400} + + + + NSView + + + + + + + view + + + + 37 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + + + + 2 + + + + + + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 27 + + + + + 29 + + + + + 30 + + + + + 36 + + + + + + + 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 + + + + + + 37 + + + + + MPNotesViewController + MPViewController + + IBProjectSource + ./Classes/MPNotesViewController.h + + + + MPViewController + NSViewController + + IBProjectSource + ./Classes/MPViewController.h + + + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + + + + 0 + IBCocoaFramework + YES + 3 + YES + +