Changeset 5205


Ignore:
Timestamp:
Mar 6, 2008, 4:13:05 PM (14 years ago)
Author:
livings124
Message:

with multiple torrents selected, show the latest "last activity"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r5140 r5205  
    240240            [fUploadedTotalField setStringValue: @""];
    241241            [fFailedHashField setStringValue: @""];
     242            [fDateActivityField setStringValue: @""];
    242243           
    243244            //options fields
     
    329330        [fDateAddedField setStringValue: @""];
    330331        [fDateCompletedField setStringValue: @""];
    331         [fDateActivityField setStringValue: @""];
    332332       
    333333        [fPiecesControl setSelected: NO forSegment: PIECES_CONTROL_AVAILABLE];
     
    10581058   
    10591059    uint64_t have = 0, haveVerified = 0, downloadedTotal = 0, uploadedTotal = 0, failedHash = 0;
     1060    NSDate * lastActivity = nil;
    10601061    Torrent * torrent;
    10611062    NSEnumerator * enumerator = [fTorrents objectEnumerator];
     
    10671068        uploadedTotal += [torrent uploadedTotal];
    10681069        failedHash += [torrent failedHash];
     1070       
     1071        NSDate * nextLastActivity;
     1072        if ((nextLastActivity = [torrent dateActivity]))
     1073            lastActivity = [nextLastActivity laterDate: lastActivity];
    10691074    }
    10701075   
     
    10821087    [fFailedHashField setStringValue: [NSString stringForFileSize: failedHash]];
    10831088   
     1089    [fDateActivityField setObjectValue: lastActivity];
     1090   
    10841091    if (numberSelected == 1)
    10851092    {
     
    11001107       
    11011108        [fDateCompletedField setObjectValue: [torrent dateCompleted]];
    1102         [fDateActivityField setObjectValue: [torrent dateActivity]];
    11031109       
    11041110        [fPiecesView updateView: NO];
Note: See TracChangeset for help on using the changeset viewer.