diff --git a/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib b/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib index f0ffdfd42..65d05dd85 100644 Binary files a/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib and b/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib differ diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index 595b4879a..7a407793d 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -469,11 +469,13 @@ } else { - NSString * file = [fFiles objectAtIndex: row]; + NSDictionary * file = [fFiles objectAtIndex: row]; if ([ident isEqualToString: @"Icon"]) - return [[NSWorkspace sharedWorkspace] iconForFileType: [file pathExtension]]; + return [[NSWorkspace sharedWorkspace] iconForFileType: [[file objectForKey: @"Name"] pathExtension]]; + else if ([ident isEqualToString: @"Size"]) + return [NSString stringForFileSize: [[file objectForKey: @"Size"] unsignedIntValue]]; else - return [file lastPathComponent]; + return [[file objectForKey: @"Name"] lastPathComponent]; } } @@ -496,7 +498,7 @@ rect: (NSRectPointer) rect tableColumn: (NSTableColumn *) column row: (int) row mouseLocation: (NSPoint) mouseLocation { - return tableView == fFileTable ? [fFiles objectAtIndex: row] : nil; + return tableView == fFileTable ? [[fFiles objectAtIndex: row] objectForKey: @"Name"] : nil; } - (NSArray *) peerSortDescriptors diff --git a/macosx/Torrent.m b/macosx/Torrent.m index b9590e641..7300b38e0 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -630,10 +630,17 @@ - (NSArray *) fileList { int count = fInfo->fileCount, i; + tr_file_t file; NSMutableArray * files = [NSMutableArray arrayWithCapacity: count]; + for (i = 0; i < count; i++) - [files addObject: [[self downloadFolder] stringByAppendingPathComponent: - [NSString stringWithUTF8String: fInfo->files[i].name]]]; + { + file = fInfo->files[i]; + [files addObject: [NSDictionary dictionaryWithObjectsAndKeys: [[self downloadFolder] + stringByAppendingPathComponent: [NSString stringWithUTF8String: file.name]], @"Name", + [NSNumber numberWithUnsignedInt: file.length], @"Size", nil]]; + } + return files; }