aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionControllerDelegate.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-02-15 02:59:14 +0100
committerMax <post@wickenrode.com>2015-02-15 02:59:14 +0100
commitbaa1593d4bd84b2eebc41821d5ff2b70013371bf (patch)
tree33b06aed0f180784e5b827c40013af9cbb3744ea /Source/SPConnectionControllerDelegate.m
parent085b381858dcd3cda5c0b00527d3b7a77641345a (diff)
downloadsequelpro-baa1593d4bd84b2eebc41821d5ff2b70013371bf.tar.gz
sequelpro-baa1593d4bd84b2eebc41821d5ff2b70013371bf.tar.bz2
sequelpro-baa1593d4bd84b2eebc41821d5ff2b70013371bf.zip
Add basic color highlighting in favorites list
Diffstat (limited to 'Source/SPConnectionControllerDelegate.m')
-rw-r--r--Source/SPConnectionControllerDelegate.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m
index a28a27b7..8cef86e9 100644
--- a/Source/SPConnectionControllerDelegate.m
+++ b/Source/SPConnectionControllerDelegate.m
@@ -32,6 +32,7 @@
#ifndef SP_CODA
#import "SPFavoritesController.h"
#import "SPTableTextFieldCell.h"
+#import "SPFavoriteTextFieldCell.h"
#import "SPPreferenceController.h"
#import "SPGeneralPreferencePane.h"
#import "SPAppController.h"
@@ -39,6 +40,7 @@
#import "SPGroupNode.h"
#import "SPTreeNode.h"
#import "SPFavoritesOutlineView.h"
+#import "SPFavoriteColorSupport.h"
#endif
#ifndef SP_CODA
@@ -171,6 +173,12 @@ static NSString *SPQuickConnectImageWhite = @"quick-connect-icon-white.pdf";
}
else {
[(SPTableTextFieldCell *)cell setImage:[NSImage imageNamed:SPDatabaseImage]];
+ NSColor *bgColor = nil;
+ NSNumber *colorIndexObj = [[[node representedObject] nodeFavorite] objectForKey:SPFavoriteColorIndexKey];
+ if(colorIndexObj != nil) {
+ bgColor = [[SPFavoriteColorSupport sharedInstance] colorForIndex:[colorIndexObj integerValue]];
+ }
+ [(SPFavoriteTextFieldCell *)cell setLabelColor:bgColor];
}
}