From eb026f15281fdc31101f41ab58badc8da212e4d1 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 20 Aug 2006 19:11:02 +0000 Subject: [PATCH] Display "info not available" in file table. --- macosx/InfoWindowController.m | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index 8416cfbd6..e1e32bfbf 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -213,16 +213,21 @@ //set file table [fFiles removeAllObjects]; - Torrent * torrent; - NSEnumerator * enumerator = [fTorrents objectEnumerator]; - while ((torrent = [enumerator nextObject])) - [fFiles addObjectsFromArray: [torrent fileList]]; + if (numberSelected > 0) + { + Torrent * torrent; + 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 reloadData]; - - [fFileTableStatusField setStringValue: [NSString stringWithFormat: @"%d file%s", [fFiles count], - [fFiles count] == 1 ? "" : "s"]]; } - (void) updateInfoStats