]> granicus.if.org Git - transmission/commitdiff
#3675 handle trashing data over RPD in the Mac client
authorMitchell Livingston <livings124@transmissionbt.com>
Sun, 6 Feb 2011 17:32:16 +0000 (17:32 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Sun, 6 Feb 2011 17:32:16 +0000 (17:32 +0000)
macosx/Controller.h
macosx/Controller.m

index b14d2f883e8fa71f259b34a7c0be29471b5e10a2..38659b226ecb5e6827b8c850e2a1ee5e40e6fd43 100644 (file)
@@ -274,6 +274,7 @@ typedef enum
 - (void) rpcCallback: (tr_rpc_callback_type) type forTorrentStruct: (struct tr_torrent *) torrentStruct;
 - (void) rpcAddTorrentStruct: (NSValue *) torrentStructPtr;
 - (void) rpcRemoveTorrent: (Torrent *) torrent;
+- (void) rpcRemoveTorrentDeleteData: (Torrent *) torrent;
 - (void) rpcStartedStoppedTorrent: (Torrent *) torrent;
 - (void) rpcChangedTorrent: (Torrent *) torrent;
 - (void) rpcMovedTorrent: (Torrent *) torrent;
index e5290ee8831f018b89df7eec00ea0ba271c43564..d1fe616c46dd1f9a66d895ed1b8cf84fac4c4580 100644 (file)
@@ -4436,6 +4436,10 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
             [self performSelectorOnMainThread: @selector(rpcRemoveTorrent:) withObject: torrent waitUntilDone: NO];
             break;
         
+        case TR_RPC_TORRENT_TRASHING:
+            [self performSelectorOnMainThread: @selector(rpcRemoveTorrentDeleteData:) withObject: torrent waitUntilDone: NO];
+            break;
+        
         case TR_RPC_TORRENT_CHANGED:
             [self performSelectorOnMainThread: @selector(rpcChangedTorrent:) withObject: torrent waitUntilDone: NO];
             break;
@@ -4485,6 +4489,12 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
     [torrent release];
 }
 
+- (void) rpcRemoveTorrentDeleteData: (Torrent *) torrent
+{
+    [self confirmRemoveTorrents: [[NSArray arrayWithObject: torrent] retain] deleteData: YES];
+    [torrent release];
+}
+
 - (void) rpcStartedStoppedTorrent: (Torrent *) torrent
 {
     [torrent update];