From eeada7904bd0e9a112580d7de0c191a55e55f2fd Mon Sep 17 00:00:00 2001 From: michael starke Date: Wed, 26 Jun 2013 02:05:57 +0200 Subject: [PATCH] Disabled toolbar items on lock screen (drop down menu on action button still enabled) --- MacPass/MPDocumentWindowController.m | 8 +++++--- MacPass/MacPass-Info.plist | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/MacPass/MPDocumentWindowController.m b/MacPass/MPDocumentWindowController.m index cd7c49e5..26aa9f36 100644 --- a/MacPass/MPDocumentWindowController.m +++ b/MacPass/MPDocumentWindowController.m @@ -181,11 +181,13 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur } - (BOOL)validateToolbarItem:(NSToolbarItem *)theItem { + MPDocument *document = [self document]; + if(document.isLocked) { + return NO; + } SEL itemAction = [theItem action]; if( itemAction == [MPActionHelper actionOfType:MPActionLock]) { - MPDocument *document = [self document]; - BOOL showsNoLockScreen = (nil == [[_passwordInputController view] superview]); - return showsNoLockScreen && document.isSecured; + return document.isSecured; } if(itemAction == [MPActionHelper actionOfType:MPActionAddEntry]) { return (nil != _outlineViewController.selectedGroup); diff --git a/MacPass/MacPass-Info.plist b/MacPass/MacPass-Info.plist index 5a4e5f67..484c468c 100644 --- a/MacPass/MacPass-Info.plist +++ b/MacPass/MacPass-Info.plist @@ -48,7 +48,7 @@ CFBundleSignature ???? CFBundleVersion - 1165 + 1167 LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHumanReadableCopyright