diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index 1dca50463..c37d11516 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -644,7 +644,6 @@ rect: (NSRectPointer) rect tableColumn: (NSTableColumn *) column row: (int) row mouseLocation: (NSPoint) mouseLocation { - #warning tooltip for file table? if (tableView == fPeerTable) { NSDictionary * peerDic = [fPeers objectAtIndex: row]; @@ -680,8 +679,7 @@ - (id) outlineView: (NSOutlineView *) outlineView objectValueForTableColumn: (NSTableColumn *) tableColumn byItem: (id) item { - NSString * ident = [tableColumn identifier]; - if ([ident isEqualToString: @"Size"]) + if ([[tableColumn identifier] isEqualToString: @"Size"]) return ![[item objectForKey: @"IsFolder"] boolValue] ? [NSString stringForFileSize: [[item objectForKey: @"Size"] unsignedLongLongValue]] : @""; else @@ -701,6 +699,17 @@ [cell setImage: icon]; } +- (NSString *) outlineView: (NSOutlineView *) outlineView toolTipForCell: (NSCell *) cell rect: (NSRectPointer) rect + tableColumn: (NSTableColumn *) tableColumn item: (id) item mouseLocation: (NSPoint) mouseLocation +{ + if ([[tableColumn identifier] isEqualToString: @"Size"]) + return ![[item objectForKey: @"IsFolder"] boolValue] + ? [[[item objectForKey: @"Size"] stringValue] stringByAppendingString: NSLocalizedString(@" bytes", + "Inspector -> Files tab -> table row tooltip")] : @""; + else + return [item objectForKey: @"Name"]; +} + - (NSArray *) peerSortDescriptors { NSMutableArray * descriptors = [NSMutableArray array]; diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 04b351210..175e5dfa0 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -1074,10 +1074,6 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 { file = &fInfo->files[i]; - /*[files addObject: [NSDictionary dictionaryWithObjectsAndKeys: - [NSString stringWithUTF8String: file->name], @"Name", - [NSNumber numberWithUnsignedLongLong: file->length], @"Size", nil]];*/ - pathComponents = [[[NSString stringWithUTF8String: file->name] pathComponents] mutableCopy]; if (fInfo->multifile) [pathComponents removeObjectAtIndex: 0];