Fix for issue #816 (NSTableView/CPTableView do not read selection highlight style and column resizing style)

This commit is contained in:
Aparajita Fishman authored and Alexander Ljungberg committed 2010-08-12 00:06:52 -04:00
1 parent 0b1b1bbe0b
commit ab5e2dd774
2 files changed
+10 -1

No files matched your search

+7 -1
View File
@@ -3490,11 +3490,13 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
CPTableViewTableColumnsKey = @"CPTableViewTableColumnsKey",
CPTableViewRowHeightKey = @"CPTableViewRowHeightKey",
CPTableViewIntercellSpacingKey = @"CPTableViewIntercellSpacingKey",
CPTableViewSelectionHighlightStyleKey = @"CPTableViewSelectionHighlightStyleKey",
CPTableViewMultipleSelectionKey = @"CPTableViewMultipleSelectionKey",
CPTableViewEmptySelectionKey = @"CPTableViewEmptySelectionKey",
CPTableViewColumnReorderingKey = @"CPTableViewColumnReorderingKey",
CPTableViewColumnResizingKey = @"CPTableViewColumnResizingKey",
CPTableViewColumnSelectionKey = @"CPTableViewColumnSelectionKey",
CPTableViewColumnAutoresizingStyleKey = @"CPTableViewColumnAutoresizingStyleKey",
CPTableViewGridColorKey = @"CPTableViewGridColorKey",
CPTableViewGridStyleMaskKey = @"CPTableViewGridStyleMaskKey",
CPTableViewUsesAlternatingBackgroundKey = @"CPTableViewUsesAlternatingBackgroundKey",
@@ -3518,7 +3520,8 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
_allowsColumnSelection = [aCoder decodeBoolForKey:CPTableViewColumnSelectionKey];
//Setting Display Attributes
_selectionHighlightStyle = CPTableViewSelectionHighlightStyleRegular;
_selectionHighlightStyle = [aCoder decodeIntForKey:CPTableViewSelectionHighlightStyleKey];
_columnAutoResizingStyle = [aCoder decodeIntForKey:CPTableViewColumnAutoresizingStyleKey];
_tableColumns = [aCoder decodeObjectForKey:CPTableViewTableColumnsKey] || [];
[_tableColumns makeObjectsPerformSelector:@selector(setTableView:) withObject:self];
@@ -3560,6 +3563,9 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
[aCoder encodeFloat:_rowHeight forKey:CPTableViewRowHeightKey];
[aCoder encodeSize:_intercellSpacing forKey:CPTableViewIntercellSpacingKey];
[aCoder encodeInt:_selectionHighlightStyle forKey:CPTableViewSelectionHighlightStyleKey];
[aCoder encodeInt:_columnAutoResizingStyle forKey:CPTableViewColumnAutoresizingStyleKey];
[aCoder encodeBool:_allowsMultipleSelection forKey:CPTableViewMultipleSelectionKey];
[aCoder encodeBool:_allowsEmptySelection forKey:CPTableViewEmptySelectionKey];
[aCoder encodeBool:_allowsColumnReordering forKey:CPTableViewColumnReorderingKey];
+3
View File
@@ -61,6 +61,9 @@
_usesAlternatingRowBackgroundColors = (flags & 0x00800000) ? YES : NO;
_alternatingRowBackgroundColors =[[CPColor whiteColor], [CPColor colorWithHexString:@"e4e7ff"]];
_selectionHighlightStyle = [aCoder decodeIntForKey:@"NSTableViewSelectionHighlightStyle"] || CPTableViewSelectionHighlightStyleRegular;
_columnAutoResizingStyle = [aCoder decodeIntForKey:@"NSColumnAutoresizingStyle"];
_allowsMultipleSelection = (flags & 0x08000000) ? YES : NO;
_allowsEmptySelection = (flags & 0x10000000) ? YES : NO;
_allowsColumnSelection = (flags & 0x04000000) ? YES : NO;