diff --git a/macosx/PrefsController.h b/macosx/PrefsController.h index b3ae5aa37..03ce62eb9 100644 --- a/macosx/PrefsController.h +++ b/macosx/PrefsController.h @@ -59,7 +59,6 @@ IBOutlet NSTextField * fProxyAddressField, * fProxyPasswordField; IBOutlet NSPopUpButton * fProxyTypePopUp; - BOOL fProxyPasswordSet; IBOutlet NSTextField * fRPCPortField; IBOutlet NSTableView * fRPCAccessTable; diff --git a/macosx/PrefsController.m b/macosx/PrefsController.m index 8f4fc3b99..9f9be34f8 100644 --- a/macosx/PrefsController.m +++ b/macosx/PrefsController.m @@ -109,9 +109,7 @@ //set proxy type [self updateProxyType]; - fProxyPasswordSet = NO; - if ([fDefaults boolForKey: @"Proxy"] && [fDefaults boolForKey: @"ProxyAuthorize"]) - [self updateProxyPassword]; + [self updateProxyPassword]; //update rpc access list fRPCAccessArray = [[fDefaults arrayForKey: @"RPCAccessList"] mutableCopy]; @@ -677,10 +675,6 @@ { BOOL enable = [fDefaults boolForKey: @"Proxy"]; tr_sessionSetProxyEnabled(fHandle, [fDefaults boolForKey: @"Proxy"]); - - //if proxy password hasn't be retrieved, get it now - if (!fProxyPasswordSet && enable && [fDefaults boolForKey: @"ProxyAuthorize"]) - [self updateProxyPassword]; } - (void) setProxyAddress: (id) sender @@ -749,10 +743,6 @@ { BOOL enable = [fDefaults boolForKey: @"ProxyAuthorize"]; tr_sessionSetProxyAuthEnabled(fHandle, enable); - - //if proxy password hasn't be retrieved, get it now - if (!fProxyPasswordSet && enable) - [self updateProxyPassword]; } - (void) setProxyUsername: (id) sender @@ -775,10 +765,9 @@ tr_sessionSetProxyPassword(fHandle, [password UTF8String]); } +//user will only be prompted if Keychain is locked and Transmission has changed since last launched - (void) updateProxyPassword { - fProxyPasswordSet = YES; - NSString * password; EMGenericKeychainItem * keychainItem = [[EMKeychainProxy sharedProxy] genericKeychainItemForService: @"Transmission:Proxy" withUsername: @"Proxy"];