Edit->Font->Bigger/Smaller validates properly

Fixes bug where the above items were enabled even when all windows were
minimized.
This commit is contained in:
Bjorn Winckler
2008-06-06 17:47:54 +02:00
parent 9c517cb4e9
commit 2ac28f887e
4 changed files with 14 additions and 14 deletions
-2
View File
@@ -34,8 +34,6 @@
- (IBAction)fileOpen:(id)sender;
- (IBAction)selectNextWindow:(id)sender;
- (IBAction)selectPreviousWindow:(id)sender;
- (IBAction)fontSizeUp:(id)sender;
- (IBAction)fontSizeDown:(id)sender;
- (IBAction)orderFrontPreferencePanel:(id)sender;
- (IBAction)openWebsite:(id)sender;
- (IBAction)showVimHelp:(id)sender;
-12
View File
@@ -725,18 +725,6 @@ static int executeInLoginShell(NSString *path, NSArray *args);
}
}
- (IBAction)fontSizeUp:(id)sender
{
[[NSFontManager sharedFontManager] modifyFont:
[NSNumber numberWithInt:NSSizeUpFontAction]];
}
- (IBAction)fontSizeDown:(id)sender
{
[[NSFontManager sharedFontManager] modifyFont:
[NSNumber numberWithInt:NSSizeDownFontAction]];
}
- (IBAction)orderFrontPreferencePanel:(id)sender
{
[[MMPreferenceController sharedPrefsWindowController] showWindow:self];
+2
View File
@@ -68,5 +68,7 @@
- (IBAction)findNext:(id)sender;
- (IBAction)findPrevious:(id)sender;
- (IBAction)vimMenuItemAction:(id)sender;
- (IBAction)fontSizeUp:(id)sender;
- (IBAction)fontSizeDown:(id)sender;
@end
+12
View File
@@ -609,6 +609,18 @@
[vimController sendMessage:ExecuteMenuMsgID data:[attrs dictionaryAsData]];
}
- (IBAction)fontSizeUp:(id)sender
{
[[NSFontManager sharedFontManager] modifyFont:
[NSNumber numberWithInt:NSSizeUpFontAction]];
}
- (IBAction)fontSizeDown:(id)sender
{
[[NSFontManager sharedFontManager] modifyFont:
[NSNumber numberWithInt:NSSizeDownFontAction]];
}
- (BOOL)validateMenuItem:(NSMenuItem *)item
{
if ([item action] == @selector(vimMenuItemAction:)