Changeset 9342 for trunk/macosx/Controller.m
- Timestamp:
- Oct 21, 2009, 1:01:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r9328 r9342 264 264 265 265 tr_benc settings; 266 tr_bencInitDict(&settings, 3 4);266 tr_bencInitDict(&settings, 36); 267 267 const char * configDir = tr_getDefaultConfigDir("Transmission"); 268 268 tr_sessionGetDefaultSettings(configDir, &settings); … … 291 291 tr_bencDictAddStr(&settings, TR_PREFS_KEY_DOWNLOAD_DIR, [[[fDefaults stringForKey: @"DownloadFolder"] 292 292 stringByExpandingTildeInPath] UTF8String]); 293 tr_bencDictAddStr(&settings, TR_PREFS_KEY_INCOMPLETE_DIR, [[[fDefaults stringForKey: @"IncompleteDownloadFolder"] 294 stringByExpandingTildeInPath] UTF8String]); 295 tr_bencDictAddBool(&settings, TR_PREFS_KEY_INCOMPLETE_DIR_ENABLED, [fDefaults boolForKey: @"UseIncompleteDownloadFolder"]); 293 296 294 297 tr_bencDictAddInt(&settings, TR_PREFS_KEY_MSGLEVEL, [fDefaults integerForKey: @"MessageLevel"]); … … 941 944 continue; 942 945 943 //change the location if the group calls for it (this has to wait until after the torrent is create )946 //change the location if the group calls for it (this has to wait until after the torrent is created) 944 947 if (!lockDestination && [[GroupsController groups] usesCustomDownloadLocationForIndex: [torrent groupValue]]) 945 948 { 946 949 location = [[GroupsController groups] customDownloadLocationForIndex: [torrent groupValue]]; 947 [torrent changeDownloadFolder : location];950 [torrent changeDownloadFolderBeforeUsing: location]; 948 951 } 949 952 … … 1465 1468 NSMutableArray * paths = [NSMutableArray arrayWithCapacity: [selected count]]; 1466 1469 for (Torrent * torrent in [fTableView selectedTorrents]) 1467 [paths addObject: [NSURL fileURLWithPath: [torrent dataLocation]]]; 1470 { 1471 NSString * location = [torrent dataLocation]; 1472 if (location) 1473 [paths addObject: [NSURL fileURLWithPath: location]]; 1474 } 1468 1475 1469 1476 [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs: paths]; … … 1472 1479 { 1473 1480 for (Torrent * torrent in selected) 1474 [[NSWorkspace sharedWorkspace] selectFile: [torrent dataLocation] inFileViewerRootedAtPath: nil]; 1481 { 1482 NSString * location = [torrent dataLocation]; 1483 if (location) 1484 [[NSWorkspace sharedWorkspace] selectFile: location inFileViewerRootedAtPath: nil]; 1485 } 1475 1486 } 1476 1487 } … … 1770 1781 } 1771 1782 1783 #warning dataLocation could return nil 1772 1784 NSDictionary * clickContext = [NSDictionary dictionaryWithObjectsAndKeys: GROWL_DOWNLOAD_COMPLETE, @"Type", 1773 1785 [torrent dataLocation] , @"Location", nil]; … … 1781 1793 //bounce download stack 1782 1794 [[NSDistributedNotificationCenter defaultCenter] postNotificationName: @"com.apple.DownloadFileFinished" 1783 object: [ [torrent downloadFolder] stringByAppendingPathComponent: [torrent name]]];1795 object: [torrent dataLocation]]; 1784 1796 1785 1797 if ([fDefaults boolForKey: @"QueueSeed"] && [self numToStartFromQueue: NO] == 0) … … 1831 1843 } 1832 1844 1845 #warning dataLocation could return nil 1833 1846 NSDictionary * clickContext = [NSDictionary dictionaryWithObjectsAndKeys: GROWL_SEEDING_COMPLETE, @"Type", 1834 1847 [torrent dataLocation], @"Location", nil]; … … 3143 3156 3144 3157 for (Torrent * torrent in selectedTorrents) 3145 if (([torrent isFolder] || [torrent isComplete]) && [ [NSFileManager defaultManager] fileExistsAtPath: [torrent dataLocation]])3158 if (([torrent isFolder] || [torrent isComplete]) && [torrent dataLocation]) 3146 3159 [qlArray addObject: torrent]; 3147 3160
Note: See TracChangeset
for help on using the changeset viewer.