Changeset 6669


Ignore:
Timestamp:
Aug 31, 2008, 8:26:41 PM (13 years ago)
Author:
livings124
Message:

cancel blocklist download when quitting; cleanup

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/BlocklistDownloader.h

    r6667 r6669  
    4141}
    4242
    43 + (BlocklistDownloader *) downloader: (tr_handle *) handle;
     43+ (BlocklistDownloader *) downloader: (tr_handle *) handle; //starts download if not already occuring
     44+ (BOOL) isRunning;
     45
    4446- (void) setViewController: (BlocklistDownloaderViewController *) viewController;
    4547
  • trunk/macosx/BlocklistDownloader.m

    r6668 r6669  
    5050   
    5151    return fDownloader;
     52}
     53
     54+ (BOOL) isRunning
     55{
     56    return fDownloader != nil;
    5257}
    5358
  • trunk/macosx/Controller.m

    r6667 r6669  
    3939#import "GroupToolbarItem.h"
    4040#import "ToolbarSegmentedCell.h"
     41#import "BlocklistDownloader.h"
    4142#import "NSApplicationAdditions.h"
    4243#import "NSStringAdditions.h"
     
    560561- (void) applicationWillTerminate: (NSNotification *) notification
    561562{
    562     #warning stop blocklist download
     563    //stop blocklist download
     564    if ([BlocklistDownloader isRunning])
     565        [[BlocklistDownloader downloader: fLib] cancelDownload];
    563566   
    564567    //stop timers and notification checking
Note: See TracChangeset for help on using the changeset viewer.