Changeset 484 for trunk/macosx/Controller.m
- Timestamp:
- Jun 26, 2006, 5:52:51 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r465 r484 259 259 if (!fUpdateInProgress && [fDefaults boolForKey: @"CheckQuit"]) 260 260 { 261 int active = 0 ;261 int active = 0, downloading = 0; 262 262 Torrent * torrent; 263 263 NSEnumerator * enumerator = [fTorrents objectEnumerator]; 264 264 while ((torrent = [enumerator nextObject])) 265 265 if ([torrent isActive]) 266 { 266 267 active++; 267 268 if (active > 0) 268 if (![torrent isSeeding]) 269 downloading++; 270 } 271 272 BOOL shouldAsk = [fDefaults boolForKey: @"CheckRemoveDownloading"] ? downloading > 0 : active > 0; 273 if (shouldAsk) 269 274 { 270 275 NSString * message = active == 1 … … 517 522 { 518 523 NSArray * torrents = [[self torrentsAtIndexes: indexSet] retain]; 519 int active = 0; 520 521 Torrent * torrent; 522 NSEnumerator * enumerator = [torrents objectEnumerator]; 523 while ((torrent = [enumerator nextObject])) 524 if ([torrent isActive]) 525 active++; 526 527 if (active > 0 && [fDefaults boolForKey: @"CheckRemove"]) 524 int active = 0, downloading = 0; 525 526 if ([fDefaults boolForKey: @"CheckRemove"]) 527 { 528 Torrent * torrent; 529 NSEnumerator * enumerator = [torrents objectEnumerator]; 530 while ((torrent = [enumerator nextObject])) 531 if ([torrent isActive]) 532 { 533 active++; 534 if (![torrent isSeeding]) 535 downloading++; 536 } 537 } 538 539 BOOL shouldAsk = [fDefaults boolForKey: @"CheckRemoveDownloading"] ? downloading > 0 : active > 0; 540 if (shouldAsk) 528 541 { 529 542 NSDictionary * dict = [[NSDictionary alloc] initWithObjectsAndKeys:
Note: See TracChangeset
for help on using the changeset viewer.