mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-20 19:26:32 +00:00
* Source/NSBrowserCell.m: Improved encoding and decoding in
encodeWithCoder: and initWithCoder: * Source/NSBrowser.m: Improved encoding and decoding in encodeWithCoder: and initWithCoder: * Source/NSScrollView.m: Improved encoding and decoding in encodeWithCoder: and initWithCoder: git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23315 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
569ceb5d66
commit
f3a5a67c45
4 changed files with 137 additions and 81 deletions
|
@ -338,14 +338,20 @@ static NSFont *_leafFont;
|
|||
*/
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
BOOL tmp;
|
||||
[super encodeWithCoder: aCoder];
|
||||
|
||||
tmp = _browsercell_is_leaf;
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &tmp];
|
||||
tmp = _browsercell_is_loaded;
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &tmp];
|
||||
[aCoder encodeObject: _alternateImage];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
{
|
||||
// simply encodes prescence...
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOL tmp;
|
||||
tmp = _browsercell_is_leaf;
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &tmp];
|
||||
tmp = _browsercell_is_loaded;
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &tmp];
|
||||
[aCoder encodeObject: _alternateImage];
|
||||
}
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
|
@ -354,7 +360,7 @@ static NSFont *_leafFont;
|
|||
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
// Nothing special
|
||||
// Nothing to decode...
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue