1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 00:04:06 +00:00

runs on Tiger again, although blocklist auto-update won't be reliable on Tiger

This commit is contained in:
Mitchell Livingston 2008-09-01 23:17:30 +00:00
parent fb2355571e
commit d623624ce2
2 changed files with 10 additions and 6 deletions

View file

@ -24,6 +24,7 @@
#import "BlocklistScheduler.h"
#import "BlocklistDownloader.h"
#import "NSApplicationAdditions.h"
//one minute delay before running after option is changed
#define SMALL_DELAY 60
@ -69,9 +70,11 @@ BlocklistScheduler * fScheduler = nil;
fTimer = [[NSTimer alloc] initWithFireDate: useDate interval: 0 target: self selector: @selector(runUpdater)
userInfo: nil repeats: NO];
[[NSRunLoop mainRunLoop] addTimer: fTimer forMode: NSDefaultRunLoopMode];
[[NSRunLoop mainRunLoop] addTimer: fTimer forMode: NSModalPanelRunLoopMode];
[[NSRunLoop mainRunLoop] addTimer: fTimer forMode: NSEventTrackingRunLoopMode];
//current run loop usually means a second update won't work
NSRunLoop * loop = [NSApp isOnLeopardOrBetter] ? [NSRunLoop mainRunLoop] : [NSRunLoop currentRunLoop];
[loop addTimer: fTimer forMode: NSDefaultRunLoopMode];
[loop addTimer: fTimer forMode: NSModalPanelRunLoopMode];
[loop addTimer: fTimer forMode: NSEventTrackingRunLoopMode];
}
- (void) cancelSchedule

View file

@ -2435,9 +2435,10 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
fSpeedLimitTimer = [[NSTimer alloc] initWithFireDate: dateToUse interval: 0 target: self selector: @selector(autoSpeedLimit:)
userInfo: [NSNumber numberWithBool: nextIsLimit] repeats: NO];
[[NSRunLoop mainRunLoop] addTimer: fSpeedLimitTimer forMode: NSDefaultRunLoopMode];
[[NSRunLoop mainRunLoop] addTimer: fSpeedLimitTimer forMode: NSModalPanelRunLoopMode];
[[NSRunLoop mainRunLoop] addTimer: fSpeedLimitTimer forMode: NSEventTrackingRunLoopMode];
NSRunLoop * loop = [NSApp isOnLeopardOrBetter] ? [NSRunLoop mainRunLoop] : [NSRunLoop currentRunLoop];
[loop addTimer: fSpeedLimitTimer forMode: NSDefaultRunLoopMode];
[loop addTimer: fSpeedLimitTimer forMode: NSModalPanelRunLoopMode];
[loop addTimer: fSpeedLimitTimer forMode: NSEventTrackingRunLoopMode];
[fSpeedLimitTimer release];
}