Try to better key encode the contents of the cell.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25305 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2007-07-04 15:54:40 +00:00
parent 1b0f4ef79a
commit 25280ce01a
2 changed files with 98 additions and 80 deletions

View file

@ -1,3 +1,8 @@
2007-07-04 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSCell.m (-encodeWithCoder:): Try to better key encode
the contents of the cell.
2007-07-04 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSPrintOperation.m (NSView-_displayPageInRect:withInfo:),

View file

@ -2319,9 +2319,22 @@ static NSColor *shadowCol;
{
unsigned long cFlags = 0;
unsigned int cFlags2 = 0;
id contents;
// encode contents
[aCoder encodeObject: [self objectValue] forKey: @"NSContents"];
if (_cell.type == NSTextCellType)
{
contents = _contents;
}
else if (_cell.type == NSImageCellType)
{
contents = _cell_image;
}
else
{
contents = [self objectValue];
}
[aCoder encodeObject: contents forKey: @"NSContents"];
// flags
cFlags |= [self focusRingType];