Changeset 6169


Ignore:
Timestamp:
Jun 13, 2008, 4:22:07 AM (13 years ago)
Author:
livings124
Message:

since keychain is smart enough to not ask to unlock a keychain if the desired key doesn't exist anyway, it's probably fair to always try to get the proxy password from the keychain at launch

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/PrefsController.h

    r6168 r6169  
    6060    IBOutlet NSTextField * fProxyAddressField, * fProxyPasswordField;
    6161    IBOutlet NSPopUpButton * fProxyTypePopUp;
    62     BOOL fProxyPasswordSet;
    6362   
    6463    IBOutlet NSTextField * fRPCPortField;
  • trunk/macosx/PrefsController.m

    r6168 r6169  
    110110        [self updateProxyType];
    111111       
    112         fProxyPasswordSet = NO;
    113         if ([fDefaults boolForKey: @"Proxy"] && [fDefaults boolForKey: @"ProxyAuthorize"])
    114             [self updateProxyPassword];
     112        [self updateProxyPassword];
    115113       
    116114        //update rpc access list
     
    678676    BOOL enable = [fDefaults boolForKey: @"Proxy"];
    679677    tr_sessionSetProxyEnabled(fHandle, [fDefaults boolForKey: @"Proxy"]);
    680    
    681     //if proxy password hasn't be retrieved, get it now
    682     if (!fProxyPasswordSet && enable && [fDefaults boolForKey: @"ProxyAuthorize"])
    683         [self updateProxyPassword];
    684678}
    685679
     
    750744    BOOL enable = [fDefaults boolForKey: @"ProxyAuthorize"];
    751745    tr_sessionSetProxyAuthEnabled(fHandle, enable);
    752    
    753     //if proxy password hasn't be retrieved, get it now
    754     if (!fProxyPasswordSet && enable)
    755         [self updateProxyPassword];
    756746}
    757747
     
    776766}
    777767
     768//user will only be prompted if Keychain is locked and Transmission has changed since last launched
    778769- (void) updateProxyPassword
    779770{
    780     fProxyPasswordSet = YES;
    781    
    782771    NSString * password;
    783772    EMGenericKeychainItem * keychainItem = [[EMKeychainProxy sharedProxy] genericKeychainItemForService: @"Transmission:Proxy"
Note: See TracChangeset for help on using the changeset viewer.