Changeset 3241


Ignore:
Timestamp:
Sep 30, 2007, 1:41:26 PM (14 years ago)
Author:
livings124
Message:

streamline the minimal status string code a little

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r3240 r3241  
    10151015    switch (fStat->status)
    10161016    {
    1017         case TR_STATUS_CHECK_WAIT:
    1018             return [NSLocalizedString(@"Waiting to check existing data", "Torrent -> status string") stringByAppendingEllipsis];
    1019             break;
    1020 
    1021         case TR_STATUS_CHECK:
    1022             return [NSString stringWithFormat: NSLocalizedString(@"Checking existing data (%.2f%%)",
    1023                                     "Torrent -> status string"), 100.0 * fStat->recheckProgress];
    1024             break;
    1025 
    10261017        case TR_STATUS_DOWNLOAD:
    10271018            return [self eta] >= 0 ? [self etaString] : NSLocalizedString(@"Unknown", "Torrent -> remaining time");
     
    10351026       
    10361027        default:
    1037             return @"";
     1028            return [self shortStatusString];
    10381029    }
    10391030}
  • trunk/macosx/TorrentCell.m

    r3214 r3241  
    121121{
    122122    Torrent * torrent = [self representedObject];
    123     NSString * string = [torrent isActive] && ![fDefaults boolForKey: @"DisplaySmallStatusRegular"]
    124                             ? [torrent remainingTimeString] : [torrent shortStatusString];
     123    NSString * string = [fDefaults boolForKey: @"DisplaySmallStatusRegular"]
     124                            ? [torrent shortStatusString] : [torrent remainingTimeString];
    125125    return [self rectForMinimalStatusWithString: [self attributedStatusString: string withColor: nil] inBounds: bounds];
    126126}
     
    205205    if (minimal)
    206206    {
    207         NSString * string = [torrent isActive] && ![fDefaults boolForKey: @"DisplaySmallStatusRegular"]
    208                                 ? [torrent remainingTimeString] : [torrent shortStatusString];
     207        NSString * string = [fDefaults boolForKey: @"DisplaySmallStatusRegular"]
     208                            ? [torrent shortStatusString] : [torrent remainingTimeString];
    209209        NSAttributedString * minimalString = [self attributedStatusString: string withColor: statusColor];
    210210        minimalStatusRect = [self rectForMinimalStatusWithString: minimalString inBounds: cellFrame];
Note: See TracChangeset for help on using the changeset viewer.