Torrent * torrent = selected[0];
[FileRenameSheetController presentSheetForTorrent:torrent modalForWindow: fWindow completionHandler: ^(BOOL didRename) {
- NSLog(@"finished");
+ if (didRename)
+ {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ [self fullUpdateUI];
+ });
+ }
}];
}
[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;
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