mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 04:42:29 +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 {
|
- (BOOL)validateToolbarItem:(NSToolbarItem *)theItem {
|
||||||
|
MPDocument *document = [self document];
|
||||||
|
if(document.isLocked) {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
SEL itemAction = [theItem action];
|
SEL itemAction = [theItem action];
|
||||||
if( itemAction == [MPActionHelper actionOfType:MPActionLock]) {
|
if( itemAction == [MPActionHelper actionOfType:MPActionLock]) {
|
||||||
MPDocument *document = [self document];
|
return document.isSecured;
|
||||||
BOOL showsNoLockScreen = (nil == [[_passwordInputController view] superview]);
|
|
||||||
return showsNoLockScreen && document.isSecured;
|
|
||||||
}
|
}
|
||||||
if(itemAction == [MPActionHelper actionOfType:MPActionAddEntry]) {
|
if(itemAction == [MPActionHelper actionOfType:MPActionAddEntry]) {
|
||||||
return (nil != _outlineViewController.selectedGroup);
|
return (nil != _outlineViewController.selectedGroup);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1165</string>
|
<string>1167</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user