From a28583b50b0629c642724816ef7f4e0026c2f319 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Tue, 19 Feb 2008 05:14:22 +0000 Subject: [PATCH] first go at getting the app to work nicely with Tiger again --- NEWS | 2 +- macosx/TorrentTableView.m | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 318817851..1d87c2c2a 100644 --- a/NEWS +++ b/NEWS @@ -2,7 +2,7 @@ NEWS file for Transmission 1.10 (2008/xx/yy) - All Platforms: - + Removing transfers will remove the associated cache file + + Removing a transfer will remove the associated cache file - Mac: + Window when adding torrents to select files and other settings + Leopard: Group dividers diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index 10882744a..cb8622a17 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -82,6 +82,23 @@ return self; } +- (void) awakeFromNib +{ + if (![NSApp isOnLeopardOrBetter]) + { + //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"]) + [self removeTableColumn: column]; + } + + [self sizeLastColumnToFit]; + } +} + - (void) dealloc { [fCollapsedGroups release]; @@ -158,7 +175,7 @@ { if ([[tableColumn identifier] isEqualToString: @"UL Image"] || [[tableColumn identifier] isEqualToString: @"DL Image"]) { - //ensure white only when selected + //ensure arrows are white only when selected NSImage * image = [cell image]; BOOL template = [cell backgroundStyle] == NSBackgroundStyleLowered; if ([image isTemplate] != template) @@ -173,7 +190,7 @@ - (NSRect) frameOfCellAtColumn: (NSInteger) column row: (NSInteger) row { - if (column == -1 || (![NSApp isOnLeopardOrBetter] && [[self itemAtRow: row] isKindOfClass: [Torrent class]])) + if (column == -1 || ![NSApp isOnLeopardOrBetter]) return [self rectOfRow: row]; else {