mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 00:20:49 +00:00
* Source/NSApplication.m: Remove keys from initWithCoder: and
encodeWithCoder:. * Source/NSCell.m: Initialize the cell based on content in initWithCoder:. * Source/NSFormCell.m: Removed unnecessary decoding of NSContents key in initWithCoder: since it is already done in NSCell.m. * Source/NSMatrix.m: initWithCoder:/encodeWithCoder: added autosizesCells flag and clear flags which are not used prior to encoding. * Source/NSPopUpButtonCell.m: Implemented encoding in encodeWithCoder:. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23318 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e30f29705f
commit
971a8a97fa
6 changed files with 97 additions and 30 deletions
|
@ -391,20 +391,29 @@ static NSColor *shadowCol;
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
BOOL tmp;
|
||||
|
||||
[super encodeWithCoder: aCoder];
|
||||
|
||||
tmp = _formcell_auto_title_width;
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &tmp];
|
||||
[aCoder encodeValueOfObjCType: @encode(float) at: &_displayedTitleWidth];
|
||||
[aCoder encodeObject: _titleCell];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
{
|
||||
/*
|
||||
if([self stringValue] != nil)
|
||||
{
|
||||
[aCoder encodeObject: [self stringValue] forKey: @"NSContents"];
|
||||
}
|
||||
*/
|
||||
[aCoder encodeFloat: [self titleWidth] forKey: @"NSTitleWidth"];
|
||||
[aCoder encodeObject: _titleCell forKey: @"NSTitleCell"];
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOL tmp = _formcell_auto_title_width;
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &tmp];
|
||||
[aCoder encodeValueOfObjCType: @encode(float) at: &_displayedTitleWidth];
|
||||
[aCoder encodeObject: _titleCell];
|
||||
}
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
BOOL tmp;
|
||||
|
||||
[super initWithCoder: aDecoder];
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
|
@ -423,6 +432,7 @@ static NSColor *shadowCol;
|
|||
}
|
||||
else
|
||||
{
|
||||
BOOL tmp;
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &tmp];
|
||||
_formcell_auto_title_width = tmp;
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_displayedTitleWidth];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue