mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 15:30:38 +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
|
@ -1610,29 +1610,43 @@ typedef struct _GSButtonCellFlags
|
|||
tmp = _buttoncell_is_transparent;
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL)
|
||||
at: &tmp];
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned int)
|
||||
at: &_keyEquivalentModifierMask];
|
||||
|
||||
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];
|
||||
|
||||
[aCoder encodeObject: _sound];
|
||||
[aCoder encodeObject: _backgroundColor];
|
||||
[aCoder encodeValueOfObjCType: @encode(float)
|
||||
at: &_delayInterval];
|
||||
[aCoder encodeValueOfObjCType: @encode(float)
|
||||
at: &_repeatInterval];
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned int)
|
||||
at: &_bezel_style];
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned int)
|
||||
at: &_gradient_type];
|
||||
tmp = _image_dims_when_disabled;
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL)
|
||||
at: &tmp];
|
||||
tmp = _shows_border_only_while_mouse_inside;
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL)
|
||||
at: &tmp];
|
||||
if([NSButtonCell version] >= 2)
|
||||
{
|
||||
[aCoder encodeObject: _sound];
|
||||
[aCoder encodeObject: _backgroundColor];
|
||||
[aCoder encodeValueOfObjCType: @encode(float)
|
||||
at: &_delayInterval];
|
||||
[aCoder encodeValueOfObjCType: @encode(float)
|
||||
at: &_repeatInterval];
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned int)
|
||||
at: &_bezel_style];
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned int)
|
||||
at: &_gradient_type];
|
||||
tmp = _image_dims_when_disabled;
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL)
|
||||
at: &tmp];
|
||||
tmp = _shows_border_only_while_mouse_inside;
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL)
|
||||
at: &tmp];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue