Added [dealloc]. In [setMenuView:], if the menu belongs to a popup

set the ivar _mcell_belongs_to_popupbutton.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10913 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2001-09-16 18:19:56 +00:00
parent 141d8751b7
commit b741a26379

View file

@ -75,6 +75,14 @@ static NSImage *arrowImageH = nil;
return self;
}
- (void) dealloc
{
RELEASE(_menuItem);
RELEASE(_menuView);
[super dealloc];
}
- (void) setHighlighted:(BOOL)flag
{
_cell.is_highlighted = flag;
@ -99,6 +107,11 @@ static NSImage *arrowImageH = nil;
- (void) setMenuView:(NSMenuView *)menuView
{
ASSIGN(_menuView, menuView);
if ([[_menuView menu] _ownedByPopUp])
{
_mcell_belongs_to_popupbutton = YES;
[self setImagePosition: NSImageRight];
}
}
- (NSMenuView *) menuView