Changeset 799
- Timestamp:
- Aug 20, 2006, 6:32:55 PM (17 years ago)
- Location:
- trunk/macosx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/InfoWindowController.m
r797 r799 470 470 else 471 471 { 472 NS String* file = [fFiles objectAtIndex: row];472 NSDictionary * file = [fFiles objectAtIndex: row]; 473 473 if ([ident isEqualToString: @"Icon"]) 474 return [[NSWorkspace sharedWorkspace] iconForFileType: [file pathExtension]]; 474 return [[NSWorkspace sharedWorkspace] iconForFileType: [[file objectForKey: @"Name"] pathExtension]]; 475 else if ([ident isEqualToString: @"Size"]) 476 return [NSString stringForFileSize: [[file objectForKey: @"Size"] unsignedIntValue]]; 475 477 else 476 return [ filelastPathComponent];478 return [[file objectForKey: @"Name"] lastPathComponent]; 477 479 } 478 480 } … … 497 499 row: (int) row mouseLocation: (NSPoint) mouseLocation 498 500 { 499 return tableView == fFileTable ? [ fFiles objectAtIndex: row] : nil;501 return tableView == fFileTable ? [[fFiles objectAtIndex: row] objectForKey: @"Name"] : nil; 500 502 } 501 503 -
trunk/macosx/Torrent.m
r789 r799 631 631 { 632 632 int count = fInfo->fileCount, i; 633 tr_file_t file; 633 634 NSMutableArray * files = [NSMutableArray arrayWithCapacity: count]; 635 634 636 for (i = 0; i < count; i++) 635 [files addObject: [[self downloadFolder] stringByAppendingPathComponent: 636 [NSString stringWithUTF8String: fInfo->files[i].name]]]; 637 { 638 file = fInfo->files[i]; 639 [files addObject: [NSDictionary dictionaryWithObjectsAndKeys: [[self downloadFolder] 640 stringByAppendingPathComponent: [NSString stringWithUTF8String: file.name]], @"Name", 641 [NSNumber numberWithUnsignedInt: file.length], @"Size", nil]]; 642 } 643 637 644 return files; 638 645 }
Note: See TracChangeset
for help on using the changeset viewer.