Some more work on queueing.

This commit is contained in:
Mitchell Livingston
2006-06-23 22:32:01 +00:00
parent 3ff2411359
commit 23dcbc5353
6 changed files with 78 additions and 61 deletions

View File

@@ -197,8 +197,9 @@
Torrent * torrent = [fTorrents objectAtIndex: 0];
[fWaitToStartButton setState: [torrent waitingToStart]];
[fWaitToStartButton setEnabled: ![torrent isActive] && [torrent progress] < 1.0
&& [[[NSUserDefaults standardUserDefaults] stringForKey: @"StartSetting"] isEqualToString: @"Wait"]];
#warning disable if actively downloading or finished
[fWaitToStartButton setEnabled:
[[[NSUserDefaults standardUserDefaults] stringForKey: @"StartSetting"] isEqualToString: @"Wait"]];
}
else
{
@@ -470,14 +471,12 @@
- (void) setWaitToStart: (id) sender
{
BOOL wait = [sender state];
Torrent * torrent;
NSEnumerator * enumerator = [fTorrents objectEnumerator];
while ((torrent = [enumerator nextObject]))
[torrent setWaitToStart: wait];
[torrent setWaitToStart: [sender state]];
[[NSNotificationCenter defaultCenter] postNotificationName: @"StartSettingChange" object: self];
[[NSNotificationCenter defaultCenter] postNotificationName: @"TorrentStartSettingChange" object: torrent];
}
@end