From 0a5024adc9a28f16f9ff7dbc86daa67846c04bcd Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 4 Mar 2013 04:18:21 +0000 Subject: [PATCH] combine the two rpc delete data methods --- macosx/Controller.h | 3 +-- macosx/Controller.m | 13 ++++--------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/macosx/Controller.h b/macosx/Controller.h index 628ff12ef..e6b6807c3 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -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; diff --git a/macosx/Controller.m b/macosx/Controller.m index 8cf7d685d..8d6a2fb91 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -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 -- 2.40.0