mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:10:48 +00:00
Various comments added
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12698 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
544720e3bc
commit
cb5dc2580a
1 changed files with 12 additions and 3 deletions
|
@ -102,9 +102,9 @@ static NSNotificationCenter *nc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Create a non autorelease window for this menu. */
|
||||||
- (NSPanel*) _createWindow
|
- (NSPanel*) _createWindow
|
||||||
{
|
{
|
||||||
// Create a non autorelease window for this menu
|
|
||||||
NSPanel *win = [[NSPanel alloc]
|
NSPanel *win = [[NSPanel alloc]
|
||||||
initWithContentRect: NSZeroRect
|
initWithContentRect: NSZeroRect
|
||||||
styleMask: NSBorderlessWindowMask
|
styleMask: NSBorderlessWindowMask
|
||||||
|
@ -155,6 +155,8 @@ static NSNotificationCenter *nc;
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
|
NSDebugLog (@"NSMenu `%@' dealloc", _title);
|
||||||
|
|
||||||
[nc removeObserver: self];
|
[nc removeObserver: self];
|
||||||
|
|
||||||
RELEASE(_notifications);
|
RELEASE(_notifications);
|
||||||
|
@ -195,6 +197,11 @@ static NSNotificationCenter *nc;
|
||||||
// Transient windows private stuff.
|
// Transient windows private stuff.
|
||||||
// _oldAttachedMenu = nil;
|
// _oldAttachedMenu = nil;
|
||||||
|
|
||||||
|
/* Please note that we own all this menu network of objects. So,
|
||||||
|
none of these objects should be retaining us. When we are deallocated,
|
||||||
|
we release all the objects we own, and that should cause deallocation
|
||||||
|
of the whole menu network. */
|
||||||
|
|
||||||
// Create the windows that will display the menu.
|
// Create the windows that will display the menu.
|
||||||
_aWindow = [self _createWindow];
|
_aWindow = [self _createWindow];
|
||||||
_bWindow = [self _createWindow];
|
_bWindow = [self _createWindow];
|
||||||
|
@ -205,7 +212,8 @@ static NSNotificationCenter *nc;
|
||||||
|
|
||||||
// Create the title view
|
// Create the title view
|
||||||
height = [[_view class] menuBarHeight];
|
height = [[_view class] menuBarHeight];
|
||||||
_titleView = [[NSMenuWindowTitleView alloc] initWithFrame: NSMakeRect(0, 0, 50, height)];
|
_titleView = [[NSMenuWindowTitleView alloc] initWithFrame:
|
||||||
|
NSMakeRect(0, 0, 50, height)];
|
||||||
[_titleView setMenu: self];
|
[_titleView setMenu: self];
|
||||||
|
|
||||||
contentView = [_aWindow contentView];
|
contentView = [_aWindow contentView];
|
||||||
|
@ -553,6 +561,7 @@ static NSNotificationCenter *nc;
|
||||||
|
|
||||||
- (void) setSupermenu: (NSMenu *)supermenu
|
- (void) setSupermenu: (NSMenu *)supermenu
|
||||||
{
|
{
|
||||||
|
/* The supermenu retains us (indirectly). Do not retain it. */
|
||||||
_superMenu = supermenu;
|
_superMenu = supermenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -929,7 +938,7 @@ static NSNotificationCenter *nc;
|
||||||
if (sub != nil)
|
if (sub != nil)
|
||||||
{
|
{
|
||||||
[sub setSupermenu: nil];
|
[sub setSupermenu: nil];
|
||||||
[self setSubmenu: sub forItem: item];
|
[self setSubmenu: sub forItem: item];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[self setMenuChangedMessagesEnabled: YES];
|
[self setMenuChangedMessagesEnabled: YES];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue