Changeset 2078


Ignore:
Timestamp:
Jun 14, 2007, 4:12:16 PM (15 years ago)
Author:
charles
Message:

another patch from Waldorf to make `done' work better in the OS X ui

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/file_selection/macosx/Torrent.m

    r2077 r2078  
    369369    else
    370370        [progressString appendFormat: NSLocalizedString(@"%@, uploaded %@ (Ratio: %@)", "Torrent -> progress string"),
    371                 [NSString stringForFileSize: [self size]], [NSString stringForFileSize: [self uploadedTotal]],
     371                [NSString stringForFileSize: [self downloadedValid]],
     372                            [NSString stringForFileSize: [self uploadedTotal]],
    372373                [NSString stringForRatio: [self ratio]]];
    373374
     
    471472            break;
    472473
     474        case TR_STATUS_DONE:
     475            [statusString setString: @""];
     476            if ([self totalPeers] != 1)
     477                [statusString appendFormat:@"Uploading to %d of %d peers",
     478                                                [self peersDownloading], [self totalPeers]];
     479            else
     480                [statusString appendFormat: @"Uploading to %d of 1 peer",
     481                                                [self peersDownloading]];
     482           
     483            break;
     484
    473485        case TR_STATUS_STOPPING:
    474486            tempString = [NSLocalizedString(@"Stopping", "Torrent -> status string") stringByAppendingEllipsis];
     
    10711083            break;
    10721084       
     1085        case TR_STATUS_DONE:
     1086            return @"Uploading";
     1087            break;
     1088       
    10731089        default:
    10741090            return NSLocalizedString(@"N/A", "Torrent -> status string");
     
    10931109- (BOOL) isSeeding
    10941110{
    1095     return fStat->status == TR_STATUS_SEED;
     1111    return (fStat->status == TR_STATUS_SEED || fStat->status == TR_STATUS_DONE);
     1112}
     1113
     1114- (BOOL) isDone
     1115{
     1116    return fStat->status == TR_STATUS_DONE;
    10961117}
    10971118
Note: See TracChangeset for help on using the changeset viewer.