aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionControllerInitializer.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPConnectionControllerInitializer.m')
-rw-r--r--Source/SPConnectionControllerInitializer.m16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/SPConnectionControllerInitializer.m b/Source/SPConnectionControllerInitializer.m
index 7ea615e5..b46e9986 100644
--- a/Source/SPConnectionControllerInitializer.m
+++ b/Source/SPConnectionControllerInitializer.m
@@ -39,6 +39,8 @@
#import "SPGroupNode.h"
#import "SPDatabaseViewController.h"
#import "SPSplitView.h"
+#import "SPFavoriteColorSupport.h"
+#import "SPColorSelectorView.h"
#ifndef SP_CODA
static NSString *SPConnectionViewNibName = @"ConnectionView";
@@ -99,6 +101,15 @@ static NSString *SPConnectionViewNibName = @"ConnectionView";
favoriteNameFieldWasAutogenerated = NO;
[self loadNib];
+
+ NSArray *colorList = [[SPFavoriteColorSupport sharedInstance] userColorList];
+ [sshColorField setColorList:colorList];
+ [sshColorField bind:@"selectedTag" toObject:self withKeyPath:@"colorIndex" options:nil];
+ [standardColorField setColorList:colorList];
+ [standardColorField bind:@"selectedTag" toObject:self withKeyPath:@"colorIndex" options:nil];
+ [socketColorField setColorList:colorList];
+ [socketColorField bind:@"selectedTag" toObject:self withKeyPath:@"colorIndex" options:nil];
+
[self registerForNotifications];
#ifndef SP_CODA
@@ -219,6 +230,11 @@ static NSString *SPConnectionViewNibName = @"ConnectionView";
options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
context:NULL];
+ [self addObserver:self
+ forKeyPath:SPFavoriteColorIndexKey
+ options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)
+ context:NULL];
+
[self addObserver:self
forKeyPath:SPFavoriteDatabaseKey
options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew)