]> granicus.if.org Git - transmission/commitdiff
use the new rename function for the torrent, instead of the per-file function; update...
authorMitchell Livingston <livings124@transmissionbt.com>
Tue, 22 Jan 2013 00:44:58 +0000 (00:44 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Tue, 22 Jan 2013 00:44:58 +0000 (00:44 +0000)
macosx/Controller.m
macosx/FileRenameSheetController.m
macosx/Torrent.m

index a286b338ed7dd96410d01b2f9eb9606bbd4ab54f..06df4ac0ce76e13e53b5fd9f406619befe4a76c2 100644 (file)
@@ -1748,7 +1748,12 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
     Torrent * torrent = selected[0];
     
     [FileRenameSheetController presentSheetForTorrent:torrent modalForWindow: fWindow completionHandler: ^(BOOL didRename) {
-        NSLog(@"finished");
+        if (didRename)
+        {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [self fullUpdateUI];
+            });
+        }
     }];
 }
 
index c9865b10a6703995e6e71040df5aa59fe9d742c8..13d7c6bbec990256f4c82c4ea15f41c0a2aea3fd 100644 (file)
@@ -85,6 +85,10 @@ typedef void (^CompletionBlock)(BOOL);
     
     [self.inputField setStringValue: name];
     [self.renameButton setEnabled: NO];
+    
+    #warning size these
+    [self.renameButton setStringValue: NSLocalizedString(@"Rename", "rename sheet button")];
+    [self.cancelButton setStringValue: NSLocalizedString(@"Cancel", "rename sheet button")];
 }
 
 - (IBAction) rename: (id) sender;
index 02fd74002d4399c95286dfc3883983be31e38569..5303e6962400a341019adb32ff1e2cd133d5972f 100644 (file)
@@ -849,7 +849,7 @@ int trashDataFile(const char * filename)
     
     NSDictionary * contextInfo = [@{ @"Nodes" : fFileList, @"CompletionHandler" : [[completionHandler copy] autorelease] } retain];
     
-    tr_torrentRenamePath(fHandle, fInfo->name, [newName UTF8String], renameCallback, contextInfo);
+    tr_torrentRename(fHandle, [newName UTF8String], renameCallback, contextInfo);
 }
 
 - (void) renameFileNode: (FileListNode *) node withName: (NSString *) newName completionHandler: (void (^)(BOOL didRename)) completionHandler