From 6056ff3722bd3e298ec6917eba565fac5afdd40e Mon Sep 17 00:00:00 2001 From: michael starke Date: Sun, 23 Jun 2013 23:37:39 +0200 Subject: [PATCH] Added created/modifed display (rough) --- MacPass/Base.lproj/InspectorView.xib | 304 +++++++++++++++++---------- MacPass/MPInspectorViewController.h | 4 +- MacPass/MPInspectorViewController.m | 37 ++-- MacPass/MPOverlayView.m | 1 - MacPass/MPShadowBox.m | 2 +- MacPass/MacPass-Info.plist | 2 +- MacPass/de.lproj/Localizable.strings | Bin 4998 -> 5442 bytes MacPass/en.lproj/Localizable.strings | Bin 4848 -> 5286 bytes 8 files changed, 208 insertions(+), 142 deletions(-) diff --git a/MacPass/Base.lproj/InspectorView.xib b/MacPass/Base.lproj/InspectorView.xib index 2ae6688e..ef6cd7e1 100644 --- a/MacPass/Base.lproj/InspectorView.xib +++ b/MacPass/Base.lproj/InspectorView.xib @@ -94,7 +94,7 @@ {{73, 477}, {209, 17}} - + _NS:1535 {200, 750} YES @@ -137,23 +137,26 @@ {299, 30} - _NS:9 HNHGradientView 268 - {{73, 429}, {154, 25}} + {{86, 434}, {128, 19}} - + _NS:9 YES 67108864 - 0 - + 131072 + + LucidaGrande + 11 + 3100 + _NS:9 @@ -175,23 +178,23 @@ 12 - {{0, 31}, {299, 399}} + {{0, 31}, {299, 403}} - _NS:9 1 - + 256 268 - {{17, 365}, {35, 14}} + {{17, 369}, {35, 14}} + _NS:1535 YES @@ -199,11 +202,7 @@ 68157504 272761856 Name - - LucidaGrande - 11 - 3100 - + _NS:1535 @@ -222,8 +221,9 @@ 268 - {{20, 335}, {259, 22}} + {{20, 339}, {259, 22}} + _NS:9 YES @@ -256,8 +256,9 @@ 268 - {{17, 313}, {58, 14}} + {{17, 317}, {58, 14}} + _NS:1535 YES @@ -276,8 +277,9 @@ 268 - {{20, 283}, {259, 22}} + {{20, 287}, {259, 22}} + _NS:9 YES @@ -297,8 +299,9 @@ 268 - {{20, 231}, {259, 22}} + {{20, 235}, {259, 22}} + _NS:9 YES @@ -318,8 +321,9 @@ 268 - {{17, 261}, {25, 14}} + {{17, 265}, {25, 14}} + _NS:1535 YES @@ -338,8 +342,9 @@ 268 - {{17, 209}, {58, 14}} + {{17, 213}, {58, 14}} + _NS:1535 YES @@ -358,8 +363,9 @@ 268 - {{20, 179}, {259, 22}} + {{20, 183}, {259, 22}} + _NS:9 YES @@ -379,8 +385,9 @@ 268 - {{20, 152}, {259, 19}} + {{20, 156}, {259, 19}} + _NS:9 {250, 750} @@ -408,8 +415,9 @@ 268 - {{17, 131}, {42, 14}} + {{17, 135}, {42, 14}} + _NS:1535 YES @@ -428,8 +436,9 @@ 268 - {{20, 105}, {259, 18}} + {{20, 109}, {259, 18}} + _NS:9 YES @@ -449,9 +458,10 @@ 268 - {{17, 20}, {46, 14}} + {{17, 42}, {46, 14}} - + + _NS:1535 YES @@ -466,8 +476,30 @@ NO + + + 268 + {{17, 20}, {51, 14}} + + + _NS:1535 + YES + + 68157504 + 272761856 + Modified + + _NS:1535 + + + + + NO + - {299, 399} + {299, 403} + + _NS:11 @@ -478,7 +510,7 @@ 2 - + 256 @@ -495,7 +527,6 @@ {257, 123} - _NS:13 YES @@ -575,7 +606,6 @@ {{1, 1}, {257, 123}} - _NS:11 @@ -587,7 +617,6 @@ -2147483392 {{37, 1}, {16, 2}} - _NS:58 NO @@ -600,7 +629,6 @@ -2147483392 {{1, 147}, {52, 16}} - _NS:60 NO @@ -610,9 +638,8 @@ 0.99487179487179489 - {{20, 229}, {259, 125}} + {{20, 233}, {259, 125}} - _NS:9 133682 @@ -635,29 +662,9 @@ 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 - - {257, 148} + {257, 152} - - + _NS:13 @@ -717,9 +724,8 @@ - {{1, 1}, {257, 148}} + {{1, 1}, {257, 152}} - _NS:11 @@ -748,10 +754,8 @@ 256 - {{242, 1}, {16, 148}} + {{242, 1}, {16, 152}} - - _NS:83 NO @@ -764,7 +768,6 @@ -2147483392 {{-100, -100}, {87, 18}} - _NS:33 NO @@ -775,10 +778,9 @@ 0.94565218687057495 - {{20, 20}, {259, 150}} + {{20, 20}, {259, 154}} - - + _NS:9 133138 @@ -791,9 +793,8 @@ 268 - {{17, 362}, {79, 17}} + {{17, 366}, {79, 17}} - _NS:1535 YES @@ -812,9 +813,8 @@ 268 - {{17, 178}, {35, 17}} + {{17, 182}, {35, 17}} - _NS:1535 YES @@ -833,9 +833,8 @@ 268 - {{217, 202}, {62, 19}} + {{217, 206}, {62, 19}} - _NS:9 YES @@ -858,9 +857,8 @@ 268 - {{145, 202}, {64, 19}} + {{145, 206}, {64, 19}} - _NS:9 YES @@ -881,9 +879,7 @@ NO - {299, 399} - - + {299, 403} _NS:28 @@ -892,13 +888,13 @@ - + 6 YES YES - + @@ -1033,11 +1029,19 @@ - infoTextField + createdTextField - 1888 + 1939 + + + + modifiedTextField + + + + 1940 @@ -1235,7 +1239,7 @@ 3 1 - 99 + 95 1000 @@ -1826,6 +1830,54 @@ 1397 + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + 3 @@ -1842,22 +1894,6 @@ 40 3 - - - 4 - 0 - - 4 - 1 - - 20 - - 1000 - - 9 - 40 - 3 - 5 @@ -2350,6 +2386,7 @@ + @@ -3149,11 +3186,6 @@ - - 1918 - - - 1919 @@ -3164,6 +3196,34 @@ + + 1929 + + + + + + + + 1930 + + + + + 1935 + + + + + 1937 + + + + + 1938 + + + @@ -3234,7 +3294,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - + @@ -3265,8 +3325,10 @@ - + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3399,9 +3461,14 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + @@ -3447,7 +3514,7 @@ - 1920 + 1940 @@ -3494,13 +3561,24 @@ MPInspectorViewController MPViewController + + _popUpPasswordGenerator: + id + + + _popUpPasswordGenerator: + + _popUpPasswordGenerator: + id + + NSTextField NSTableView HNHGradientView + NSTextField NSButton NSSegmentedControl - NSTextField MPPopupImageView NSTextField NSTextView @@ -3524,6 +3602,10 @@ bottomBar HNHGradientView + + createdTextField + NSTextField + generatePasswordButton NSButton @@ -3532,10 +3614,6 @@ infoTabControl NSSegmentedControl - - infoTextField - NSTextField - itemImageView MPPopupImageView diff --git a/MacPass/MPInspectorViewController.h b/MacPass/MPInspectorViewController.h index 042af0ca..e2eb0814 100644 --- a/MacPass/MPInspectorViewController.h +++ b/MacPass/MPInspectorViewController.h @@ -25,8 +25,8 @@ @property (assign) IBOutlet NSTextField *passwordTextField; @property (assign) IBOutlet NSTextField *titleOrNameLabel; @property (assign) IBOutlet HNHGradientView *bottomBar; -@property (assign) IBOutlet NSTextField *infoTextField; -@property (assign) IBOutlet NSView *scrollContentView; +@property (assign) IBOutlet NSTextField *createdTextField; +@property (assign) IBOutlet NSTextField *modifiedTextField; @property (assign) IBOutlet NSSegmentedControl *infoTabControl; @property (assign) IBOutlet NSTableView *attachmentTableView; @property (assign) IBOutlet NSTextView *notesTextView; diff --git a/MacPass/MPInspectorViewController.m b/MacPass/MPInspectorViewController.m index 75b64142..4258f58f 100644 --- a/MacPass/MPInspectorViewController.m +++ b/MacPass/MPInspectorViewController.m @@ -75,14 +75,11 @@ enum { } - (void)didLoadView { - [self.scrollContentView setAutoresizingMask:NSViewWidthSizable]; + //[self.scrollContentView setAutoresizingMask:NSViewWidthSizable]; [[self.itemImageView cell] setBackgroundStyle:NSBackgroundStyleRaised]; [self.itemImageView setTarget:self]; [_bottomBar setBorderType:HNHBorderTop]; - //[[_infoTabControl cell] setTag:MPAdvancedTab forSegment:MPAdvancedTab]; - //[[_infoTabControl cell] setTag:MPGeneralTab forSegment:MPGeneralTab]; - [_infoTabControl bind:NSSelectedIndexBinding toObject:self withKeyPath:@"activeTab" options:nil]; [_tabView bind:NSSelectedIndexBinding toObject:self withKeyPath:@"activeTab" options:nil]; @@ -100,33 +97,22 @@ enum { object:windowController]; } -- (void)_updateInfoString { - NSDate *modificationDate; - NSDate *creationDate; - if(self.selectedEntry) { - modificationDate = self.selectedEntry.lastModificationTime; - creationDate = self.selectedEntry.creationTime; - } - else { - modificationDate = self.selectedGroup.lastModificationTime; - creationDate = self.selectedGroup.creationTime; - } +- (void)setModificationDate:(NSDate *)modificationDate { NSString *modificationString = [NSDateFormatter localizedStringFromDate:modificationDate dateStyle:NSDateFormatterShortStyle timeStyle:NSDateFormatterShortStyle]; - NSString *creationString = [NSDateFormatter localizedStringFromDate:modificationDate - dateStyle:NSDateFormatterShortStyle - timeStyle:NSDateFormatterShortStyle]; - - [self.infoTextField setStringValue:[NSString stringWithFormat:@"created: %@ modified: %@", creationString, modificationString]]; -} + NSString *modifedAtTemplate = NSLocalizedString(@"MODIFED_AT_%@", @"Modifed at template string. %@ is replaced by locaized date and time"); + [self.modifiedTextField setStringValue:[NSString stringWithFormat:modifedAtTemplate, modificationString]]; -- (void)setModificationDate:(NSDate *)modificationDate { - [self _updateInfoString]; } - (void)setCreationDate:(NSDate *)creationDate { - [self _updateInfoString]; + NSString *creationString = [NSDateFormatter localizedStringFromDate:creationDate + dateStyle:NSDateFormatterShortStyle + timeStyle:NSDateFormatterShortStyle]; + + NSString *createdAtTemplate = NSLocalizedString(@"CREATED_AT_%@", @"Created at template string. %@ is replaced by locaized date and time"); + [self.createdTextField setStringValue:[NSString stringWithFormat:createdAtTemplate, creationString]]; } - (void)_updateContent { @@ -224,6 +210,9 @@ enum { [self.URLTextField setStringValue:@""]; [self.notesTextView setString:@""]; + [self.createdTextField setStringValue:@""]; + [self.modifiedTextField setStringValue:@""]; + } - (void)_setInputEnabled:(BOOL)enabled { diff --git a/MacPass/MPOverlayView.m b/MacPass/MPOverlayView.m index b62a8cda..7c99c57b 100644 --- a/MacPass/MPOverlayView.m +++ b/MacPass/MPOverlayView.m @@ -18,7 +18,6 @@ NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:[self bounds] xRadius:10 yRadius:10]; [backgroundColor set]; [path fill]; - [[NSGraphicsContext currentContext] restoreGraphicsState]; } diff --git a/MacPass/MPShadowBox.m b/MacPass/MPShadowBox.m index f79e6843..49569164 100644 --- a/MacPass/MPShadowBox.m +++ b/MacPass/MPShadowBox.m @@ -61,7 +61,7 @@ - (void)setShadowDisplay:(MPShadowDisplay)shadowDisplay { if(_shadowDisplay != shadowDisplay) { _shadowDisplay = shadowDisplay; - [self needsDisplay]; + [self setNeedsDisplay:YES]; } } diff --git a/MacPass/MacPass-Info.plist b/MacPass/MacPass-Info.plist index 1a936f95..4e3fee16 100644 --- a/MacPass/MacPass-Info.plist +++ b/MacPass/MacPass-Info.plist @@ -48,7 +48,7 @@ CFBundleSignature ???? CFBundleVersion - 990 + 1000 LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHumanReadableCopyright diff --git a/MacPass/de.lproj/Localizable.strings b/MacPass/de.lproj/Localizable.strings index ed872bfd39d658928919318bc9d1c6112b5ca64f..52ebd8297529871a50d589bb31848f49fbe469f7 100644 GIT binary patch delta 439 zcmchSJqp4=6oe;WK+@YU0TEJYF9=Fhu!usi5BXCT5|wD9jhz?pB0?H#4`AyJ?7e}L zHE1K27W?+??Bkm^hsMP^-SxeV3^9CcSR)A43H3^`LQ?(+tf^&?SYVDO=j!OPO6o!p zUbA6I39zM}V2O|fiCw8jZ=O#Q{l>&fr2H1J(1HOIHe3wQ!<4lTPj#L$G&$AbF*%>9 zm13GCWVESrrTnHpDtm{%5wWw=3XX|?=n GoU2bYo=xTe delta 25 hcmX@4)uz7T8SCT(c9YHD*w(R3p1|d@`22gCj!-kaS^)2eabA7AgT%*#fZ=&{$+=TLHy@4%$4Cbt_A~FVNN$ vprL64<0C&TKJsPo2l~X5!3~d(a^cR-1Unq+r^)--L?=6N+HLOQO5*?k{#i{u delta 24 gcmZ3c`9XEV0@lq{Y|B_C39wBT;J4fCz>~%S0CwUC8~^|S