aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-09-23 15:23:01 +0000
committerBibiko <bibiko@eva.mpg.de>2009-09-23 15:23:01 +0000
commitda0dba0eae177dcb27993a64ef2fb0e4cd0b018b (patch)
tree49a61f88b578833d49a79cb1b8643b515977361b
parent1d0c281511ce7b35c7e06475d7e147db5a656575 (diff)
downloadsequelpro-da0dba0eae177dcb27993a64ef2fb0e4cd0b018b.tar.gz
sequelpro-da0dba0eae177dcb27993a64ef2fb0e4cd0b018b.tar.bz2
sequelpro-da0dba0eae177dcb27993a64ef2fb0e4cd0b018b.zip
• while a connection will be initialized via a SPF file disable the possibility to choose an other connection from the favorites' list; otherwise the SPF file could run out of sync
-rw-r--r--Source/SPConnectionController.m4
-rw-r--r--Source/TableDocument.m5
2 files changed, 9 insertions, 0 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index 7e0ac050..d4c9d665 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -843,6 +843,10 @@
} else {
[(ImageAndTextCell *)aCell setIndentationLevel:1];
}
+ if([favoritesTable isEnabled])
+ [(ImageAndTextCell *)aCell setTextColor:[NSColor blackColor]];
+ else
+ [(ImageAndTextCell *)aCell setTextColor:[NSColor grayColor]];
}
#pragma mark -
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 01d73820..6c1bd042 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -214,6 +214,11 @@
// Deselect all favorites
[[connectionController valueForKeyPath:@"favoritesTable"] deselectAll:connectionController];
+ // Suppress the possibility to choose an other connection from the favorites
+ // if a connection should initialized by SPF file. Otherwise it could happen
+ // that the SPF file runs out of sync.
+ [[connectionController valueForKeyPath:@"favoritesTable"] setEnabled:NO];
+
NSData *pData = [NSData dataWithContentsOfFile:path options:NSUncachedRead error:&readError];