]> granicus.if.org Git - transmission/commitdiff
remove a couple more deprecated methods and an unneed stringWithFormat:
authorMitchell Livingston <livings124@transmissionbt.com>
Sat, 29 Aug 2009 00:09:18 +0000 (00:09 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Sat, 29 Aug 2009 00:09:18 +0000 (00:09 +0000)
macosx/AboutWindowController.m
macosx/MessageWindowController.m
macosx/PrefsController.m

index c5291a639de8dd1353bfbf6bcc55c2915ac1810a..6aa210138f8ab1cb38f8911b970f0474a617b383 100644 (file)
@@ -71,7 +71,9 @@ AboutWindowController * fAboutBoxInstance = nil;
 
 - (IBAction) showLicense: (id) sender
 {
-    [fLicenseView setString: [NSString stringWithContentsOfFile: [[NSBundle mainBundle] pathForResource: @"COPYING" ofType: nil]]];
+    NSString * licenseText = [NSString stringWithContentsOfFile: [[NSBundle mainBundle] pathForResource: @"COPYING" ofType: nil]
+                                usedEncoding: nil error: NULL];
+    [fLicenseView setString: licenseText];
     [fLicenseCloseButton setTitle: NSLocalizedString(@"OK", "About window -> license close button")];
        
        [NSApp beginSheet: fLicenseSheet modalForWindow: [self window] modalDelegate: nil didEndSelector: nil contextInfo: nil];
index d8b73a77c7a9257eb5772e5147d3d15c08072476..e0c1cbffa1bb390d75b022d99cfc2fdd90ecebf6 100644 (file)
         {
             NSAlert * alert = [[NSAlert alloc] init];
             [alert addButtonWithTitle: NSLocalizedString(@"OK", "Save log alert panel -> button")];
-            [alert setMessageText: [NSString stringWithFormat: NSLocalizedString(@"Log Could Not Be Saved",
-                                    "Save log alert panel -> title")]];
-            [alert setInformativeText: [NSString stringWithFormat: 
+            [alert setMessageText: NSLocalizedString(@"Log Could Not Be Saved", "Save log alert panel -> title")];
+            [alert setInformativeText: [NSString stringWithFormat:
                     NSLocalizedString(@"There was a problem creating the file \"%@\".",
-                                        "Save log alert panel -> message"), [[panel filename] lastPathComponent]]];
+                    "Save log alert panel -> message"), [[panel filename] lastPathComponent]]];
             [alert setAlertStyle: NSWarningAlertStyle];
             
             [alert runModal];
index 8fe1118012c7ad54b27d780b31d91ee5caafc906..3d7d0e0d7448a921e2afd706d4279b8704e4b169 100644 (file)
@@ -972,8 +972,8 @@ tr_session * fHandle;
         [fRPCWhitelistArray addObject: @""];
         [fRPCWhitelistTable reloadData];
         
-        int row = [fRPCWhitelistArray count] - 1;
-        [fRPCWhitelistTable selectRow: row byExtendingSelection: NO];
+        const int row = [fRPCWhitelistArray count] - 1;
+        [fRPCWhitelistTable selectRowIndexes: [NSIndexSet indexSetWithIndex: row] byExtendingSelection: NO];
         [fRPCWhitelistTable editColumn: 0 row: row withEvent: nil select: YES];
     }
 }