aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMMCPConnection.m
diff options
context:
space:
mode:
authoravenjamin <avenjamin@gmail.com>2009-06-24 13:18:30 +0000
committeravenjamin <avenjamin@gmail.com>2009-06-24 13:18:30 +0000
commit99ec873ef3e78512b70285f4b83334df9463c0a1 (patch)
tree4eda6b40c5c427c71e15b9188be76f1fa68cffca /Source/CMMCPConnection.m
parentf22d7f580430553e2b8b5e5c2aebccc1384994c5 (diff)
downloadsequelpro-99ec873ef3e78512b70285f4b83334df9463c0a1.tar.gz
sequelpro-99ec873ef3e78512b70285f4b83334df9463c0a1.tar.bz2
sequelpro-99ec873ef3e78512b70285f4b83334df9463c0a1.zip
- Modified titlebar display of SSH status
Diffstat (limited to 'Source/CMMCPConnection.m')
-rw-r--r--Source/CMMCPConnection.m28
1 files changed, 20 insertions, 8 deletions
diff --git a/Source/CMMCPConnection.m b/Source/CMMCPConnection.m
index e31b9765..90b915fe 100644
--- a/Source/CMMCPConnection.m
+++ b/Source/CMMCPConnection.m
@@ -306,7 +306,8 @@ static void forcePingTimeout(int signalNumber);
if (connectionTunnel) {
[connectionTunnel disconnect];
- [delegate setStatusIconToImageWithName:@"ssh-disconnected"];
+ [delegate setTitlebarStatus:@"SSH Disconnected"];
+ //[delegate setStatusIconToImageWithName:@"ssh-disconnected"];
}
if( serverVersionString != nil ) {
@@ -405,19 +406,24 @@ static void forcePingTimeout(int signalNumber);
[connectionTunnel setConnectionStateChangeSelector:nil delegate:nil];
if ([connectionTunnel state] != SPSSH_STATE_IDLE) [connectionTunnel disconnect];
[connectionTunnel connect];
- [delegate setStatusIconToImageWithName:@"ssh-connecting"];
+
+ [delegate setTitlebarStatus:@"SSH Connecting…"];
+ //[delegate setStatusIconToImageWithName:@"ssh-connecting"];
+
NSDate *tunnelStartDate = [NSDate date], *interfaceInteractionTimer;
// Allow the tunnel to attempt to connect in a loop
while (1) {
if ([connectionTunnel state] == SPSSH_STATE_CONNECTED) {
- [delegate setStatusIconToImageWithName:@"ssh-connected"];
+ [delegate setTitlebarStatus:@"SSH Connected"];
+ //[delegate setStatusIconToImageWithName:@"ssh-connected"];
connectionPort = [connectionTunnel localPort];
break;
}
if ([[NSDate date] timeIntervalSinceDate:tunnelStartDate] > (connectionTimeout + 1)) {
[connectionTunnel disconnect];
- [delegate setStatusIconToImageWithName:@"ssh-disconnected"];
+ [delegate setTitlebarStatus:@"SSH Disconnected"];
+ //[delegate setStatusIconToImageWithName:@"ssh-disconnected"];
break;
}
@@ -501,9 +507,14 @@ static void forcePingTimeout(int signalNumber);
int newState = [theTunnel state];
if (delegate && [delegate respondsToSelector:@selector(setStatusIconToImageWithName:)]) {
- if (newState == SPSSH_STATE_IDLE) [delegate setStatusIconToImageWithName:@"ssh-disconnected"];
- else if (newState == SPSSH_STATE_CONNECTED) [delegate setStatusIconToImageWithName:@"ssh-connected"];
- else [delegate setStatusIconToImageWithName:@"ssh-connecting"];
+ if (newState == SPSSH_STATE_IDLE) [delegate setTitlebarStatus:@"SSH Disconnected"];
+ else if (newState == SPSSH_STATE_CONNECTED) [delegate setTitlebarStatus:@"SSH Connected"];
+ else [delegate setTitlebarStatus:@"SSH Connecting…"];
+
+
+// if (newState == SPSSH_STATE_IDLE) [delegate setStatusIconToImageWithName:@"ssh-disconnected"];
+// else if (newState == SPSSH_STATE_CONNECTED) [delegate setStatusIconToImageWithName:@"ssh-connected"];
+// else [delegate setStatusIconToImageWithName:@"ssh-connecting"];
}
// Restart the tunnel if it dies
@@ -674,7 +685,8 @@ static void forcePingTimeout(int signalNumber);
[self setLastErrorMessage:nil];
if (connectionTunnel) {
[connectionTunnel disconnect];
- [delegate setStatusIconToImageWithName:@"ssh-disconnected"];
+ [delegate setTitlebarStatus:@"SSH Disconnected"];
+ //[delegate setStatusIconToImageWithName:@"ssh-disconnected"];
}
return NO;
}