stop timers before clearing the dock icon on quit

This commit is contained in:
Mitchell Livingston 2007-12-20 01:42:30 +00:00
parent 69e1e025b2
commit 15c7cebe8b
2 changed files with 4 additions and 3 deletions

View File

@ -37,6 +37,7 @@
@end
#warning make singleton?
@implementation Badger
- (id) initWithLib: (tr_handle *) lib

View File

@ -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;