mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 10:01:14 +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
a46a6312f6
commit
b6a8d2b7e3
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,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…
Reference in a new issue