See exact number of bytes in tooltip over file size in file table.

This commit is contained in:
Mitchell Livingston 2006-08-21 16:28:49 +00:00
parent 78ffb705da
commit 9ef1ebaf19
1 changed files with 10 additions and 1 deletions

View File

@ -500,7 +500,16 @@
rect: (NSRectPointer) rect tableColumn: (NSTableColumn *) column
row: (int) row mouseLocation: (NSPoint) mouseLocation
{
return tableView == fFileTable ? [[fFiles objectAtIndex: row] objectForKey: @"Name"] : nil;
if (tableView == fFileTable)
{
NSDictionary * file = [fFiles objectAtIndex: row];
if ([[column identifier] isEqualToString: @"Size"])
return [[[file objectForKey: @"Size"] stringValue] stringByAppendingString: @" bytes"];
else
return [file objectForKey: @"Name"];
}
else
return nil;
}
- (NSArray *) peerSortDescriptors