diff options
author | avenjamin <avenjamin@gmail.com> | 2009-06-24 13:18:30 +0000 |
---|---|---|
committer | avenjamin <avenjamin@gmail.com> | 2009-06-24 13:18:30 +0000 |
commit | 99ec873ef3e78512b70285f4b83334df9463c0a1 (patch) | |
tree | 4eda6b40c5c427c71e15b9188be76f1fa68cffca /Source/TableDocument.m | |
parent | f22d7f580430553e2b8b5e5c2aebccc1384994c5 (diff) | |
download | sequelpro-99ec873ef3e78512b70285f4b83334df9463c0a1.tar.gz sequelpro-99ec873ef3e78512b70285f4b83334df9463c0a1.tar.bz2 sequelpro-99ec873ef3e78512b70285f4b83334df9463c0a1.zip |
- Modified titlebar display of SSH status
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r-- | Source/TableDocument.m | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 93b22cae..3cc11425 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -120,7 +120,7 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum NSView *windowFrame = [[tableWindow contentView] superview]; NSRect av = [titleAccessoryView frame]; NSRect initialAccessoryViewFrame = NSMakeRect( - [windowFrame frame].size.width - av.size.width - 20, + [windowFrame frame].size.width - av.size.width - 30, [windowFrame frame].size.height - av.size.height, av.size.width, av.size.height); @@ -397,13 +397,16 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum int newState = [theTunnel state]; if (newState == SPSSH_STATE_IDLE) { - [self setStatusIconToImageWithName:@"ssh-disconnected"]; + [self setTitlebarStatus:@"SSH Disconnected"]; + //[self setStatusIconToImageWithName:@"ssh-disconnected"]; [self failConnectionWithErrorMessage:[theTunnel lastError] withDetail:[sshTunnel debugMessages]]; } else if (newState == SPSSH_STATE_CONNECTED) { - [self setStatusIconToImageWithName:@"ssh-connected"]; + [self setTitlebarStatus:@"SSH Connected"]; + //[self setStatusIconToImageWithName:@"ssh-connected"]; [self initiateMySQLConnection]; } else { - [self setStatusIconToImageWithName:@"ssh-connecting"]; + [self setTitlebarStatus:@"SSH Connecting…"]; + //[self setStatusIconToImageWithName:@"ssh-connecting"]; } } @@ -2081,6 +2084,12 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum [titleImageView setImage:image]; } +- (void)setTitlebarStatus:(NSString *)status +{ + [self clearStatusIcon]; + [titleStringView setStringValue:status]; +} + /** * Clear the connection status icon in the titlebar */ @@ -2089,6 +2098,10 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum [titleImageView setImage:nil]; } + + + + #pragma mark - #pragma mark Toolbar Methods |