diff --git a/Actions.plist b/Actions.plist index 54981e1765..6e8d8a3320 100644 --- a/Actions.plist +++ b/Actions.plist @@ -6,6 +6,10 @@ arrangeInFront: + fontSizeDown: + + fontSizeUp: + hide: hideOtherApplications: diff --git a/MMAppController.h b/MMAppController.h index 15d7e7a2e8..5033d7e719 100644 --- a/MMAppController.h +++ b/MMAppController.h @@ -27,5 +27,7 @@ - (IBAction)newWindow:(id)sender; - (IBAction)selectNextWindow:(id)sender; - (IBAction)selectPreviousWindow:(id)sender; +- (IBAction)fontSizeUp:(id)sender; +- (IBAction)fontSizeDown:(id)sender; @end diff --git a/MMAppController.m b/MMAppController.m index 496cf53f0f..26475a0107 100644 --- a/MMAppController.m +++ b/MMAppController.m @@ -40,6 +40,10 @@ static NSTimeInterval MMTerminateTimeout = 3; - (void)recurseSetAutoenablesItems:(BOOL)on; @end +@interface NSNumber (MMExtras) +- (int)tag; +@end + @implementation MMAppController @@ -415,6 +419,18 @@ static NSTimeInterval MMTerminateTimeout = 3; } } +- (IBAction)fontSizeUp:(id)sender +{ + [[NSFontManager sharedFontManager] modifyFont: + [NSNumber numberWithInt:NSSizeUpFontAction]]; +} + +- (IBAction)fontSizeDown:(id)sender +{ + [[NSFontManager sharedFontManager] modifyFont: + [NSNumber numberWithInt:NSSizeDownFontAction]]; +} + - (byref id ) connectBackend:(byref in id )backend pid:(int)pid @@ -582,3 +598,13 @@ static NSTimeInterval MMTerminateTimeout = 3; } @end // NSMenu (MMExtras) + + + + +@implementation NSNumber (MMExtras) +- (int)tag +{ + return [self intValue]; +} +@end // NSNumber (MMExtras) diff --git a/gvimrc b/gvimrc index 4634e661fa..9a0bf8b9de 100644 --- a/gvimrc +++ b/gvimrc @@ -44,7 +44,10 @@ an 10.331 File.Close:q :confirm q "an 10.331 File.Close\ Tab :tabclose an 20.460 Edit.-SEP4- -an 20.465 Edit.Show\ Fonts\.\.\. :action orderFrontFontPanel: +an 20.465.10 Edit.Font.Show\ Fonts :action orderFrontFontPanel: +an 20.465.20 Edit.Font.-SEP5- +an 20.465.30 Edit.Font.Bigger :action fontSizeUp: +an 20.465.40 Edit.Font.Smaller :action fontSizeDown: an 20.470 Edit.Special\ Characters\.\.\. :action orderFrontCharacterPalette: @@ -176,6 +179,8 @@ menukeyequiv Edit.Copy menukeyequiv Edit.Paste menukeyequiv Edit.Select\ All menukeyequiv Edit.Special\ Characters\.\.\. +menukeyequiv Edit.Font.Bigger +menukeyequiv Edit.Font.Smaller menukeyequiv Tools.Spelling.To\ Next\ error menukeyequiv Tools.Spelling.Suggest\ Corrections