add tooltips for group speeds/ratios

This commit is contained in:
Mitchell Livingston 2008-02-28 21:28:48 +00:00
parent cf598407e1
commit 7463856062
1 changed files with 13 additions and 0 deletions

View File

@ -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];