Changeset 2793


Ignore:
Timestamp:
Aug 16, 2007, 3:58:50 AM (15 years ago)
Author:
livings124
Message:

keep one image for the table view instead of one for regular and one for minimal

Location:
trunk/macosx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/PiecesView.m

    r2789 r2793  
    312312    }
    313313   
    314     free(showAvailablity ? pieces : piecesPercent);
     314    if (showAvailablity)
     315        free(pieces);
     316    else
     317        free(piecesPercent);
    315318}
    316319
  • trunk/macosx/Torrent.h

    r2760 r2793  
    5757    NSUserDefaults * fDefaults;
    5858
    59     NSImage * fIcon, * fIconFlipped, * fIconSmall;
     59    NSImage * fIcon, * fIconFlipped;
    6060    NSMutableString * fNameString, * fProgressString, * fStatusString, * fShortStatusString, * fRemainingTimeString;
    6161   
     
    131131- (NSImage *) icon;
    132132- (NSImage *) iconFlipped;
    133 - (NSImage *) iconSmall;
    134133
    135134- (NSString *) name;
  • trunk/macosx/Torrent.m

    r2761 r2793  
    158158    [fIcon release];
    159159    [fIconFlipped release];
    160     [fIconSmall release];
    161160   
    162161    [fProgressString release];
     
    833832}
    834833
    835 - (NSImage *) iconSmall
    836 {
    837     if (!fIconSmall)
    838     {
    839         fIconSmall = [fIcon copy];
    840         [fIconSmall setFlipped: YES];
    841         [fIconSmall setScalesWhenResized: YES];
    842         [fIconSmall setSize: NSMakeSize(16.0, 16.0)];
    843     }
    844     return fIconSmall;
    845 }
    846 
    847834- (NSString *) name
    848835{
  • trunk/macosx/TorrentCell.m

    r2792 r2793  
    210210   
    211211    //icon
    212     NSImage * icon = minimal ? (error ? fErrorImage : [torrent iconSmall]) : [torrent iconFlipped];
     212    NSImage * icon = minimal && error ? fErrorImage : [torrent iconFlipped];
    213213    NSRect iconRect = [self iconRectForBounds: cellFrame];
    214214    [icon drawInRect: iconRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];
  • trunk/macosx/TorrentTableView.m

    r2792 r2793  
    452452        return NSZeroRect;
    453453   
    454     NSRect cellRect = [self frameOfCellAtColumn: [self columnWithIdentifier: @"Torrent"] row: row];
     454    NSRect cellRect = [self frameOfCellAtColumn: 0 row: row];
    455455   
    456456    float buttonToTop = [fDefaults boolForKey: @"SmallView"] ? BUTTON_TO_TOP_SMALL : BUTTON_TO_TOP_REGULAR;
     
    465465        return NSZeroRect;
    466466   
    467     NSRect cellRect = [self frameOfCellAtColumn: [self columnWithIdentifier: @"Torrent"] row: row];
     467    NSRect cellRect = [self frameOfCellAtColumn: 0 row: row];
    468468   
    469469    float buttonToTop = [fDefaults boolForKey: @"SmallView"] ? BUTTON_TO_TOP_SMALL : BUTTON_TO_TOP_REGULAR;
Note: See TracChangeset for help on using the changeset viewer.