Ignore:
Timestamp:
Nov 30, 2008, 7:23:15 PM (12 years ago)
Author:
livings124
Message:

patch from ciaran for #757 to add separate download locations for each group (when added)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/AddWindowController.m

    r7185 r7210  
    258258}
    259259
     260- (void) setDestination: (NSString *) destination
     261{
     262    [fDestination release];
     263    fDestination = [destination retain];
     264   
     265    [fLocationField setStringValue: [fDestination stringByAbbreviatingWithTildeInPath]];
     266    [fLocationField setToolTip: fDestination];
     267   
     268    ExpandedPathToIconTransformer * iconTransformer = [[ExpandedPathToIconTransformer alloc] init];
     269    [fLocationImageView setImage: [iconTransformer transformedValue: fDestination]];
     270    [iconTransformer release];
     271   
     272    [fTorrent changeDownloadFolder: fDestination];
     273}
     274
    260275- (void) folderChoiceClosed: (NSOpenPanel *) openPanel returnCode: (NSInteger) code contextInfo: (void *) contextInfo
    261276{
    262277    if (code == NSOKButton)
    263     {
    264         [fDestination release];
    265         fDestination = [[[openPanel filenames] objectAtIndex: 0] retain];
    266        
    267         [fLocationField setStringValue: [fDestination stringByAbbreviatingWithTildeInPath]];
    268         [fLocationField setToolTip: fDestination];
    269        
    270         ExpandedPathToIconTransformer * iconTransformer = [[ExpandedPathToIconTransformer alloc] init];
    271         [fLocationImageView setImage: [iconTransformer transformedValue: fDestination]];
    272         [iconTransformer release];
    273        
    274         [fTorrent changeDownloadFolder: fDestination];
    275     }
     278        [self setDestination: [[openPanel filenames] objectAtIndex: 0]];
    276279    else
    277280    {
     
    290293{
    291294    fGroupValue = [sender tag];
     295    if ([[GroupsController groups] usesCustomDownloadLocationForIndex: fGroupValue] &&
     296        [[GroupsController groups] customDownloadLocationForIndex: fGroupValue])
     297        [self setDestination: [[GroupsController groups] customDownloadLocationForIndex: fGroupValue]];
    292298}
    293299
Note: See TracChangeset for help on using the changeset viewer.