Changeset 9400


Ignore:
Timestamp:
Oct 25, 2009, 1:20:52 PM (13 years ago)
Author:
livings124
Message:

since Transmission will now create missing directories, don't have the check/pop-up for missing location when starting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r9399 r9400  
    263263    fFinishedSeeding = NO;
    264264   
    265     if (![self isActive] && /*[self alertForFolderAvailable] &&*/ [self alertForRemainingDiskSpace])
     265    if (![self isActive] && [self alertForRemainingDiskSpace])
    266266    {
    267267        tr_torrentStart(fHandle);
     
    527527    return YES;
    528528}
    529 
    530 #warning is this needed?
    531 /*- (BOOL) alertForFolderAvailable
    532 {
    533     #warning check for change from incomplete to download folder first
    534     if (access(tr_torrentGetDownloadDir(fHandle), 0))
    535     {
    536         NSAlert * alert = [[NSAlert alloc] init];
    537         [alert setMessageText: [NSString stringWithFormat:
    538                                 NSLocalizedString(@"The folder for downloading \"%@\" cannot be used.",
    539                                     "Folder cannot be used alert -> title"), [self name]]];
    540         [alert setInformativeText: [NSString stringWithFormat:
    541                         NSLocalizedString(@"\"%@\" cannot be used. The transfer will be paused.",
    542                                             "Folder cannot be used alert -> message"), [self downloadFolder]]];
    543         [alert addButtonWithTitle: NSLocalizedString(@"OK", "Folder cannot be used alert -> button")];
    544         [alert addButtonWithTitle: [NSLocalizedString(@"Choose New Location",
    545                                     "Folder cannot be used alert -> location button") stringByAppendingEllipsis]];
    546        
    547         if ([alert runModal] != NSAlertFirstButtonReturn)
    548         {
    549             NSOpenPanel * panel = [NSOpenPanel openPanel];
    550            
    551             [panel setPrompt: NSLocalizedString(@"Select", "Folder cannot be used alert -> prompt")];
    552             [panel setAllowsMultipleSelection: NO];
    553             [panel setCanChooseFiles: NO];
    554             [panel setCanChooseDirectories: YES];
    555             [panel setCanCreateDirectories: YES];
    556 
    557             [panel setMessage: [NSString stringWithFormat: NSLocalizedString(@"Select the download folder for \"%@\"",
    558                                 "Folder cannot be used alert -> select destination folder"), [self name]]];
    559            
    560             [[NSNotificationCenter defaultCenter] postNotificationName: @"MakeWindowKey" object: nil];
    561             [panel beginSheetForDirectory: nil file: nil types: nil modalForWindow: [NSApp keyWindow] modalDelegate: self
    562                     didEndSelector: @selector(destinationChoiceClosed:returnCode:contextInfo:) contextInfo: nil];
    563         }
    564        
    565         [alert release];
    566        
    567         return NO;
    568     }
    569     return YES;
    570 }
    571 
    572 - (void) destinationChoiceClosed: (NSOpenPanel *) openPanel returnCode: (NSInteger) code contextInfo: (void *) context
    573 {
    574     if (code != NSOKButton)
    575         return;
    576    
    577     [self changeDownloadFolder: [[openPanel filenames] objectAtIndex: 0]];
    578    
    579     [self startTransfer];
    580     [self update];
    581    
    582     [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateStats" object: nil];
    583 }*/
    584529
    585530- (NSImage *) icon
Note: See TracChangeset for help on using the changeset viewer.