Changeset 9352


Ignore:
Timestamp:
Oct 22, 2009, 12:10:41 AM (13 years ago)
Author:
livings124
Message:

fix Quick Look from the file inspector

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r9348 r9352  
    319319        tr_bencDictAddBool(&settings, TR_PREFS_KEY_RATIO_ENABLED, [fDefaults boolForKey: @"RatioCheck"]);
    320320        tr_bencDictAddBool(&settings, TR_PREFS_KEY_RPC_ENABLED,  [fDefaults boolForKey: @"RPC"]);
    321         tr_bencDictAddInt(&settings, TR_PREFS_KEY_RPC_PORT,  [fDefaults integerForKey: @"RPCPort"]);
     321        tr_bencDictAddInt(&settings, TR_PREFS_KEY_RPC_PORT, [fDefaults integerForKey: @"RPCPort"]);
    322322        tr_bencDictAddStr(&settings, TR_PREFS_KEY_RPC_USERNAME,  [[fDefaults stringForKey: @"RPCUsername"] UTF8String]);
    323323        tr_bencDictAddBool(&settings, TR_PREFS_KEY_RPC_WHITELIST_ENABLED,  [fDefaults boolForKey: @"RPCUseWhitelist"]);
  • trunk/macosx/InfoWindowController.m

    r9347 r9352  
    11371137        FileListNode * item = [fileOutlineView itemAtRow: i];
    11381138        if ([self canQuickLookFile: item])
    1139             [urlArray addObject: [torrent fileLocation: item]];
     1139            [urlArray addObject: [NSURL fileURLWithPath: [torrent fileLocation: item]]];
    11401140    }
    11411141   
     
    16661666{
    16671667    Torrent * torrent = [fTorrents objectAtIndex: 0];
    1668     return [torrent fileLocation: item] != nil && ([item isFolder] || [torrent fileProgress: item] >= 1.0);
     1668    return ([item isFolder] || [torrent fileProgress: item] >= 1.0) && [torrent fileLocation: item];
    16691669}
    16701670
  • trunk/macosx/Torrent.m

    r9350 r9352  
    3333
    3434- (id) initWithPath: (NSString *) path hash: (NSString *) hashString torrentStruct: (tr_torrent *) torrentStruct lib: (tr_session *) lib
    35         downloadFolder: (NSString *) downloadFolder incompleteFolder: (NSString *) incompleteFolder
    3635        waitToStart: (NSNumber *) waitToStart
    37         groupValue: (NSNumber *) groupValue;
     36        groupValue: (NSNumber *) groupValue
     37        legacyDownloadFolder: (NSString *) downloadFolder legacyIncompleteFolder: (NSString *) incompleteFolder;
    3838
    3939- (void) createFileList;
     
    7474{
    7575    self = [self initWithPath: path hash: nil torrentStruct: NULL lib: lib
    76             downloadFolder: location incompleteFolder: nil
    77             waitToStart: nil groupValue: nil];
     76            waitToStart: nil groupValue: nil
     77            legacyDownloadFolder: location legacyIncompleteFolder: nil];
    7878   
    7979    if (self)
     
    8888{
    8989    self = [self initWithPath: nil hash: nil torrentStruct: torrentStruct lib: lib
    90             downloadFolder: location incompleteFolder: nil
    91             waitToStart: nil groupValue: nil];
     90            waitToStart: nil groupValue: nil
     91            legacyDownloadFolder: location legacyIncompleteFolder: nil];
    9292   
    9393    return self;
     
    9999                hash: [history objectForKey: @"TorrentHash"]
    100100                torrentStruct: NULL lib: lib
    101                 downloadFolder: [history objectForKey: @"DownloadFolder"] //upgrading from versions < 1.80
    102                 incompleteFolder: [[history objectForKey: @"UseIncompleteFolder"] boolValue] //upgrading from versions < 1.80
    103                                     ? [history objectForKey: @"IncompleteFolder"] : nil
    104101                waitToStart: [history objectForKey: @"WaitToStart"]
    105                 groupValue: [history objectForKey: @"GroupValue"]];
     102                groupValue: [history objectForKey: @"GroupValue"]
     103                legacyDownloadFolder: [history objectForKey: @"DownloadFolder"] //upgrading from versions < 1.80
     104                legacyIncompleteFolder: [[history objectForKey: @"UseIncompleteFolder"] boolValue] //upgrading from versions < 1.80
     105                                        ? [history objectForKey: @"IncompleteFolder"] : nil];
    106106   
    107107    if (self)
     
    15471547
    15481548- (id) initWithPath: (NSString *) path hash: (NSString *) hashString torrentStruct: (tr_torrent *) torrentStruct lib: (tr_session *) lib
    1549         downloadFolder: (NSString *) downloadFolder incompleteFolder: (NSString *) incompleteFolder
    15501549        waitToStart: (NSNumber *) waitToStart
    15511550        groupValue: (NSNumber *) groupValue
     1551        legacyDownloadFolder: (NSString *) downloadFolder legacyIncompleteFolder: (NSString *) incompleteFolder
    15521552{
    15531553    if (!(self = [super init]))
     
    15661566        tr_ctor * ctor = tr_ctorNew(lib);
    15671567        tr_ctorSetPaused(ctor, TR_FORCE, YES);
    1568         tr_ctorSetPeerLimit(ctor, TR_FALLBACK, [fDefaults integerForKey: @"PeersTorrent"]);
    15691568       
    15701569        int result = TR_PARSE_ERR;
Note: See TracChangeset for help on using the changeset viewer.