mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-23 06:20:47 +00:00
Add menu to NSFontManager object using setFontMenu: in menus palette
This commit is contained in:
parent
028a22cd7b
commit
407a0403ad
2 changed files with 8 additions and 2 deletions
|
@ -78,7 +78,8 @@
|
|||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
NSString *path = [bundle pathForImageResource: @"GormMenuDrag"];
|
||||
NSImage *dragImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
|
||||
NSFontManager *fm = nil;
|
||||
|
||||
originalWindow = [[NSWindow alloc] initWithContentRect:
|
||||
NSMakeRect(0, 0, 272, 192)
|
||||
styleMask: NSBorderlessWindowMask
|
||||
|
@ -124,7 +125,10 @@
|
|||
/*
|
||||
* The Font menu
|
||||
*/
|
||||
m = [GormNSMenu menuWithMenu: [[NSFontManager sharedFontManager] fontMenu: YES]];
|
||||
fm = [NSFontManager sharedFontManager];
|
||||
m = [GormNSMenu menuWithMenu: [fm fontMenu: YES]];
|
||||
[fm setFontMenu: m];
|
||||
|
||||
// Other font menu items
|
||||
[m addItemWithTitle: @"Underline"
|
||||
action: @selector(underline:)
|
||||
|
|
|
@ -124,6 +124,8 @@
|
|||
forClassName: @"NSWindowTemplate"];
|
||||
[u setClass: [GormNSWindow class]
|
||||
forClassName: @"NSWindow"];
|
||||
[u setClass: [IBUserDefinedRuntimeAttribute class]
|
||||
forClassName: @"IBUserDefinedRuntimeAttribute5"];
|
||||
|
||||
//
|
||||
// Substitute any classes specified by the palettes...
|
||||
|
|
Loading…
Reference in a new issue