Display "info not available" in file table.

This commit is contained in:
Mitchell Livingston 2006-08-20 19:11:02 +00:00
parent 549e375b95
commit eb026f1528
1 changed files with 12 additions and 7 deletions

View File

@ -213,17 +213,22 @@
//set file table //set file table
[fFiles removeAllObjects]; [fFiles removeAllObjects];
if (numberSelected > 0)
{
Torrent * torrent; Torrent * torrent;
NSEnumerator * enumerator = [fTorrents objectEnumerator]; NSEnumerator * enumerator = [fTorrents objectEnumerator];
while ((torrent = [enumerator nextObject])) while ((torrent = [enumerator nextObject]))
[fFiles addObjectsFromArray: [torrent fileList]]; [fFiles addObjectsFromArray: [torrent fileList]];
[fFileTable deselectAll: nil];
[fFileTable reloadData];
[fFileTableStatusField setStringValue: [NSString stringWithFormat: @"%d file%s", [fFiles count], [fFileTableStatusField setStringValue: [NSString stringWithFormat: @"%d file%s", [fFiles count],
[fFiles count] == 1 ? "" : "s"]]; [fFiles count] == 1 ? "" : "s"]];
} }
else
[fFileTableStatusField setStringValue: @"info not available"];
[fFileTable deselectAll: nil];
[fFileTable reloadData];
}
- (void) updateInfoStats - (void) updateInfoStats
{ {