Changeset 3975


Ignore:
Timestamp:
Nov 26, 2007, 5:33:31 PM (15 years ago)
Author:
livings124
Message:

attempt to make per-torrent action menu a little faster

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r3955 r3975  
    714714{
    715715    return fStat->percentDone;
    716     /*uint64_t have = [self haveTotal];
    717     return (float)have / (have + [self sizeLeft]);*/
    718716}
    719717
    720718- (float) progressLeft
    721719{
    722     //NSLog(@"left %f",(float)fStat->leftUntilDone / [self size]);
    723720    return (float)[self sizeLeft] / [self size];
    724721}
  • trunk/macosx/TorrentTableView.m

    r3702 r3975  
    610610            NSImage * icon;
    611611            if (![[dict objectForKey: @"IsFolder"] boolValue])
    612             {
    613                 icon = [[dict objectForKey: @"Icon"] copy];
    614                 [icon setFlipped: NO];
    615             }
     612                icon = [[NSWorkspace sharedWorkspace] iconForFileType: [name pathExtension]];
    616613            else
    617614            {
     
    622619                [itemMenu release];
    623620               
    624                 icon = [[[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')] copy];
     621                icon = [[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')];
    625622            }
    626623           
     
    630627            [icon setSize: NSMakeSize(16.0, 16.0)];
    631628            [item setImage: icon];
    632             [icon release];
    633629           
    634630            [item setAction: @selector(checkFile:)];
Note: See TracChangeset for help on using the changeset viewer.