Changeset 2016
- Timestamp:
- Jun 9, 2007, 10:11:10 PM (15 years ago)
- Location:
- branches/file_selection/macosx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/file_selection/macosx/InfoWindowController.m
r2014 r2016 794 794 Torrent * torrent = [fTorrents objectAtIndex: 0]; 795 795 if ([[item objectForKey: @"IsFolder"] boolValue]) 796 return [NSNumber numberWithInt: [torrent shouldDownloadFolderForFiles: [item objectForKey: @"Indexes"]]];797 else 798 return [NSNumber numberWithInt: [torrent shouldDownloadFile: [[item objectForKey: @"Index"] intValue]]];796 return [NSNumber numberWithInt: [torrent checkForFileFolder: [item objectForKey: @"Indexes"]]]; 797 else 798 return [NSNumber numberWithInt: [torrent checkForFile: [[item objectForKey: @"Index"] intValue]]]; 799 799 } 800 800 else … … 833 833 Torrent * torrent = [fTorrents objectAtIndex: 0]; 834 834 if ([[item objectForKey: @"IsFolder"] boolValue]) 835 [cell setEnabled: [torrent canChangeDownloadCheckFo ldersForFiles: [item objectForKey: @"Indexes"]]];835 [cell setEnabled: [torrent canChangeDownloadCheckForFileFolder: [item objectForKey: @"Indexes"]]]; 836 836 else 837 837 [cell setEnabled: [torrent canChangeDownloadCheckFile: [[item objectForKey: @"Index"] intValue]]]; -
branches/file_selection/macosx/Torrent.h
r2014 r2016 203 203 - (int) fileCount; 204 204 - (float) fileProgress: (int) index; 205 - (int) shouldDownloadFile: (int) index;206 - (int) shouldDownloadFolderForFiles: (NSIndexSet *) indexSet;205 - (int) checkForFile: (int) index; 206 - (int) checkForFileFolder: (NSIndexSet *) indexSet; 207 207 - (BOOL) canChangeDownloadCheckFile: (int) index; 208 - (BOOL) canChangeDownloadCheckFo ldersForFiles: (NSIndexSet *) indexSet;208 - (BOOL) canChangeDownloadCheckForFileFolder: (NSIndexSet *) indexSet; 209 209 - (void) setFileCheckState: (int) state forFileItem: (NSDictionary *) item; 210 210 -
branches/file_selection/macosx/Torrent.m
r2015 r2016 1316 1316 } 1317 1317 1318 - (int) shouldDownloadFile: (int) index1318 - (int) checkForFile: (int) index 1319 1319 { 1320 1320 return (tr_torrentGetFilePriority(fHandle, index) != TR_PRI_DND || [self fileProgress: index] >= 1.0) … … 1322 1322 } 1323 1323 1324 - (int) shouldDownloadFolderForFiles: (NSIndexSet *) indexSet1324 - (int) checkForFileFolder: (NSIndexSet *) indexSet 1325 1325 { 1326 1326 BOOL onState = NO, offState = NO; … … 1328 1328 for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index]) 1329 1329 { 1330 if ([self shouldDownloadFile: index] == NSOnState)1330 if ([self checkForFile: index] == NSOnState) 1331 1331 onState = YES; 1332 1332 else … … 1344 1344 } 1345 1345 1346 - (BOOL) canChangeDownloadCheckFo ldersForFiles: (NSIndexSet *) indexSet1346 - (BOOL) canChangeDownloadCheckForFileFolder: (NSIndexSet *) indexSet 1347 1347 { 1348 1348 int index; … … 1626 1626 { 1627 1627 if (isFolder) 1628 {1629 [dict setObject: [NSNumber numberWithInt: [[dict objectForKey: @"Remaining"] intValue]+1] forKey: @"Remaining"];1630 1628 [[dict objectForKey: @"Indexes"] addIndex: index]; 1631 }1632 1629 } 1633 1630
Note: See TracChangeset
for help on using the changeset viewer.