mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
- Added fontSizeUp/fontSizeDown actions - Added font submenu with above actions and font panel - Key equivalents <D-=> and <D--> mapped to font size up/down menu items
git-svn-id: http://macvim.googlecode.com/svn/trunk@298 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
<string></string>
|
||||
<key>arrangeInFront:</key>
|
||||
<string></string>
|
||||
<key>fontSizeDown:</key>
|
||||
<string></string>
|
||||
<key>fontSizeUp:</key>
|
||||
<string></string>
|
||||
<key>hide:</key>
|
||||
<string></string>
|
||||
<key>hideOtherApplications:</key>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 <MMFrontendProtocol>)
|
||||
connectBackend:(byref in id <MMBackendProtocol>)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)
|
||||
|
||||
@@ -44,7 +44,10 @@ an 10.331 File.Close<Tab>:q :confirm q<CR>
|
||||
"an 10.331 File.Close\ Tab :tabclose<CR>
|
||||
|
||||
an 20.460 Edit.-SEP4- <Nop>
|
||||
an 20.465 Edit.Show\ Fonts\.\.\. :action orderFrontFontPanel:<CR>
|
||||
an 20.465.10 Edit.Font.Show\ Fonts :action orderFrontFontPanel:<CR>
|
||||
an 20.465.20 Edit.Font.-SEP5- <Nop>
|
||||
an 20.465.30 Edit.Font.Bigger :action fontSizeUp:<CR>
|
||||
an 20.465.40 Edit.Font.Smaller :action fontSizeDown:<CR>
|
||||
an 20.470 Edit.Special\ Characters\.\.\. :action orderFrontCharacterPalette:<CR>
|
||||
|
||||
|
||||
@@ -176,6 +179,8 @@ menukeyequiv Edit.Copy <D-c>
|
||||
menukeyequiv Edit.Paste <D-v>
|
||||
menukeyequiv Edit.Select\ All <D-a>
|
||||
menukeyequiv Edit.Special\ Characters\.\.\. <D-M-t>
|
||||
menukeyequiv Edit.Font.Bigger <D-=>
|
||||
menukeyequiv Edit.Font.Smaller <D-->
|
||||
|
||||
menukeyequiv Tools.Spelling.To\ Next\ error <D-;>
|
||||
menukeyequiv Tools.Spelling.Suggest\ Corrections <D-:>
|
||||
|
||||
Reference in New Issue
Block a user