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