From 86e63d3febe4a487ab4567eca64116d6d5d4c753 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 7 May 2007 00:56:52 +0000 Subject: [PATCH] eliminate an unneeded function --- macosx/Controller.h | 1 - macosx/Controller.m | 35 ++++++++++++++++------------------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/macosx/Controller.h b/macosx/Controller.h index 61489ec76..bb71a833c 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -181,7 +181,6 @@ - (void) torrentStoppedForRatio: (NSNotification *) notification; - (void) changeAutoImport; -- (void) newCheckAutoImportDirectory; - (void) checkAutoImportDirectory; - (void) sleepCallBack: (natural_t) messageType argument: (void *) messageArgument; diff --git a/macosx/Controller.m b/macosx/Controller.m index cd6014c83..3f04de9e6 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -1837,27 +1837,24 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy -(void) watcher: (id) watcher receivedNotification: (NSString *) notification forPath: (NSString *) path { if ([notification isEqualToString: UKFileWatcherWriteNotification]) - [self newCheckAutoImportDirectory]; -} - -- (void) newCheckAutoImportDirectory -{ - if (![fDefaults boolForKey: @"AutoImport"]) - return; - - if (fAutoImportTimer) { - if ([fAutoImportTimer isValid]) - [fAutoImportTimer invalidate]; - [fAutoImportTimer release]; - fAutoImportTimer = nil; + if (![fDefaults boolForKey: @"AutoImport"]) + return; + + if (fAutoImportTimer) + { + if ([fAutoImportTimer isValid]) + [fAutoImportTimer invalidate]; + [fAutoImportTimer release]; + fAutoImportTimer = nil; + } + + //check again in 10 seconds in case torrent file wasn't complete + fAutoImportTimer = [[NSTimer scheduledTimerWithTimeInterval: 10.0 target: self + selector: @selector(checkAutoImportDirectory) userInfo: nil repeats: NO] retain]; + + [self checkAutoImportDirectory]; } - - //check again in 10 seconds in case torrent file wasn't complete - fAutoImportTimer = [[NSTimer scheduledTimerWithTimeInterval: 10.0 target: self - selector: @selector(checkAutoImportDirectory) userInfo: nil repeats: NO] retain]; - - [self checkAutoImportDirectory]; } - (void) changeAutoImport