mirror of
https://github.com/transmission/transmission
synced 2024-12-23 08:13:27 +00:00
runs on Tiger again, although blocklist auto-update won't be reliable on Tiger
This commit is contained in:
parent
fb2355571e
commit
d623624ce2
2 changed files with 10 additions and 6 deletions
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#import "BlocklistScheduler.h"
|
#import "BlocklistScheduler.h"
|
||||||
#import "BlocklistDownloader.h"
|
#import "BlocklistDownloader.h"
|
||||||
|
#import "NSApplicationAdditions.h"
|
||||||
|
|
||||||
//one minute delay before running after option is changed
|
//one minute delay before running after option is changed
|
||||||
#define SMALL_DELAY 60
|
#define SMALL_DELAY 60
|
||||||
|
@ -69,9 +70,11 @@ BlocklistScheduler * fScheduler = nil;
|
||||||
fTimer = [[NSTimer alloc] initWithFireDate: useDate interval: 0 target: self selector: @selector(runUpdater)
|
fTimer = [[NSTimer alloc] initWithFireDate: useDate interval: 0 target: self selector: @selector(runUpdater)
|
||||||
userInfo: nil repeats: NO];
|
userInfo: nil repeats: NO];
|
||||||
|
|
||||||
[[NSRunLoop mainRunLoop] addTimer: fTimer forMode: NSDefaultRunLoopMode];
|
//current run loop usually means a second update won't work
|
||||||
[[NSRunLoop mainRunLoop] addTimer: fTimer forMode: NSModalPanelRunLoopMode];
|
NSRunLoop * loop = [NSApp isOnLeopardOrBetter] ? [NSRunLoop mainRunLoop] : [NSRunLoop currentRunLoop];
|
||||||
[[NSRunLoop mainRunLoop] addTimer: fTimer forMode: NSEventTrackingRunLoopMode];
|
[loop addTimer: fTimer forMode: NSDefaultRunLoopMode];
|
||||||
|
[loop addTimer: fTimer forMode: NSModalPanelRunLoopMode];
|
||||||
|
[loop addTimer: fTimer forMode: NSEventTrackingRunLoopMode];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) cancelSchedule
|
- (void) cancelSchedule
|
||||||
|
|
|
@ -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:)
|
fSpeedLimitTimer = [[NSTimer alloc] initWithFireDate: dateToUse interval: 0 target: self selector: @selector(autoSpeedLimit:)
|
||||||
userInfo: [NSNumber numberWithBool: nextIsLimit] repeats: NO];
|
userInfo: [NSNumber numberWithBool: nextIsLimit] repeats: NO];
|
||||||
|
|
||||||
[[NSRunLoop mainRunLoop] addTimer: fSpeedLimitTimer forMode: NSDefaultRunLoopMode];
|
NSRunLoop * loop = [NSApp isOnLeopardOrBetter] ? [NSRunLoop mainRunLoop] : [NSRunLoop currentRunLoop];
|
||||||
[[NSRunLoop mainRunLoop] addTimer: fSpeedLimitTimer forMode: NSModalPanelRunLoopMode];
|
[loop addTimer: fSpeedLimitTimer forMode: NSDefaultRunLoopMode];
|
||||||
[[NSRunLoop mainRunLoop] addTimer: fSpeedLimitTimer forMode: NSEventTrackingRunLoopMode];
|
[loop addTimer: fSpeedLimitTimer forMode: NSModalPanelRunLoopMode];
|
||||||
|
[loop addTimer: fSpeedLimitTimer forMode: NSEventTrackingRunLoopMode];
|
||||||
[fSpeedLimitTimer release];
|
[fSpeedLimitTimer release];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue