aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionControllerDelegate.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-12-06 21:30:46 +0000
committerstuconnolly <stuart02@gmail.com>2010-12-06 21:30:46 +0000
commitfa8ef20485323e394af10cd3a9937b634d47b436 (patch)
treefb4250854eaec0d1dd6e5712cb5110f3c71d0c75 /Source/SPConnectionControllerDelegate.m
parent7597f69134b039851d5db659ca51ebc734eb5877 (diff)
downloadsequelpro-fa8ef20485323e394af10cd3a9937b634d47b436.tar.gz
sequelpro-fa8ef20485323e394af10cd3a9937b634d47b436.tar.bz2
sequelpro-fa8ef20485323e394af10cd3a9937b634d47b436.zip
When either more than one favorite or a favorite group is selected in the connection view, hide the connection details form.
Diffstat (limited to 'Source/SPConnectionControllerDelegate.m')
-rw-r--r--Source/SPConnectionControllerDelegate.m16
1 files changed, 12 insertions, 4 deletions
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m
index 9094c6cc..65804eff 100644
--- a/Source/SPConnectionControllerDelegate.m
+++ b/Source/SPConnectionControllerDelegate.m
@@ -127,9 +127,9 @@
}
- (void)outlineViewSelectionDidChange:(NSNotification *)notification
-{
+{
if ([favoritesOutlineView numberOfSelectedRows] == 1) {
-
+
SPTreeNode *node = [self selectedFavoriteNode];
if (![node isGroup]) {
@@ -138,10 +138,18 @@
[addToFavoritesButton setEnabled:NO];
favoriteNameFieldWasTouched = YES;
+
+ [connectionResizeContainer setHidden:NO];
+ [connectionInstructionsTextField setStringValue:NSLocalizedString(@"Enter connection details below, or choose a favorite", @"enter connection details label")];
}
- }
+ else {
+ [connectionResizeContainer setHidden:YES];
+ [connectionInstructionsTextField setStringValue:NSLocalizedString(@"Please choose a favorite", @"please choose a favorite connection view label")];
+ }
+ }
else {
- [addToFavoritesButton setEnabled:YES];
+ [connectionResizeContainer setHidden:YES];
+ [connectionInstructionsTextField setStringValue:NSLocalizedString(@"Please choose a favorite", @"please choose a favorite connection view label")];
}
}