aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.m
diff options
context:
space:
mode:
authordmoagx <post@wickenrode.com>2013-10-23 00:34:52 +0000
committerdmoagx <post@wickenrode.com>2013-10-23 00:34:52 +0000
commitb3b87db97d6b607ed78a671115e3e56a76077503 (patch)
tree4b8241025d09961037dcadfc8adffe9f4ee28741 /Source/SPDatabaseDocument.m
parent546f436290721d208381769bef646a8ab9d42212 (diff)
downloadsequelpro-b3b87db97d6b607ed78a671115e3e56a76077503.tar.gz
sequelpro-b3b87db97d6b607ed78a671115e3e56a76077503.tar.bz2
sequelpro-b3b87db97d6b607ed78a671115e3e56a76077503.zip
* This change adds basic tab coloring support for favorites - ** POC / NEEDS REVIEW **
Known issues: * There might be additional colors be shown when dragging tabs between windows * The color set might need fine tuning * Coloring of items in the favorite outline view is not yet handled
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 85246443..0993458b 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -101,6 +101,7 @@ enum {
#import "SPThreadAdditions.h"
#import "RegexKitLite.h"
#import "SPTextView.h"
+#import "SPFavoriteColorSupport.h"
#ifdef SP_CODA /* headers */
#import "SPAlertSheets.h"
@@ -3727,6 +3728,8 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase";
NSMutableString *tabTitle;
NSMutableString *windowTitle;
SPDatabaseDocument *frontTableDocument = [parentWindowController selectedTableDocument];
+
+ NSColor *tabColor = nil;
// Determine name details
NSString *pathName = @"";
@@ -3743,6 +3746,8 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase";
tabTitle = windowTitle;
}
else {
+ tabColor = [[SPFavoriteColorSupport sharedInstance] colorForIndex:[connectionController colorIndex]];
+
windowTitle = [NSMutableString string];
tabTitle = [NSMutableString string];
@@ -3784,6 +3789,7 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase";
// Set the titles
[parentTabViewItem setLabel:tabTitle];
+ [parentTabViewItem setColor:tabColor];
if ([parentWindowController selectedTableDocument] == self) {
[parentWindow setTitle:windowTitle];
}