diff options
author | stuconnolly <stuart02@gmail.com> | 2010-12-13 22:02:17 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-12-13 22:02:17 +0000 |
commit | 9859a8f8b20ebf038967a09b40bba9b4eb2f223b (patch) | |
tree | 3a889fb8e2600968784c74f925f5ffdacdb05440 /Source/SPConnectionController.m | |
parent | bb7fbb3c5ba1ccbf879ac7a54d30b6b7d2082c9a (diff) | |
download | sequelpro-9859a8f8b20ebf038967a09b40bba9b4eb2f223b.tar.gz sequelpro-9859a8f8b20ebf038967a09b40bba9b4eb2f223b.tar.bz2 sequelpro-9859a8f8b20ebf038967a09b40bba9b4eb2f223b.zip |
Use connection favorite constants.
Diffstat (limited to 'Source/SPConnectionController.m')
-rw-r--r-- | Source/SPConnectionController.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index adc7a893..4bafafbf 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -585,8 +585,8 @@ static const NSString *SPExportFavoritesFilename = @"SequelProFavorites.plist"; // Check whether the password exists in the keychain, and if so add it; also record the // keychain details so we can pass around only those details if the password doesn't change - connectionKeychainItemName = [[keychain nameForFavoriteName:[self valueForKeyPath:@"selectedFavorite.name"] id:[self valueForKeyPath:@"selectedFavorite.id"]] retain]; - connectionKeychainItemAccount = [[keychain accountForUser:[self valueForKeyPath:@"selectedFavorite.user"] host:(([self type] == SPSocketConnection)?@"localhost":[self valueForKeyPath:@"selectedFavorite.host"]) database:[self valueForKeyPath:@"selectedFavorite.database"]] retain]; + connectionKeychainItemName = [[keychain nameForFavoriteName:[fav objectForKey:SPFavoriteNameKey] id:[fav objectForKey:SPFavoriteIDKey]] retain]; + connectionKeychainItemAccount = [[keychain accountForUser:[fav objectForKey:SPFavoriteUserKey] host:(([self type] == SPSocketConnection) ? @"localhost" : [fav objectForKey:SPFavoriteHostKey]) database:[fav objectForKey:SPFavoriteDatabaseKey]] retain]; [self setPassword:[keychain getPasswordForName:connectionKeychainItemName account:connectionKeychainItemAccount]]; @@ -597,8 +597,8 @@ static const NSString *SPExportFavoritesFilename = @"SequelProFavorites.plist"; } // And the same for the SSH password - connectionSSHKeychainItemName = [[keychain nameForSSHForFavoriteName:[self valueForKeyPath:@"selectedFavorite.name"] id:[self valueForKeyPath:@"selectedFavorite.id"]] retain]; - connectionSSHKeychainItemAccount = [[keychain accountForSSHUser:[self valueForKeyPath:@"selectedFavorite.sshUser"] sshHost:[self valueForKeyPath:@"selectedFavorite.sshHost"]] retain]; + connectionSSHKeychainItemName = [[keychain nameForSSHForFavoriteName:[fav objectForKey:SPFavoriteNameKey] id:[fav objectForKey:SPFavoriteIDKey]] retain]; + connectionSSHKeychainItemAccount = [[keychain accountForSSHUser:[fav objectForKey:SPFavoriteSSHUserKey] sshHost:[fav objectForKey:SPFavoriteSSHHostKey]] retain]; [self setSshPassword:[keychain getPasswordForName:connectionSSHKeychainItemName account:connectionSSHKeychainItemAccount]]; |