Changeset 12943


Ignore:
Timestamp:
Oct 6, 2011, 2:16:19 AM (11 years ago)
Author:
livings124
Message:

remove most instances of deprecated filename and filenames methods

Location:
trunk/macosx
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/AddMagnetWindowController.m

    r12612 r12943  
    231231{
    232232    if (code == NSOKButton)
    233         [self setDestinationPath: [[openPanel filenames] objectAtIndex: 0]];
     233        [self setDestinationPath: [[[openPanel URLs] objectAtIndex: 0] path]];
    234234    else
    235235    {
  • trunk/macosx/AddWindowController.m

    r12689 r12943  
    328328    {
    329329        fLockDestination = NO;
    330         [self setDestinationPath: [[openPanel filenames] objectAtIndex: 0]];
     330        [self setDestinationPath: [[[openPanel URLs] objectAtIndex: 0] path]];
    331331    }
    332332    else
  • trunk/macosx/Controller.m

    r12940 r12943  
    14461446    {
    14471447        for (Torrent * torrent in torrents)
    1448             [torrent moveTorrentDataFileTo: [[panel filenames] objectAtIndex: 0]];
     1448            [torrent moveTorrentDataFileTo: [[[panel URLs] objectAtIndex: 0] path]];
    14491449    }
    14501450   
     
    15021502    //copy torrent to new location with name of data file
    15031503    if (code == NSOKButton)
    1504         [[torrents objectAtIndex: 0] copyTorrentFileTo: [panel filename]];
     1504        [[torrents objectAtIndex: 0] copyTorrentFileTo: [[panel URL] path]];
    15051505   
    15061506    [torrents removeObjectAtIndex: 0];
  • trunk/macosx/CreatorWindowController.m

    r12940 r12943  
    405405   
    406406    BOOL success = [panel runModal] == NSOKButton;
    407     return success ? [[panel filenames] objectAtIndex: 0] : nil;
     407    return success ? [[[panel URLs] objectAtIndex: 0] path] : nil;
    408408}
    409409
     
    413413    {
    414414        [fLocation release];
    415         fLocation = [[panel filename] retain];
     415        fLocation = [[[panel URL] path] retain];
    416416       
    417417        [fLocationField setStringValue: [fLocation stringByAbbreviatingWithTildeInPath]];
  • trunk/macosx/GroupsPrefsController.m

    r11617 r12943  
    222222    if (code == NSOKButton)
    223223    {
    224         NSString * path = [[openPanel filenames] objectAtIndex: 0];
     224        NSString * path = [[[openPanel URLs] objectAtIndex: 0] path];
    225225        [[GroupsController groups] setCustomDownloadLocation: path forIndex: index];
    226226        [[GroupsController groups] setUsesCustomDownloadLocation: YES forIndex: index];
  • trunk/macosx/MessageWindowController.m

    r12940 r12943  
    405405        NSString * fileString = [messageStrings componentsJoinedByString: @"\n"];
    406406       
    407         if (![fileString writeToFile: [panel filename] atomically: YES encoding: NSUTF8StringEncoding error: nil])
     407        if (![fileString writeToFile: [[panel URL] path] atomically: YES encoding: NSUTF8StringEncoding error: nil])
    408408        {
    409409            NSAlert * alert = [[NSAlert alloc] init];
     
    412412            [alert setInformativeText: [NSString stringWithFormat:
    413413                    NSLocalizedString(@"There was a problem creating the file \"%@\".",
    414                     "Save log alert panel -> message"), [[panel filename] lastPathComponent]]];
     414                    "Save log alert panel -> message"), [[[panel URL] path] lastPathComponent]]];
    415415            [alert setAlertStyle: NSWarningAlertStyle];
    416416           
  • trunk/macosx/PrefsController.m

    r12940 r12943  
    13881388        [fFolderPopUp selectItemAtIndex: DOWNLOAD_FOLDER];
    13891389       
    1390         NSString * folder = [[openPanel filenames] objectAtIndex: 0];
     1390        NSString * folder = [[[openPanel URLs] objectAtIndex: 0] path];
    13911391        [fDefaults setObject: folder forKey: @"DownloadFolder"];
    13921392        [fDefaults setObject: @"Constant" forKey: @"DownloadChoice"];
     
    14051405    if (code == NSOKButton)
    14061406    {
    1407         NSString * folder = [[openPanel filenames] objectAtIndex: 0];
     1407        NSString * folder = [[[openPanel URLs] objectAtIndex: 0] path];
    14081408        [fDefaults setObject: folder forKey: @"IncompleteDownloadFolder"];
    14091409       
     
    14221422            [sharedQueue removePathFromQueue: [path stringByExpandingTildeInPath]];
    14231423       
    1424         path = [[openPanel filenames] objectAtIndex: 0];
     1424        path = [[[openPanel URLs] objectAtIndex: 0] path];
    14251425        [fDefaults setObject: path forKey: @"AutoImportDirectory"];
    14261426        [sharedQueue addPath: [path stringByExpandingTildeInPath]];
     
    14381438    if (code == NSOKButton)
    14391439    {
    1440         NSString * filePath = [[openPanel filenames] objectAtIndex: 0];
     1440        NSString * filePath = [[[openPanel URLs] objectAtIndex: 0] path];
    14411441       
    14421442        if ([[NSFileManager defaultManager] fileExistsAtPath: filePath])  // script file exists
Note: See TracChangeset for help on using the changeset viewer.