Disable the stop ratio once it is reached (while seeding).

This commit is contained in:
Mitchell Livingston 2007-04-20 23:07:10 +00:00
parent 36bb16a66f
commit 7b78590acf
4 changed files with 11 additions and 3 deletions

View File

@ -1776,6 +1776,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
[self updateTorrentsInQueue];
[fInfoController updateInfoStats];
[fInfoController updateRatioForTorrent: torrent];
if ([fDefaults boolForKey: @"PlaySeedingSound"])
{

View File

@ -64,6 +64,8 @@
- (void) updateInfoForTorrents: (NSArray *) torrents;
- (void) updateInfoStats;
- (void) updateRatioForTorrent: (Torrent *) torrent;
- (void) setNextTab;
- (void) setPreviousTab;

View File

@ -433,9 +433,7 @@
- (void) updateInfoSettings
{
int numberSelected = [fTorrents count];
if (numberSelected > 0)
if ([fTorrents count] > 0)
{
Torrent * torrent;
@ -554,6 +552,12 @@
[self updateInfoStats];
}
- (void) updateRatioForTorrent: (Torrent *) torrent
{
if ([fTorrents containsObject: torrent])
[self updateInfoSettings];
}
- (int) stateSettingToPopUpIndex: (int) index
{
if (index == NSOnState)

View File

@ -298,6 +298,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
fFinishedSeeding = YES;
[self setRatioSetting: NSOffState];
[[NSNotificationCenter defaultCenter] postNotificationName: @"TorrentStoppedForRatio" object: self];
}