Validate performClose: in MMWindow and MMFullscreenWindow

Failing to validate would cause the "Close" menu item to be disabled in
full-screen.
This commit is contained in:
Bjorn Winckler
2008-06-05 23:13:40 +02:00
parent 7070fd3f76
commit cb120a21cf
2 changed files with 18 additions and 0 deletions
+9
View File
@@ -298,6 +298,15 @@ static int numFullscreenWindows = 0;
[super performClose:sender];
}
- (BOOL)validateMenuItem:(NSMenuItem *)item
{
if ([item action] == @selector(vimMenuItemAction:)
|| [item action] == @selector(performClose:))
return [item tag];
return YES;
}
@end // MMFullscreenWindow
+9
View File
@@ -129,4 +129,13 @@
[super performClose:sender];
}
- (BOOL)validateMenuItem:(NSMenuItem *)item
{
if ([item action] == @selector(vimMenuItemAction:)
|| [item action] == @selector(performClose:))
return [item tag];
return YES;
}
@end // MMWindow