aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionController.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-12-19 22:58:58 +0000
committerrowanbeentje <rowan@beent.je>2010-12-19 22:58:58 +0000
commit2a6c654d165c207281d10295ebcc40b3cae864ea (patch)
tree607d987c1970b8afc5ee02e1ca061e5c2dd04e26 /Source/SPConnectionController.m
parentea006519632c5c78bc9af5e87d7f5c60edd17081 (diff)
downloadsequelpro-2a6c654d165c207281d10295ebcc40b3cae864ea.tar.gz
sequelpro-2a6c654d165c207281d10295ebcc40b3cae864ea.tar.bz2
sequelpro-2a6c654d165c207281d10295ebcc40b3cae864ea.zip
- Fix duplicate/parallel connection attempts when double-clicking on the selected favourite in the connection outline view; this addresses Issue #924.
- Correctly restore the interface after an SSH connection attempt fails - Prevent SSH connections from being started twice, eg via return key followed by a double click
Diffstat (limited to 'Source/SPConnectionController.m')
-rw-r--r--Source/SPConnectionController.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index aaff9687..4e8338aa 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -248,6 +248,9 @@
isConnecting = YES;
cancellingConnection = NO;
+ // Disable the favorites outline view to prevent further connections attempts
+ [favoritesTable setEnabled:NO];
+
[addToFavoritesButton setHidden:YES];
[addToFavoritesButton display];
[helpButton setHidden:YES];
@@ -387,6 +390,7 @@
if (newState == PROXY_STATE_IDLE) {
[tableDocument setTitlebarStatus:NSLocalizedString(@"SSH Disconnected", @"SSH disconnected titlebar marker")];
[self failConnectionWithTitle:NSLocalizedString(@"SSH connection failed!", @"SSH connection failed title") errorMessage:[theTunnel lastError] detail:[sshTunnel debugMessages]];
+ [self _restoreConnectionInterface];
} else if (newState == PROXY_STATE_CONNECTED) {
[tableDocument setTitlebarStatus:NSLocalizedString(@"SSH Connected", @"SSH connected titlebar marker")];
[self initiateMySQLConnection];
@@ -400,9 +404,6 @@
*/
- (void)initiateMySQLConnection
{
- // Disable the favorites table view to prevent further connections attempts
- [favoritesTable setEnabled:NO];
-
if (sshTunnel)
[progressIndicatorText setStringValue:NSLocalizedString(@"MySQL connecting...", @"MySQL connecting very short status message")];
else