diff --git a/macosx/Badger.m b/macosx/Badger.m index b0a6a345c..8dbe7694c 100644 --- a/macosx/Badger.m +++ b/macosx/Badger.m @@ -37,6 +37,7 @@ @end +#warning make singleton? @implementation Badger - (id) initWithLib: (tr_handle *) lib diff --git a/macosx/Controller.m b/macosx/Controller.m index a046d9e41..5426319f9 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -537,8 +537,6 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi - (void) applicationWillTerminate: (NSNotification *) notification { - [fBadger setQuitting]; - //stop timers and notification checking [[NSNotificationCenter defaultCenter] removeObserver: self]; @@ -551,6 +549,8 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi [fAutoImportTimer release]; } + [fBadger setQuitting]; + //remove all torrent downloads if (fPendingTorrentDownloads) { @@ -1879,9 +1879,9 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi //check text field if (filterText) { - BOOL removeTextField = YES; if (filterTracker) { + BOOL removeTextField = YES; NSEnumerator * trackerEnumerator = [[torrent allTrackers] objectEnumerator], * subTrackerEnumerator; NSArray * subTrackers; NSString * tracker;