]> granicus.if.org Git - transmission/commitdiff
combine the two rpc delete data methods
authorMitchell Livingston <livings124@transmissionbt.com>
Mon, 4 Mar 2013 04:18:21 +0000 (04:18 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Mon, 4 Mar 2013 04:18:21 +0000 (04:18 +0000)
macosx/Controller.h
macosx/Controller.m

index 628ff12ef9e0b8d1dc97728f149c9c16a4a430e5..e6b6807c3981ac16a6a023edfbe4ea75d24de347 100644 (file)
@@ -275,8 +275,7 @@ typedef enum
 
 - (void) rpcCallback: (tr_rpc_callback_type) type forTorrentStruct: (struct tr_torrent *) torrentStruct;
 - (void) rpcAddTorrentStruct: (struct tr_torrent *) torrentStruct;
-- (void) rpcRemoveTorrent: (Torrent *) torrent;
-- (void) rpcRemoveTorrentDeleteData: (Torrent *) torrent;
+- (void) rpcRemoveTorrent: (Torrent *) torrent deleteData: (BOOL) deleteData;
 - (void) rpcStartedStoppedTorrent: (Torrent *) torrent;
 - (void) rpcChangedTorrent: (Torrent *) torrent;
 - (void) rpcMovedTorrent: (Torrent *) torrent;
index 8cf7d685d054986c8d5d42f8d4da1f7f8815e1fa..8d6a2fb911012b91393dd1c35e01343f07b8465e 100644 (file)
@@ -4771,11 +4771,11 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
                     break;
                     
                 case TR_RPC_TORRENT_REMOVING:
-                    [self rpcRemoveTorrent: torrent];
+                    [self rpcRemoveTorrent: torrent deleteData: NO];
                     break;
                     
                 case TR_RPC_TORRENT_TRASHING:
-                    [self rpcRemoveTorrentDeleteData: torrent];
+                    [self rpcRemoveTorrent: torrent deleteData: YES];
                     break;
                     
                 case TR_RPC_TORRENT_CHANGED:
@@ -4832,14 +4832,9 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
     [self fullUpdateUI];
 }
 
-- (void) rpcRemoveTorrent: (Torrent *) torrent
+- (void) rpcRemoveTorrent: (Torrent *) torrent deleteData: (BOOL) deleteData
 {
-    [self confirmRemoveTorrents: @[ torrent ] deleteData: NO];
-}
-
-- (void) rpcRemoveTorrentDeleteData: (Torrent *) torrent
-{
-    [self confirmRemoveTorrents: @[ torrent ] deleteData: YES];
+    [self confirmRemoveTorrents: @[ torrent ] deleteData: deleteData];
 }
 
 - (void) rpcStartedStoppedTorrent: (Torrent *) torrent