Changeset 699


Ignore:
Timestamp:
Jul 26, 2006, 2:54:36 AM (17 years ago)
Author:
livings124
Message:

Small efficiency change.

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/TorrentTableView.h

    r680 r699  
    4444   
    4545    NSMutableArray      * fKeyStrokes;
     46   
     47    NSDictionary        * fSmallStatusAttributes;
    4648}
    4749- (void) setTorrents: (NSArray *) torrents;
  • trunk/macosx/TorrentTableView.m

    r698 r699  
    6464        fKeyStrokes = [[NSMutableArray alloc] init];
    6565       
     66        fSmallStatusAttributes = [[NSDictionary alloc] initWithObjectsAndKeys:
     67                                        [NSFont messageFontOfSize: 9.0], NSFontAttributeName, nil];
     68       
    6669        fDefaults = [NSUserDefaults standardUserDefaults];
    6770    }
     
    7982{
    8083    [fKeyStrokes release];
     84    [fSmallStatusAttributes release];
    8185    [super dealloc];
    8286}
     
    288292        return NO;
    289293
    290     NSDictionary * statusAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
    291                                         [NSFont messageFontOfSize: 9.0], NSFontAttributeName, nil];
    292294    Torrent * torrent = [fTorrents objectAtIndex: row];
    293295    NSString * statusString = ![fDefaults boolForKey: @"SmallStatusRegular"] && [torrent isActive]
    294296                            && [torrent progress] < 1.0 ? [torrent remainingTimeString] : [torrent shortStatusString];
    295297   
    296     float statusWidth = [statusString sizeWithAttributes: statusAttributes].width + 3.0;
     298    float statusWidth = [statusString sizeWithAttributes: fSmallStatusAttributes].width + 3.0;
    297299   
    298300    NSRect cellRect = [self frameOfCellAtColumn: [self columnWithIdentifier: @"Torrent"] row: row];
Note: See TracChangeset for help on using the changeset viewer.