From e6211d427e84020f5fe6dc4b69a0145b18ca5baa Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Tue, 19 Feb 2008 15:57:27 +0000 Subject: [PATCH] ensure the right table columns are removed on Tiger --- macosx/TorrentTableView.m | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index e22cb4a86..cc8695bb2 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -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)