Changeset 6684


Ignore:
Timestamp:
Sep 1, 2008, 11:17:30 PM (13 years ago)
Author:
livings124
Message:

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

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/BlocklistScheduler.m

    r6683 r6684  
    2525#import "BlocklistScheduler.h"
    2626#import "BlocklistDownloader.h"
     27#import "NSApplicationAdditions.h"
    2728
    2829//one minute delay before running after option is changed
     
    7071                userInfo: nil repeats: NO];
    7172   
    72     [[NSRunLoop mainRunLoop] addTimer: fTimer forMode: NSDefaultRunLoopMode];
    73     [[NSRunLoop mainRunLoop] addTimer: fTimer forMode: NSModalPanelRunLoopMode];
    74     [[NSRunLoop mainRunLoop] addTimer: fTimer forMode: NSEventTrackingRunLoopMode];
     73    //current run loop usually means a second update won't work
     74    NSRunLoop * loop = [NSApp isOnLeopardOrBetter] ? [NSRunLoop mainRunLoop] : [NSRunLoop currentRunLoop];
     75    [loop addTimer: fTimer forMode: NSDefaultRunLoopMode];
     76    [loop addTimer: fTimer forMode: NSModalPanelRunLoopMode];
     77    [loop addTimer: fTimer forMode: NSEventTrackingRunLoopMode];
    7578}
    7679
  • trunk/macosx/Controller.m

    r6682 r6684  
    24362436                        userInfo: [NSNumber numberWithBool: nextIsLimit] repeats: NO];
    24372437   
    2438     [[NSRunLoop mainRunLoop] addTimer: fSpeedLimitTimer forMode: NSDefaultRunLoopMode];
    2439     [[NSRunLoop mainRunLoop] addTimer: fSpeedLimitTimer forMode: NSModalPanelRunLoopMode];
    2440     [[NSRunLoop mainRunLoop] addTimer: fSpeedLimitTimer forMode: NSEventTrackingRunLoopMode];
     2438    NSRunLoop * loop = [NSApp isOnLeopardOrBetter] ? [NSRunLoop mainRunLoop] : [NSRunLoop currentRunLoop];
     2439    [loop addTimer: fSpeedLimitTimer forMode: NSDefaultRunLoopMode];
     2440    [loop addTimer: fSpeedLimitTimer forMode: NSModalPanelRunLoopMode];
     2441    [loop addTimer: fSpeedLimitTimer forMode: NSEventTrackingRunLoopMode];
    24412442    [fSpeedLimitTimer release];
    24422443}
Note: See TracChangeset for help on using the changeset viewer.