From 438ed2af3e4a56a9f76d7c01c51cc4307974c4e1 Mon Sep 17 00:00:00 2001 From: Fred Kiefer Date: Fri, 5 Sep 2003 23:28:54 +0000 Subject: [PATCH] [setMenuItem:] enable/disable cell. [drawTitleWithFrame:inView:]no longer enable/disable cell. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17622 72102866-910b-0410-8b05-ffd578937521 --- Source/NSMenuItemCell.m | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/NSMenuItemCell.m b/Source/NSMenuItemCell.m index 6bb12244e..58baf5ae3 100644 --- a/Source/NSMenuItemCell.m +++ b/Source/NSMenuItemCell.m @@ -92,6 +92,7 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */ - (void) setMenuItem:(NSMenuItem *)item { ASSIGN (_menuItem, item); + [self setEnabled: [_menuItem isEnabled]]; } - (NSMenuItem *) menuItem @@ -485,11 +486,6 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */ - (void) drawTitleWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { - if ([_menuItem isEnabled]) - _cell.is_disabled = NO; - else - _cell.is_disabled = YES; - [self _drawText: [_menuItem title] inFrame: [self titleRectForBounds: cellFrame]]; }