mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 23:30:48 +00:00
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:
parent
e2967ab5bc
commit
045d8b59b6
2 changed files with 23 additions and 2 deletions
|
@ -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>
|
2011-10-28 Quentin Mathe <quentin.mathe@gmail.com>
|
||||||
|
|
||||||
* Headers/Additions/GNUstepGUI/GSTheme.h:
|
* Headers/Additions/GNUstepGUI/GSTheme.h:
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
if (self == [NSTableColumn class])
|
if (self == [NSTableColumn class])
|
||||||
[self setVersion: 2];
|
[self setVersion: 3];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -493,6 +493,8 @@ to YES. */
|
||||||
|
|
||||||
[aCoder encodeObject: _headerCell];
|
[aCoder encodeObject: _headerCell];
|
||||||
[aCoder encodeObject: _dataCell];
|
[aCoder encodeObject: _dataCell];
|
||||||
|
|
||||||
|
[aCoder encodeObject: _sortDescriptorPrototype];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -565,7 +567,19 @@ to YES. */
|
||||||
if (!self)
|
if (!self)
|
||||||
return nil;
|
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]);
|
_identifier = RETAIN([aDecoder decodeObject]);
|
||||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_width];
|
[aDecoder decodeValueOfObjCType: @encode(float) at: &_width];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue