From b59cb97da46ffae2125377a49c957fb1d8ffd988 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sat, 6 Aug 2011 15:31:19 +0000 Subject: [PATCH] Stop waiting transfers before stopping others. This way, for a group of transfers to be stopped, a waiting one won't start if an active one is stopped first. --- macosx/Controller.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index cf500c1ab..09bc0bf4d 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -1233,10 +1233,10 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy - (void) stopTorrents: (NSArray *) torrents { -#warning look into stopping all without starting any //don't want any of these starting then stopping - /*for (Torrent * torrent in torrents) - [torrent setWaitToStart: NO];*/ + for (Torrent * torrent in torrents) + if ([torrent waitingToStart]) + [torrent stopTransfer]; for (Torrent * torrent in torrents) [torrent stopTransfer]; @@ -1333,10 +1333,10 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy NSMutableArray * selectedValues = [NSMutableArray arrayWithArray: [fTableView selectedValues]]; [selectedValues removeObjectsInArray: torrents]; -#warning look into stopping all without starting any //don't want any of these starting then stopping - /*for (Torrent * torrent in torrents) - [torrent setWaitToStart: NO];*/ + for (Torrent * torrent in torrents) + if ([torrent waitingToStart]) + [torrent stopTransfer]; [fTorrents removeObjectsInArray: torrents];