clean up queue code some more

This commit is contained in:
Mitchell Livingston
2007-01-09 01:31:56 +00:00
parent fcf6161e85
commit 39cccec3d5
4 changed files with 13 additions and 52 deletions

View File

@@ -345,18 +345,13 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
[nc addObserver: self selector: @selector(makeWindowKey)
name: @"MakeWindowKey" object: nil];
//check to start another because of stopped torrent
[nc addObserver: self selector: @selector(checkWaitingForStopped:)
name: @"StoppedDownloading" object: nil];
//check all torrents for starting
[nc addObserver: self selector: @selector(globalStartSettingChange:)
name: @"GlobalStartSettingChange" object: nil];
//check if torrent should now start
[nc addObserver: self selector: @selector(torrentStoppedForRatio:)
name: @"TorrentStoppedForRatio" object: nil];
[nc addObserver: self selector: @selector(updateTorrentsInQueue)
name: @"UpdateQueue" object: nil];
//change that just impacts the dock badge
[nc addObserver: self selector: @selector(resetDockBadge:)
name: @"DockBadgeChange" object: nil];
@@ -1564,25 +1559,6 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
[fPrefsController updateRatioStopField];
}
- (void) checkWaitingForStopped: (NSNotification *) notification
{
[self updateTorrentsInQueue];
[self updateUI: nil];
[self applyFilter: nil];
[self updateTorrentHistory];
}
- (void) torrentStartSettingChange: (NSNotification *) notification
{
[self updateTorrentsInQueue];
}
- (void) globalStartSettingChange: (NSNotification *) notification
{
[self updateTorrentsInQueue];
}
- (void) torrentStoppedForRatio: (NSNotification *) notification
{
[self applyFilter: nil];