Disabled toolbar items on lock screen (drop down menu on action button still enabled)

This commit is contained in:
michael starke
2013-06-26 02:05:57 +02:00
parent a5294712c2
commit eeada7904b
2 changed files with 6 additions and 4 deletions

View File

@@ -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);

View File

@@ -48,7 +48,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1165</string>
<string>1167</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>