mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
A little better behavior with queueing when adding seeding torrents.
This commit is contained in:
parent
77736a625a
commit
05467ddfe4
1 changed files with 12 additions and 4 deletions
|
@ -338,9 +338,9 @@ static void sleepCallBack(void * controller, io_service_t y,
|
|||
if (code == NSOKButton)
|
||||
{
|
||||
[torrent setDownloadFolder: [[openPanel filenames] objectAtIndex: 0]];
|
||||
[torrent update];
|
||||
[self attemptToStartAuto: torrent];
|
||||
[fTorrents addObject: torrent];
|
||||
[torrent update];
|
||||
|
||||
[self torrentNumberChanged];
|
||||
}
|
||||
|
@ -387,9 +387,9 @@ static void sleepCallBack(void * controller, io_service_t y,
|
|||
: [torrentPath stringByDeletingLastPathComponent];
|
||||
|
||||
[torrent setDownloadFolder: folder];
|
||||
[torrent update];
|
||||
[self attemptToStartAuto: torrent];
|
||||
[fTorrents addObject: torrent];
|
||||
[torrent update];
|
||||
}
|
||||
|
||||
[torrent release];
|
||||
|
@ -1104,8 +1104,15 @@ static void sleepCallBack(void * controller, io_service_t y,
|
|||
//will try to start, taking into consideration the start preference
|
||||
- (void) attemptToStartAuto: (Torrent *) torrent
|
||||
{
|
||||
#warning expand upon
|
||||
if ([torrent progress] >= 1.0)
|
||||
{
|
||||
[torrent startTransfer];
|
||||
return;
|
||||
}
|
||||
|
||||
if (![torrent waitingToStart])
|
||||
return;
|
||||
return;
|
||||
|
||||
NSString * startSetting = [fDefaults stringForKey: @"StartSetting"];
|
||||
if ([startSetting isEqualToString: @"Wait"])
|
||||
|
@ -1436,7 +1443,8 @@ static void sleepCallBack(void * controller, io_service_t y,
|
|||
if (action == @selector(removeNoDelete:) || action == @selector(removeDeleteData:)
|
||||
|| 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:);
|
||||
Torrent * torrent;
|
||||
NSIndexSet * indexSet = [fTableView selectedRowIndexes];
|
||||
|
|
Loading…
Reference in a new issue