From b741a263799862962802e8bbff60bfe8e5ead35a Mon Sep 17 00:00:00 2001 From: Fred Kiefer Date: Sun, 16 Sep 2001 18:19:56 +0000 Subject: [PATCH] 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 --- Source/NSMenuItemCell.m | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Source/NSMenuItemCell.m b/Source/NSMenuItemCell.m index 8770a919b..23631f7cb 100644 --- a/Source/NSMenuItemCell.m +++ b/Source/NSMenuItemCell.m @@ -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