Changeset 9431


Ignore:
Timestamp:
Oct 29, 2009, 1:44:54 AM (13 years ago)
Author:
livings124
Message:

remove the mac's redundant location check when adding a transfer

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r9422 r9431  
    833833- (void) openFiles: (NSArray *) filenames addType: (addType) type forcePath: (NSString *) path
    834834{
    835     #warning checks could probably be removed, since location is checked when starting
    836     if (!path && [fDefaults boolForKey: @"UseIncompleteDownloadFolder"]
    837         && access([[[fDefaults stringForKey: @"IncompleteDownloadFolder"] stringByExpandingTildeInPath] UTF8String], 0))
    838     {
    839         NSOpenPanel * panel = [NSOpenPanel openPanel];
    840        
    841         [panel setPrompt: NSLocalizedString(@"Select", "Default incomplete folder cannot be used alert -> prompt")];
    842         [panel setAllowsMultipleSelection: NO];
    843         [panel setCanChooseFiles: NO];
    844         [panel setCanChooseDirectories: YES];
    845         [panel setCanCreateDirectories: YES];
    846 
    847         [panel setMessage: NSLocalizedString(@"The incomplete folder cannot be used. Choose a new location or cancel for none.",
    848                                         "Default incomplete folder cannot be used alert -> message")];
    849        
    850         NSDictionary * dict = [[NSDictionary alloc] initWithObjectsAndKeys: filenames, @"Filenames",
    851                                                         [NSNumber numberWithInt: type], @"AddType", nil];
    852        
    853         [panel beginSheetForDirectory: nil file: nil types: nil modalForWindow: fWindow modalDelegate: self
    854                 didEndSelector: @selector(incompleteChoiceClosed:returnCode:contextInfo:) contextInfo: dict];
    855         return;
    856     }
    857    
    858     if (!path && [fDefaults boolForKey: @"DownloadLocationConstant"]
    859         && access([[[fDefaults stringForKey: @"DownloadFolder"] stringByExpandingTildeInPath] UTF8String], 0))
    860     {
    861         NSOpenPanel * panel = [NSOpenPanel openPanel];
    862        
    863         [panel setPrompt: NSLocalizedString(@"Select", "Default folder cannot be used alert -> prompt")];
    864         [panel setAllowsMultipleSelection: NO];
    865         [panel setCanChooseFiles: NO];
    866         [panel setCanChooseDirectories: YES];
    867         [panel setCanCreateDirectories: YES];
    868 
    869         [panel setMessage: NSLocalizedString(@"The download folder cannot be used. Choose a new location.",
    870                                         "Default folder cannot be used alert -> message")];
    871        
    872         NSDictionary * dict = [[NSDictionary alloc] initWithObjectsAndKeys: filenames, @"Filenames",
    873                                                         [NSNumber numberWithInt: type], @"AddType", nil];
    874        
    875         [panel beginSheetForDirectory: nil file: nil types: nil modalForWindow: fWindow modalDelegate: self
    876                 didEndSelector: @selector(downloadChoiceClosed:returnCode:contextInfo:) contextInfo: dict];
    877         return;
    878     }
    879    
    880835    BOOL deleteTorrentFile, canToggleDelete = NO;
    881836    switch (type)
     
    19281883    [self sortTorrentsIgnoreSelected]; //actually sort
    19291884   
    1930     [fTableView selectValues: selectedValues];
     1885    //[fTableView selectValues: selectedValues];
    19311886}
    19321887
  • trunk/macosx/InfoWindowController.m

    r9430 r9431  
    10351035        }
    10361036       
    1037         //determing status strings from flags 
     1037        //determing status strings from flags
    10381038        NSMutableArray * statusArray = [NSMutableArray arrayWithCapacity: 6];
    10391039        NSString * flags = [peer objectForKey: @"Flags"];
     
    15311531                                [upDownComponents componentsJoinedByString: @", "]];
    15321532        }
     1533        else
     1534            connectedText = [connectedText stringByAppendingFormat: @"\n%@", knownString];
    15331535       
    15341536        [fConnectedPeersField setStringValue: connectedText];
Note: See TracChangeset for help on using the changeset viewer.