Changeset 6511


Ignore:
Timestamp:
Aug 14, 2008, 2:18:14 AM (13 years ago)
Author:
livings124
Message:

always manually remove torrents from libT, even when removed through rpc

Location:
trunk/macosx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.h

    r6255 r6511  
    152152- (void) removeSheetDidEnd: (NSWindow *) sheet returnCode: (int) returnCode
    153153                        contextInfo: (NSDictionary *) dict;
    154 - (void) confirmRemoveTorrents: (NSArray *) torrents deleteData: (BOOL) deleteData deleteTorrent: (BOOL) deleteTorrent
    155         fromRPC: (BOOL) rpc;
     154- (void) confirmRemoveTorrents: (NSArray *) torrents deleteData: (BOOL) deleteData deleteTorrent: (BOOL) deleteTorrent;
    156155- (void) removeNoDelete:                (id) sender;
    157156- (void) removeDeleteData:              (id) sender;
  • trunk/macosx/Controller.m

    r6330 r6511  
    141141#define DONATE_URL  @"http://www.transmissionbt.com/donate.php"
    142142
    143 static void rpcCallback(tr_handle * handle UNUSED, tr_rpc_callback_type type, struct tr_torrent * torrentStruct, void * controller)
     143static tr_rpc_callback_status rpcCallback(tr_handle * handle UNUSED, tr_rpc_callback_type type, struct tr_torrent * torrentStruct, void * controller)
    144144{
    145145    [(Controller *)controller rpcCallback: type forTorrentStruct: torrentStruct];
     146    return TR_RPC_NOREMOVE; //we'll do the remove manually
    146147}
    147148
     
    12181219    }
    12191220   
    1220     [self confirmRemoveTorrents: torrents deleteData: deleteData deleteTorrent: deleteTorrent fromRPC: NO];
     1221    [self confirmRemoveTorrents: torrents deleteData: deleteData deleteTorrent: deleteTorrent];
    12211222}
    12221223
     
    12261227    if (returnCode == NSAlertDefaultReturn)
    12271228        [self confirmRemoveTorrents: torrents deleteData: [[dict objectForKey: @"DeleteData"] boolValue]
    1228                 deleteTorrent: [[dict objectForKey: @"DeleteTorrent"] boolValue] fromRPC: NO];
     1229                deleteTorrent: [[dict objectForKey: @"DeleteTorrent"] boolValue]];
    12291230    else
    12301231        [torrents release];
     
    12341235
    12351236- (void) confirmRemoveTorrents: (NSArray *) torrents deleteData: (BOOL) deleteData deleteTorrent: (BOOL) deleteTorrent
    1236         fromRPC: (BOOL) rpc
    12371237{
    12381238    //don't want any of these starting then stopping
     
    12581258        lowestOrderValue = MIN(lowestOrderValue, [torrent orderValue]);
    12591259       
    1260         if (rpc)
    1261             [torrent closeRemoveTorrentInterface];
    1262         else
    1263             [torrent closeRemoveTorrent];
     1260        [torrent closeRemoveTorrent];
    12641261    }
    12651262   
     
    42884285- (void) rpcRemoveTorrent: (Torrent *) torrent
    42894286{
    4290     [self confirmRemoveTorrents: [[NSArray arrayWithObject: torrent] retain] deleteData: NO deleteTorrent: NO fromRPC: YES];
     4287    [self confirmRemoveTorrents: [[NSArray arrayWithObject: torrent] retain] deleteData: NO deleteTorrent: NO];
    42914288    [torrent release];
    42924289}
  • trunk/macosx/Torrent.h

    r6325 r6511  
    8282- (NSDictionary *) history;
    8383
    84 - (void) closeRemoveTorrentInterface;
    8584- (void) closeRemoveTorrent;
    8685
  • trunk/macosx/Torrent.m

    r6473 r6511  
    192192}
    193193
    194 - (void) closeRemoveTorrentInterface
     194- (void) closeRemoveTorrent
    195195{
    196196    //allow the file to be index by Time Machine
    197197    [self setTimeMachineExclude: NO forPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]];
    198 }
    199 
    200 - (void) closeRemoveTorrent
    201 {
    202     [self closeRemoveTorrentInterface];
    203198   
    204199    tr_torrentRemove(fHandle);
Note: See TracChangeset for help on using the changeset viewer.