mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 22:52:26 +00:00
Fixes #2 MPToolbarItem now validates more sanely
This commit is contained in:
@@ -14,9 +14,12 @@
|
|||||||
- (void)validate {
|
- (void)validate {
|
||||||
if(![self.view menu]) {
|
if(![self.view menu]) {
|
||||||
id target = [NSApp targetForAction:[self action] to:nil from:self];
|
id target = [NSApp targetForAction:[self action] to:nil from:self];
|
||||||
BOOL isValid = [[[[NSApplication sharedApplication] keyWindow] windowController] validateToolbarItem:self];
|
id windowController = [[self.view window] windowController];
|
||||||
[self setEnabled:( isValid && (nil != target) )];
|
BOOL isValid = (nil != target);
|
||||||
|
if( [windowController respondsToSelector:@selector(validateToolbarItem:)]) {
|
||||||
|
isValid &= [windowController validateToolbarItem:self];
|
||||||
|
}
|
||||||
|
[self setEnabled:isValid];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>AB7</string>
|
<string>AB9</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