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