1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 18:18:10 +00:00

A little better behavior with queueing when adding seeding torrents.

This commit is contained in:
Mitchell Livingston 2006-06-30 02:57:50 +00:00
parent 77736a625a
commit 05467ddfe4

View file

@ -338,9 +338,9 @@ static void sleepCallBack(void * controller, io_service_t y,
if (code == NSOKButton) if (code == NSOKButton)
{ {
[torrent setDownloadFolder: [[openPanel filenames] objectAtIndex: 0]]; [torrent setDownloadFolder: [[openPanel filenames] objectAtIndex: 0]];
[torrent update];
[self attemptToStartAuto: torrent]; [self attemptToStartAuto: torrent];
[fTorrents addObject: torrent]; [fTorrents addObject: torrent];
[torrent update];
[self torrentNumberChanged]; [self torrentNumberChanged];
} }
@ -387,9 +387,9 @@ static void sleepCallBack(void * controller, io_service_t y,
: [torrentPath stringByDeletingLastPathComponent]; : [torrentPath stringByDeletingLastPathComponent];
[torrent setDownloadFolder: folder]; [torrent setDownloadFolder: folder];
[torrent update];
[self attemptToStartAuto: torrent]; [self attemptToStartAuto: torrent];
[fTorrents addObject: torrent]; [fTorrents addObject: torrent];
[torrent update];
} }
[torrent release]; [torrent release];
@ -1104,6 +1104,13 @@ static void sleepCallBack(void * controller, io_service_t y,
//will try to start, taking into consideration the start preference //will try to start, taking into consideration the start preference
- (void) attemptToStartAuto: (Torrent *) torrent - (void) attemptToStartAuto: (Torrent *) torrent
{ {
#warning expand upon
if ([torrent progress] >= 1.0)
{
[torrent startTransfer];
return;
}
if (![torrent waitingToStart]) if (![torrent waitingToStart])
return; return;
@ -1436,7 +1443,8 @@ static void sleepCallBack(void * controller, io_service_t y,
if (action == @selector(removeNoDelete:) || action == @selector(removeDeleteData:) if (action == @selector(removeNoDelete:) || action == @selector(removeDeleteData:)
|| action == @selector(removeDeleteTorrent:) || action == @selector(removeDeleteBoth:)) || action == @selector(removeDeleteTorrent:) || action == @selector(removeDeleteBoth:))
{ {
BOOL warning = NO, onlyDownloading = [fDefaults boolForKey: @"CheckRemoveDownloading"], BOOL warning = NO,
onlyDownloading = [fDefaults boolForKey: @"CheckRemoveDownloading"],
canDelete = action != @selector(removeDeleteTorrent:) && action != @selector(removeDeleteBoth:); canDelete = action != @selector(removeDeleteTorrent:) && action != @selector(removeDeleteBoth:);
Torrent * torrent; Torrent * torrent;
NSIndexSet * indexSet = [fTableView selectedRowIndexes]; NSIndexSet * indexSet = [fTableView selectedRowIndexes];