trivial changes

This commit is contained in:
Mitchell Livingston 2013-02-08 13:02:16 +00:00
parent a61a67ec49
commit e79005e150
4 changed files with 11 additions and 17 deletions

View File

@ -2961,13 +2961,9 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
if (![fDefaults boolForKey: @"AutoImport"] || ![fDefaults stringForKey: @"AutoImportDirectory"])
return;
if (fAutoImportTimer)
{
if ([fAutoImportTimer isValid])
[fAutoImportTimer invalidate];
[fAutoImportTimer release];
fAutoImportTimer = nil;
}
if ([fAutoImportTimer isValid])
[fAutoImportTimer invalidate];
[fAutoImportTimer release];
//check again in 10 seconds in case torrent file wasn't complete
fAutoImportTimer = [[NSTimer scheduledTimerWithTimeInterval: 10.0 target: self
@ -2978,13 +2974,11 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
- (void) changeAutoImport
{
if (fAutoImportTimer)
{
if ([fAutoImportTimer isValid])
[fAutoImportTimer invalidate];
[fAutoImportTimer release];
fAutoImportTimer = nil;
}
if ([fAutoImportTimer isValid])
[fAutoImportTimer invalidate];
[fAutoImportTimer release];
fAutoImportTimer = nil;
[fAutoImportedNames release];
fAutoImportedNames = nil;

View File

@ -53,6 +53,6 @@
- (void) revealFile: (id) sender;
- (IBAction) renameSelected: (id) sender;
- (void) renameSelected: (id) sender;
@end

View File

@ -432,7 +432,7 @@ typedef enum
[[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs: paths];
}
- (IBAction) renameSelected: (id) sender
- (void) renameSelected: (id) sender
{
NSIndexSet * indexes = [fOutline selectedRowIndexes];
NSAssert([indexes count] == 1, @"1 file needs to be selected to rename, but %ld are selected", [indexes count]);

View File

@ -82,7 +82,7 @@ typedef void (^CompletionBlock)(BOOL);
{
[super windowDidLoad];
NSString * name = self.node ? [self.node name] : [self.torrent name];
NSString * name = [self.node name] ?: [self.torrent name];
NSString * label = [NSString stringWithFormat: NSLocalizedString(@"Rename the file \"%@\":", "rename sheet label"), name];
[self.labelField setStringValue: label];