From 74638560622d1b099ef23380f1f3670315e7ca2f Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Thu, 28 Feb 2008 21:28:48 +0000 Subject: [PATCH] add tooltips for group speeds/ratios --- macosx/TorrentTableView.m | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index 80dfef301..d756a1ac8 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -219,6 +219,19 @@ : [[self preparedCellAtColumn: [self columnWithIdentifier: @"Group"] row: [self rowForItem: item]] stringValue]; } +- (NSString *) outlineView: (NSOutlineView *) outlineView toolTipForCell: (NSCell *) cell rect: (NSRectPointer) rect + tableColumn: (NSTableColumn *) column item: (id) item mouseLocation: (NSPoint) mouseLocation +{ + NSString * ident = [column identifier]; + if ([ident isEqualToString: @"DL"] || [ident isEqualToString: @"DL Image"]) + return NSLocalizedString(@"Download speed", "Torrent table -> group row -> tooltip"); + 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 + return nil; +} + - (void) updateTrackingAreas { [super updateTrackingAreas];