Moved the main menu handling into the class NSMenu and fixed activation problem on Windows.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20342 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2004-11-11 19:52:24 +00:00
parent 7c48004c48
commit a99759f89c
4 changed files with 49 additions and 8 deletions

View file

@ -1431,6 +1431,28 @@ static NSNotificationCenter *nc;
return (NSWindow *)_aWindow;
}
- (void) setMain: (BOOL)isMain
{
if (isMain)
{
// Set the title of the window.
// This wont be displayed, but the window manager may need it.
[[self window] setTitle: [[NSProcessInfo processInfo] processName]];
[[self window] setLevel: NSMainMenuWindowLevel];
[self setGeometry];
if ([NSApp isActive])
{
[self display];
}
}
else
{
[self close];
[[self window] setLevel: NSSubmenuWindowLevel];
}
}
/**
Set the frame origin of the receiver to aPoint. If a submenu of
the receiver is attached. The frame origin of the submenu is set