ensure the right table columns are removed on Tiger

This commit is contained in:
Mitchell Livingston 2008-02-19 15:57:27 +00:00
parent 806fd71d52
commit e6211d427e
1 changed files with 8 additions and 5 deletions

View File

@ -59,23 +59,26 @@
{
fDefaults = [NSUserDefaults standardUserDefaults];
fTorrentCell = [[TorrentCell alloc] init];
if (![NSApp isOnLeopardOrBetter])
{
NSTableColumn * groupColumn = [self tableColumnWithIdentifier: @"Group"];
[self setOutlineTableColumn: groupColumn];
//remove all unnecessary columns
int i;
for (i = [[self tableColumns] count]-1; i >= 0; i--)
{
NSTableColumn * column = [[self tableColumns] objectAtIndex: i];
if (![[column identifier] isEqualToString: @"Group"])
if (column != groupColumn)
[self removeTableColumn: column];
}
[self sizeLastColumnToFit];
}
fTorrentCell = [[TorrentCell alloc] init];
if (![NSApp isOnLeopardOrBetter])
[[self tableColumnWithIdentifier: @"Group"] setDataCell: fTorrentCell];
}
NSData * groupData = [fDefaults dataForKey: @"CollapsedGroups"];
if (groupData)