From 665167cf421f9f9a8d69d87dc1a4376d69156a47 Mon Sep 17 00:00:00 2001 From: michael starke Date: Sat, 15 Jun 2013 12:28:33 +0200 Subject: [PATCH] Reenabled the "Toggle Inspector" Behaviour --- MacPass/MPDocumentWindowController.m | 8 +++++++- MacPass/MPToolbarDelegate.m | 6 +++--- MacPass/MacPass-Info.plist | 2 +- MacPass/en.lproj/Localizable.strings | Bin 4720 -> 4692 bytes 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/MacPass/MPDocumentWindowController.m b/MacPass/MPDocumentWindowController.m index 1539f481..aea1737a 100644 --- a/MacPass/MPDocumentWindowController.m +++ b/MacPass/MPDocumentWindowController.m @@ -183,7 +183,13 @@ } - (void)toggleInspector:(id)sender { - + NSView *inspectorView = [_inspectorTabViewController view]; + if([inspectorView superview]) { + [inspectorView removeFromSuperview]; + } + else { + [_splitView addSubview:inspectorView]; + } } - (void)showEntries { diff --git a/MacPass/MPToolbarDelegate.m b/MacPass/MPToolbarDelegate.m index 40553c7f..288deab2 100644 --- a/MacPass/MPToolbarDelegate.m +++ b/MacPass/MPToolbarDelegate.m @@ -39,7 +39,7 @@ NSString *const MPToolbarItemInspector = @"TOOLBAR_INSPECTOR"; - (id)init { self = [super init]; if (self) { - _toolbarIdentifiers = [@[ MPToolbarItemAddEntry, MPToolbarItemDelete, MPToolbarItemAddGroup, MPToolbarItemAction, NSToolbarFlexibleSpaceItemIdentifier, MPToolbarItemLock ] retain]; + _toolbarIdentifiers = [@[ MPToolbarItemAddEntry, MPToolbarItemDelete, MPToolbarItemAddGroup, MPToolbarItemAction, NSToolbarFlexibleSpaceItemIdentifier, MPToolbarItemLock, MPToolbarItemInspector ] retain]; _toolbarImages = [[self createToolbarImages] retain]; _toolbarItems = [[NSMutableDictionary alloc] initWithCapacity:[self.toolbarIdentifiers count]]; } @@ -104,7 +104,7 @@ NSString *const MPToolbarItemInspector = @"TOOLBAR_INSPECTOR"; [button setImagePosition:NSImageOnly]; [button sizeToFit]; [button setAction:[self _actionForToolbarItemIdentifier:itemIdentifier]]; - + NSRect fittingRect = [button frame]; fittingRect.size.width = MAX( (CGFloat)32.0,fittingRect.size.width); [button setFrame:fittingRect]; @@ -148,7 +148,7 @@ NSString *const MPToolbarItemInspector = @"TOOLBAR_INSPECTOR"; MPToolbarItemAddGroup: NSLocalizedString(@"ADD_GROUP", @""), MPToolbarItemDelete: NSLocalizedString(@"DELETE", @""), MPToolbarItemEdit: NSLocalizedString(@"EDIT", @""), - MPToolbarItemInspector: NSLocalizedString(@"TOGGLE_INSPECTOR", @"") + MPToolbarItemInspector: NSLocalizedString(@"INSPECTOR", @"") }; return labelDict[identifier]; } diff --git a/MacPass/MacPass-Info.plist b/MacPass/MacPass-Info.plist index 66628b08..1983eac9 100644 --- a/MacPass/MacPass-Info.plist +++ b/MacPass/MacPass-Info.plist @@ -48,7 +48,7 @@ CFBundleSignature ???? CFBundleVersion - CE1 + CFD LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHumanReadableCopyright diff --git a/MacPass/en.lproj/Localizable.strings b/MacPass/en.lproj/Localizable.strings index 3d0fd2fb05f02f5b19c985a2681eb9ee437cfd53..24d3c82d653393bebfe525b0d659f94376ad879d 100644 GIT binary patch delta 24 gcmeyMaz$lB5%1&%UYW^%xU(h;@N;dJ;|pQ|0DUV6Z2$lO delta 44 xcmcbj@|V