]> granicus.if.org Git - transmission/commitdiff
Stop waiting transfers before stopping others. This way, for a group of transfers...
authorMitchell Livingston <livings124@transmissionbt.com>
Sat, 6 Aug 2011 15:31:19 +0000 (15:31 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Sat, 6 Aug 2011 15:31:19 +0000 (15:31 +0000)
macosx/Controller.m

index cf500c1ab5f2c50920a9ab3fecce73342a9ca89c..09bc0bf4d0a4d96a98aaa4a020294ac2c8762bef 100644 (file)
@@ -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];