The font panel is updated when the font changes.

git-svn-id: http://macvim.googlecode.com/svn/trunk@200 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
Bjorn Winckler
2007-08-26 14:07:04 +00:00
parent 739b023c51
commit 5bc6d68fa3
2 changed files with 22 additions and 16 deletions
+21 -16
View File
@@ -129,6 +129,21 @@ static float MMDragAreaSize = 73.0f;
}
}
- (void)keyDown:(NSEvent *)event
{
// HACK! If a modifier is held, don't pass the event along to
// interpretKeyEvents: since some keys are bound to multiple commands which
// means doCommandBySelector: is called several times.
//
// TODO: Figure out a way to disable Cocoa key bindings entirely, without
// affecting input management.
if ([event modifierFlags] & NSControlKeyMask)
[self dispatchKeyEvent:event];
else
[super keyDown:event];
}
- (void)insertText:(id)string
{
// NOTE! This method is called for normal key presses but also for
@@ -526,7 +541,12 @@ static float MMDragAreaSize = 73.0f;
- (void)resetCursorRects
{
// No need to set up cursor rects...Vim is in control of cursor changes.
// No need to set up cursor rects since Vim handles cursor changes.
}
- (void)updateFontPanel
{
// The font panel is updated whenever the font is set.
}
@end // MMTextView
@@ -592,21 +612,6 @@ static float MMDragAreaSize = 73.0f;
return rect;
}
- (void)keyDown:(NSEvent *)event
{
// HACK! If a modifier is held, don't pass the event along to
// interpretKeyEvents: since some keys are bound to multiple commands which
// means doCommandBySelector: is called several times.
//
// TODO: Figure out a way to disable Cocoa key bindings entirely, without
// affecting input management.
if ([event modifierFlags] & NSControlKeyMask)
[self dispatchKeyEvent:event];
else
[super keyDown:event];
}
- (void)dispatchKeyEvent:(NSEvent *)event
{
// Only handle the command if it came from a keyDown event
+1
View File
@@ -452,6 +452,7 @@ NSMutableArray *buildMenuAddress(NSMenu *menu)
- (void)setFont:(NSFont *)font
{
[[NSFontManager sharedFontManager] setSelectedFont:font isMultiple:NO];
[textStorage setFont:font];
[self updateResizeIncrements];
}