Added code to handle sort descriptors from gorm files into NSTableColumn.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34095 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2011-10-31 14:45:06 +00:00
parent e2967ab5bc
commit 045d8b59b6
2 changed files with 23 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2011-10-31 Gregory Casamento <greg.casamento@gmail.com>
* Source/NSTableColumn.m: (+initialize, -initWithCoder:,
-encodeWithCoder:): Updated version to 3. Added encoding for
sort descriptor in encodeWithCoder:, added decoding for version 3
to initWithCoder:
2011-10-28 Quentin Mathe <quentin.mathe@gmail.com>
* Headers/Additions/GNUstepGUI/GSTheme.h:

View file

@ -85,7 +85,7 @@
+ (void) initialize
{
if (self == [NSTableColumn class])
[self setVersion: 2];
[self setVersion: 3];
}
/*
@ -493,6 +493,8 @@ to YES. */
[aCoder encodeObject: _headerCell];
[aCoder encodeObject: _dataCell];
[aCoder encodeObject: _sortDescriptorPrototype];
}
}
@ -565,7 +567,19 @@ to YES. */
if (!self)
return nil;
if (version == 2)
if (version == 3)
{
_identifier = RETAIN([aDecoder decodeObject]);
[aDecoder decodeValueOfObjCType: @encode(float) at: &_width];
[aDecoder decodeValueOfObjCType: @encode(float) at: &_min_width];
[aDecoder decodeValueOfObjCType: @encode(float) at: &_max_width];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_is_resizable];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_is_editable];
_headerCell = RETAIN([aDecoder decodeObject]);
_dataCell = RETAIN([aDecoder decodeObject]);
_sortDescriptorPrototype = RETAIN([aDecoder decodeObject]);
}
else if (version == 2)
{
_identifier = RETAIN([aDecoder decodeObject]);
[aDecoder decodeValueOfObjCType: @encode(float) at: &_width];