diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 62a982b24..a832df1e5 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -3497,11 +3497,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", @@ -3525,7 +3527,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]; @@ -3567,6 +3570,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]; diff --git a/Tools/nib2cib/NSTableView.j b/Tools/nib2cib/NSTableView.j index 41ac5f43d..a8fbefde3 100644 --- a/Tools/nib2cib/NSTableView.j +++ b/Tools/nib2cib/NSTableView.j @@ -64,6 +64,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;