mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 20:32:43 +00:00
Disabled toolbar items on lock screen (drop down menu on action button still enabled)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user