Changeset 2041
- Timestamp:
- Jun 10, 2007, 11:13:44 PM (15 years ago)
- Location:
- branches/file_selection/macosx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/file_selection/macosx/InfoWindowController.m
r2039 r2041 629 629 BOOL current = NO, other = NO; 630 630 int i, priority; 631 Torrent * torrent = [fTorrents objectAtIndex: 0]; 631 632 632 633 if (menuItem == fFilePriorityHigh) … … 639 640 for (i = [indexSet firstIndex]; i != NSNotFound && (!current || !other); i = [indexSet indexGreaterThanIndex: i]) 640 641 { 641 item = [fFileOutline itemAtRow: i]; 642 #warning get working with folders 643 if ([[item objectForKey: @"IsFolder"] boolValue]) 644 continue; 645 646 if (priority == [[item objectForKey: @"Priority"] intValue]) 642 if ([torrent hasFilePriority: priority forItem: [fFileOutline itemAtRow: i]]) 647 643 current = YES; 648 644 else 649 other = YES; 645 other = YES; 650 646 } 651 647 -
branches/file_selection/macosx/Torrent.h
r2025 r2041 212 212 - (void) setFileCheckState: (int) state forFileItem: (NSDictionary *) item; 213 213 - (void) setFilePriority: (int) priority forFileItem: (NSMutableDictionary *) item; 214 - (BOOL) hasFilePriority: (int) priority forItem: (NSDictionary *) item; 214 215 215 216 - (NSDate *) dateAdded; -
branches/file_selection/macosx/Torrent.m
r2033 r2041 1405 1405 } 1406 1406 1407 - (BOOL) hasFilePriority: (int) priority forItem: (NSDictionary *) item 1408 { 1409 if (![[item objectForKey: @"IsFolder"] boolValue]) 1410 return priority == [[item objectForKey: @"Priority"] intValue]; 1411 else 1412 { 1413 NSEnumerator * enumerator = [[item objectForKey: @"Children"] objectEnumerator]; 1414 NSDictionary * child; 1415 while ((child = [enumerator nextObject])) 1416 if ([self hasFilePriority: priority forItem: child]) 1417 return YES; 1418 return NO; 1419 } 1420 } 1421 1407 1422 - (NSDate *) dateAdded 1408 1423 {
Note: See TracChangeset
for help on using the changeset viewer.