mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 15:40:58 +00:00
Added code to encodeWithCoder: in NSButtonCell to allow encoding of previous version of the class to the archive.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25415 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a5a21eb966
commit
251a90b819
2 changed files with 37 additions and 18 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-08-24 22:33-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSButtonCell.m: Added code in encodeWithCoder: to allow
|
||||
encoding previous versions of the object to the archive.
|
||||
|
||||
2007-08-22 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSFontPanel.h: Add MacOSX 10.3 constants.
|
||||
|
|
|
@ -1610,13 +1610,26 @@ typedef struct _GSButtonCellFlags
|
|||
tmp = _buttoncell_is_transparent;
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL)
|
||||
at: &tmp];
|
||||
|
||||
if([NSButtonCell version] <= 2)
|
||||
{
|
||||
unsigned int ke = _keyEquivalentModifierMask << 16;
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned int)
|
||||
at: &ke];
|
||||
}
|
||||
else
|
||||
{
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned int)
|
||||
at: &_keyEquivalentModifierMask];
|
||||
}
|
||||
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned int)
|
||||
at: &_highlightsByMask];
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned int)
|
||||
at: &_showAltStateMask];
|
||||
|
||||
if([NSButtonCell version] >= 2)
|
||||
{
|
||||
[aCoder encodeObject: _sound];
|
||||
[aCoder encodeObject: _backgroundColor];
|
||||
[aCoder encodeValueOfObjCType: @encode(float)
|
||||
|
@ -1634,6 +1647,7 @@ typedef struct _GSButtonCellFlags
|
|||
[aCoder encodeValueOfObjCType: @encode(BOOL)
|
||||
at: &tmp];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue