Corrected bezel drawing and keyed archiving of popup menu item cell.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18560 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2004-02-08 13:07:24 +00:00
parent bef0d1bcb2
commit 706213590f
4 changed files with 92 additions and 19 deletions

View file

@ -642,16 +642,22 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder: aDecoder];
self = [super initWithCoder: aDecoder];
ASSIGN (_menuItem, [aDecoder decodeObject]);
if ([aDecoder versionForClassName: @"NSMenuItemCell"] < 2)
if ([aDecoder allowsKeyedCoding])
{
/* In version 1, we used to encode the _menuView here. */
[aDecoder decodeObject];
[self setMenuItem: [aDecoder decodeObjectForKey: @"NSMenuItem"]];
}
else
{
ASSIGN (_menuItem, [aDecoder decodeObject]);
if ([aDecoder versionForClassName: @"NSMenuItemCell"] < 2)
{
/* In version 1, we used to encode the _menuView here. */
[aDecoder decodeObject];
}
}
_needs_sizing = YES;
return self;