From 6ad287dbeba94854c180c25a219a8e99352c93a8 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Tue, 4 Mar 2008 00:30:26 +0000 Subject: [PATCH] group tooltip displays number of transfers --- macosx/TorrentTableView.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index d756a1ac8..1bfd2ed55 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -228,6 +228,14 @@ else if ([ident isEqualToString: @"UL"] || [ident isEqualToString: @"UL Image"]) return [fDefaults boolForKey: @"DisplayGroupRowRatio"] ? NSLocalizedString(@"Ratio", "Torrent table -> group row -> tooltip") : NSLocalizedString(@"Upload speed", "Torrent table -> group row -> tooltip"); + else if (ident) + { + int count = [[item objectForKey: @"Torrents"] count]; + if (count == 1) + return NSLocalizedString(@"1 transfer", "Torrent table -> group row -> tooltip"); + else + return [NSString stringWithFormat: NSLocalizedString(@"%d transfers", "Torrent table -> group row -> tooltip"), count]; + } else return nil; }