mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 12:50:40 +00:00
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:
parent
7c48004c48
commit
a99759f89c
4 changed files with 49 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue