diff options
author | rowanbeentje <rowan@beent.je> | 2012-11-20 01:15:21 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-11-20 01:15:21 +0000 |
commit | 493e8a2543e0d62d9105e3edb257983f1831e6d4 (patch) | |
tree | 00c8a3df1ae5ba5744353882e7eaeac4815fbac9 | |
parent | d153e73f8c1ebe5fc472966a51307ae41b9ca750 (diff) | |
download | sequelpro-493e8a2543e0d62d9105e3edb257983f1831e6d4.tar.gz sequelpro-493e8a2543e0d62d9105e3edb257983f1831e6d4.tar.bz2 sequelpro-493e8a2543e0d62d9105e3edb257983f1831e6d4.zip |
- When the connection interface is restored as a result of a connection attempt cancellation or failure, restore the passwords from their bulleted-out state. This addresses Issue #1497.
-rw-r--r-- | Source/SPConnectionController.m | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index a8c9da8d..8cb08556 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -1575,7 +1575,15 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, [progressIndicator display]; [progressIndicatorText setHidden:YES]; [progressIndicatorText display]; - + + // Update the password fields, restoring passwords that may have been bulletted out during connection + if (connectionKeychainItemName) { + [self setPassword:[keychain getPasswordForName:connectionKeychainItemName account:connectionKeychainItemAccount]]; + } + if (connectionSSHKeychainItemName) { + [self setSshPassword:[keychain getPasswordForName:connectionSSHKeychainItemName account:connectionSSHKeychainItemAccount]]; + } + // Re-enable favorites table view [favoritesOutlineView setEnabled:YES]; [(NSView *)favoritesOutlineView display]; |