Changeset 11688


Ignore:
Timestamp:
Jan 15, 2011, 6:44:39 PM (11 years ago)
Author:
livings124
Message:

#3686 "add rpc command to cleanly shutdown daemon" - added for Mac client

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.h

    r11684 r11688  
    104104    id                              fPreviewPanel;
    105105    BOOL                            fQuitting;
    106    
    107     BOOL                            fUpdateInProgress;
     106    BOOL                            fQuitRequested;
    108107    BOOL                            fPauseOnLaunch;
    109108   
  • trunk/macosx/Controller.m

    r11684 r11688  
    391391       
    392392        [[SUUpdater sharedUpdater] setDelegate: self];
    393         fUpdateInProgress = NO;
     393        fQuitRequested = NO;
    394394       
    395395        fPauseOnLaunch = (GetCurrentKeyModifiers() & (optionKey | rightOptionKey)) != 0;
     
    678678- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication *) sender
    679679{
    680     if (!fUpdateInProgress && [fDefaults boolForKey: @"CheckQuit"])
     680    if (!fQuitRequested && [fDefaults boolForKey: @"CheckQuit"])
    681681    {
    682682        NSInteger active = 0, downloading = 0;
     
    43594359- (void) updaterWillRelaunchApplication: (SUUpdater *) updater
    43604360{
    4361     fUpdateInProgress = YES;
     4361    fQuitRequested = YES;
    43624362}
    43634363
     
    44414441            break;
    44424442       
     4443        case TR_RPC_SESSION_CLOSE:
     4444            fQuitRequested = YES;
     4445            [NSApp performSelectorOnMainThread: @selector(terminate:) withObject: self waitUntilDone: NO];
     4446            break;
     4447       
    44434448        default:
    44444449            NSAssert1(NO, @"Unknown RPC command received: %d", type);
Note: See TracChangeset for help on using the changeset viewer.