Changeset 801 for trunk


Ignore:
Timestamp:
Aug 20, 2006, 7:11:02 PM (16 years ago)
Author:
livings124
Message:

Display "info not available" in file table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r800 r801  
    214214    [fFiles removeAllObjects];
    215215   
    216     Torrent * torrent;
    217     NSEnumerator * enumerator = [fTorrents objectEnumerator];
    218     while ((torrent = [enumerator nextObject]))
    219         [fFiles addObjectsFromArray: [torrent fileList]];
     216    if (numberSelected > 0)
     217    {
     218        Torrent * torrent;
     219        NSEnumerator * enumerator = [fTorrents objectEnumerator];
     220        while ((torrent = [enumerator nextObject]))
     221            [fFiles addObjectsFromArray: [torrent fileList]];
     222   
     223        [fFileTableStatusField setStringValue: [NSString stringWithFormat: @"%d file%s", [fFiles count],
     224                                                [fFiles count] == 1 ? "" : "s"]];
     225    }
     226    else
     227        [fFileTableStatusField setStringValue: @"info not available"];
    220228   
    221229    [fFileTable deselectAll: nil];
    222230    [fFileTable reloadData];
    223    
    224     [fFileTableStatusField setStringValue: [NSString stringWithFormat: @"%d file%s", [fFiles count],
    225                                             [fFiles count] == 1 ? "" : "s"]];
    226231}
    227232
Note: See TracChangeset for help on using the changeset viewer.