mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
update the main window when a torrent is auto-started from the queue
This commit is contained in:
parent
ae89e4683d
commit
4d5c05177d
3 changed files with 17 additions and 5 deletions
|
@ -1240,8 +1240,9 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
|||
//don't want any of these starting then stopping
|
||||
/*for (Torrent * torrent in torrents)
|
||||
[torrent setWaitToStart: NO];*/
|
||||
|
||||
[torrents makeObjectsPerformSelector: @selector(stopTransfer)];
|
||||
|
||||
for (Torrent * torrent in torrents)
|
||||
[torrent stopTransfer];
|
||||
|
||||
[self updateTorrentsInQueue];
|
||||
}
|
||||
|
|
|
@ -641,6 +641,8 @@ tr_session * fHandle;
|
|||
tr_sessionSetIdleLimited(fHandle, [fDefaults boolForKey: @"IdleLimitCheck"]);
|
||||
tr_sessionSetIdleLimit(fHandle, [fDefaults integerForKey: @"IdleLimitMinutes"]);
|
||||
|
||||
#warning reload main table for remaining seeding time
|
||||
|
||||
//reload global settings in inspector
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateGlobalOptions" object: nil];
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
index: (NSInteger) index flatList: (NSMutableArray *) flatFileList;
|
||||
- (void) sortFileList: (NSMutableArray *) fileNodes;
|
||||
|
||||
- (void) startQueue;
|
||||
- (void) completenessChange: (NSDictionary *) statusInfo;
|
||||
- (void) ratioLimitHit;
|
||||
- (void) idleLimitHit;
|
||||
|
@ -59,6 +60,11 @@
|
|||
|
||||
@end
|
||||
|
||||
void startQueueCallback(tr_torrent * torrent, void * torrentData)
|
||||
{
|
||||
[(Torrent *)torrentData performSelectorOnMainThread: @selector(startQueue) withObject: nil waitUntilDone: NO];
|
||||
}
|
||||
|
||||
void completenessChangeCallback(tr_torrent * torrent, tr_completeness status, bool wasRunning, void * torrentData)
|
||||
{
|
||||
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||
|
@ -159,9 +165,6 @@ int trashDataFile(const char * filename)
|
|||
[self startTransferNoQueue];
|
||||
}
|
||||
|
||||
//fWaitToStart = waitToStart && [waitToStart boolValue];
|
||||
|
||||
|
||||
//upgrading from versions < 1.30: get old added, activity, and done dates
|
||||
NSDate * date;
|
||||
if ((date = [history objectForKey: @"Date"]))
|
||||
|
@ -1651,6 +1654,7 @@ int trashDataFile(const char * filename)
|
|||
|
||||
fInfo = tr_torrentInfo(fHandle);
|
||||
|
||||
tr_torrentSetQueueStartCallback(fHandle, startQueueCallback, self);
|
||||
tr_torrentSetCompletenessCallback(fHandle, completenessChangeCallback, self);
|
||||
tr_torrentSetRatioLimitHitCallback(fHandle, ratioLimitHitCallback, self);
|
||||
tr_torrentSetIdleLimitHitCallback(fHandle, idleLimitHitCallback, self);
|
||||
|
@ -1791,6 +1795,11 @@ int trashDataFile(const char * filename)
|
|||
[self sortFileList: [node children]];
|
||||
}
|
||||
|
||||
- (void) startQueue
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateQueue" object: self];
|
||||
}
|
||||
|
||||
//status has been retained
|
||||
- (void) completenessChange: (NSDictionary *) statusInfo
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue