aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-06-05 13:30:15 +0000
committerrowanbeentje <rowan@beent.je>2012-06-05 13:30:15 +0000
commit88660884d44b9bbb743cc911a7fc1dc9c124e632 (patch)
treeb8af9f28f4288585ac47ab39b5f1313abe8d66c6 /Source
parentf4333250c7b96df042d49db86d9e56cff42f0969 (diff)
downloadsequelpro-88660884d44b9bbb743cc911a7fc1dc9c124e632.tar.gz
sequelpro-88660884d44b9bbb743cc911a7fc1dc9c124e632.tar.bz2
sequelpro-88660884d44b9bbb743cc911a7fc1dc9c124e632.zip
- Fix loss of connection name/password for SSH connections whn switching from an empty selection
- Fix a build warning
Diffstat (limited to 'Source')
-rw-r--r--Source/SPConnectionController.m8
-rw-r--r--Source/SPConnectionHandler.m2
2 files changed, 8 insertions, 2 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index 2c622cee..f1b80684 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -486,9 +486,13 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
currentFavorite = [fav copy];
[connectionResizeContainer setHidden:NO];
-
+
+ // Set up the type, also storing it in the previous type store to prevent type "changes" triggering actions
+ NSUInteger connectionType = ([fav objectForKey:SPFavoriteTypeKey] ? [[fav objectForKey:SPFavoriteTypeKey] integerValue] : SPTCPIPConnection);
+ previousType = connectionType;
+ [self setType:connectionType];
+
// Standard details
- [self setType:([fav objectForKey:SPFavoriteTypeKey] ? [[fav objectForKey:SPFavoriteTypeKey] integerValue] : SPTCPIPConnection)];
[self setName:([fav objectForKey:SPFavoriteNameKey] ? [fav objectForKey:SPFavoriteNameKey] : @"")];
[self setHost:([fav objectForKey:SPFavoriteHostKey] ? [fav objectForKey:SPFavoriteHostKey] : @"")];
[self setSocket:([fav objectForKey:SPFavoriteSocketKey] ? [fav objectForKey:SPFavoriteSocketKey] : @"")];
diff --git a/Source/SPConnectionHandler.m b/Source/SPConnectionHandler.m
index ca488872..fdc3d35e 100644
--- a/Source/SPConnectionHandler.m
+++ b/Source/SPConnectionHandler.m
@@ -39,6 +39,8 @@ static NSString *SPLocalhostAddress = @"127.0.0.1";
- (void)_restoreConnectionInterface;
+- (void)_updateFavoritePasswordsFromField:(NSControl *)control;
+
@end
@implementation SPConnectionController (SPConnectionHandler)