Changeset 2869


Ignore:
Timestamp:
Aug 19, 2007, 3:03:28 AM (15 years ago)
Author:
livings124
Message:

get rid of an unnecessry string additions method

Location:
trunk/macosx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Badger.m

    r2290 r2869  
    9696           
    9797            //place badge text
    98             [self badgeString: [NSString stringWithInt: fCompleted] forRect: badgeRect];
     98            [self badgeString: [NSString stringWithFormat: @"%d", fCompleted] forRect: badgeRect];
    9999                       
    100100            [fDockIcon unlockFocus];
  • trunk/macosx/InfoWindowController.m

    r2840 r2869  
    396396   
    397397    int seeders = [torrent seeders], leechers = [torrent leechers], downloaded = [torrent completedFromTracker];
    398     [fSeedersField setStringValue: seeders < 0 ? @"" : [NSString stringWithInt: seeders]];
    399     [fLeechersField setStringValue: leechers < 0 ? @"" : [NSString stringWithInt: leechers]];
    400     [fCompletedFromTrackerField setStringValue: downloaded < 0 ? @"" : [NSString stringWithInt: downloaded]];
     398    [fSeedersField setStringValue: seeders < 0 ? @"" : [NSString stringWithFormat: @"%d", seeders]];
     399    [fLeechersField setStringValue: leechers < 0 ? @"" : [NSString stringWithFormat: @"%d", leechers]];
     400    [fCompletedFromTrackerField setStringValue: downloaded < 0 ? @"" : [NSString stringWithFormat: @"%d", downloaded]];
    401401   
    402402    BOOL active = [torrent isActive];
     
    433433        [fConnectedPeersField setStringValue: NSLocalizedString(@"info not available", "Inspector -> Peers tab -> peers")];
    434434   
    435     [fDownloadingFromField setStringValue: active ? [NSString stringWithInt: [torrent peersSendingToUs]] : @""];
    436     [fUploadingToField setStringValue: active ? [NSString stringWithInt: [torrent peersGettingFromUs]] : @""];
     435    [fDownloadingFromField setStringValue: active ? [NSString stringWithFormat: @"%d", [torrent peersSendingToUs]] : @""];
     436    [fUploadingToField setStringValue: active ? [NSString stringWithFormat: @"%d", [torrent peersGettingFromUs]] : @""];
    437437   
    438438    [fPeers release];
  • trunk/macosx/StringAdditions.h

    r1866 r2869  
    3030- (NSString *) stringByAppendingEllipsis;
    3131
    32 + (NSString *) stringWithInt: (int) value;
    33 
    3432+ (NSString *) stringForFileSize: (uint64_t) size;
    3533+ (NSString *) stringForSpeed: (float) speed;
  • trunk/macosx/StringAdditions.m

    r2617 r2869  
    3636{
    3737        return [self stringByAppendingString: [NSString ellipsis]];
    38 }
    39 
    40 + (NSString *) stringWithInt: (int) value
    41 {
    42     return [NSString stringWithFormat: @"%d", value];
    4338}
    4439
Note: See TracChangeset for help on using the changeset viewer.