Ignore:
Timestamp:
Mar 10, 2011, 1:36:51 AM (11 years ago)
Author:
livings124
Message:

add a button to the bottom-left of the main window to clean up all completed transfers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r12115 r12118  
    410410    [fSpeedLimitButton setToolTip: NSLocalizedString(@"Speed Limit overrides the total bandwidth limits with its own limits.",
    411411                                "Main window -> 2nd bottom left button (turtle) tooltip")];
     412    [fClearCompletedButton setToolTip: NSLocalizedString(@"Cleanup all transfers that have completed seeding.",
     413                                "Main window -> 3rd bottom left button (cleanup) tooltip")];
    412414   
    413415    [fTableView registerForDraggedTypes: [NSArray arrayWithObject: TORRENT_TABLE_VIEW_DATA_TYPE]];
     
    16061608    //pull the upload and download speeds - most consistent by using current stats
    16071609    CGFloat dlRate = 0.0, ulRate = 0.0;
     1610    BOOL completed = NO;
    16081611    for (Torrent * torrent in fTorrents)
    16091612    {
    16101613        dlRate += [torrent downloadRate];
    16111614        ulRate += [torrent uploadRate];
     1615       
     1616        completed |= [torrent isFinishedSeeding];
    16121617    }
    16131618   
     
    16191624           
    16201625            [fStatusBar updateWithDownload: dlRate upload: ulRate];
     1626           
     1627            [fClearCompletedButton setHidden: !completed];
    16211628        }
    16221629
     
    33693376    }
    33703377   
    3371     //set info image
     3378    //set info item
    33723379    if ([ident isEqualToString: TOOLBAR_INFO])
    33733380    {
     
    33763383    }
    33773384   
    3378     //set filter image
     3385    //set filter item
    33793386    if ([ident isEqualToString: TOOLBAR_FILTER])
    33803387    {
     
    33833390    }
    33843391   
    3385     //set quick look image
     3392    //set quick look item
    33863393    if ([ident isEqualToString: TOOLBAR_QUICKLOOK])
    33873394    {
     
    39923999    //get the torrent
    39934000    Torrent * torrent = nil;
    3994     if (torrentStruct != NULL && (type != TR_RPC_TORRENT_ADDED && type != TR_RPC_SESSION_CHANGED))
     4001    if (torrentStruct != NULL && (type != TR_RPC_TORRENT_ADDED && type != TR_RPC_SESSION_CHANGED && type != TR_RPC_SESSION_CLOSE))
    39954002    {
    39964003        for (torrent in fTorrents)
Note: See TracChangeset for help on using the changeset viewer.