mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Add windowWillReturnFieldEditor: handling to help fix bug 188300, and forward font panel delegate methods to the current pane, for bug 173150.
This commit is contained in:
parent
c762ece153
commit
d2acc405fc
@ -282,6 +282,14 @@ NSString* const MVPreferencesWindowNotification = @"MVPreferencesWindowNotificat
|
||||
[[self currentPane] didActivate];
|
||||
}
|
||||
|
||||
- (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)anObject
|
||||
{
|
||||
if ([[self currentPane] respondsToSelector:@selector(fieldEditorForObject:)])
|
||||
return [[self currentPane] fieldEditorForObject:anObject];
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (NSToolbarItem *) toolbar:(NSToolbar *) toolbar
|
||||
@ -435,7 +443,24 @@ NSString* const MVPreferencesWindowNotification = @"MVPreferencesWindowNotificat
|
||||
|
||||
- (void)changeFont:(id)sender
|
||||
{
|
||||
[[self currentPane] changeFont:sender];
|
||||
if ([[self currentPane] respondsToSelector:@selector(changeFont:)])
|
||||
[[self currentPane] changeFont:sender];
|
||||
}
|
||||
|
||||
- (BOOL)fontManager:(id)theFontManager willIncludeFont:(NSString *)fontName
|
||||
{
|
||||
if ([[self currentPane] respondsToSelector:@selector(fontManager:willIncludeFont:)])
|
||||
return [[self currentPane] fontManager:theFontManager willIncludeFont:fontName];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (unsigned int)validModesForFontPanel:(NSFontPanel *)fontPanel
|
||||
{
|
||||
if ([[self currentPane] respondsToSelector:@selector(validModesForFontPanel:)])
|
||||
return [[self currentPane] validModesForFontPanel:fontPanel];
|
||||
|
||||
return 0xFFFF; // NSFontPanelStandardModesMask
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
Reference in New Issue
Block a user