aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExtendedTableInfo.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-05-27 20:57:50 +0000
committerstuconnolly <stuart02@gmail.com>2009-05-27 20:57:50 +0000
commitd263ccfb7d6e6e9bfad3f23156bdf7c88dde0765 (patch)
tree629123c31a940678541adb4ebb2dcd839f71799c /Source/SPExtendedTableInfo.m
parent4668491cf211efebec4abbf15888593b15101e72 (diff)
downloadsequelpro-d263ccfb7d6e6e9bfad3f23156bdf7c88dde0765.tar.gz
sequelpro-d263ccfb7d6e6e9bfad3f23156bdf7c88dde0765.tar.bz2
sequelpro-d263ccfb7d6e6e9bfad3f23156bdf7c88dde0765.zip
Bind the table create syntax text view's backgroud colour upon awakeFromNib.
Diffstat (limited to 'Source/SPExtendedTableInfo.m')
-rw-r--r--Source/SPExtendedTableInfo.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/SPExtendedTableInfo.m b/Source/SPExtendedTableInfo.m
index 73a3ab86..d2e39509 100644
--- a/Source/SPExtendedTableInfo.m
+++ b/Source/SPExtendedTableInfo.m
@@ -40,6 +40,23 @@
@synthesize connection;
+/**
+ * Upon awakening bind the create syntax text view's background colour.
+ */
+- (void)awakeFromNib
+{
+ [tableCreateSyntaxTextView setAllowsDocumentBackgroundColorChange:YES];
+
+ NSMutableDictionary *bindingOptions = [NSMutableDictionary dictionary];
+
+ [bindingOptions setObject:NSUnarchiveFromDataTransformerName forKey:@"NSValueTransformerName"];
+
+ [tableCreateSyntaxTextView bind:@"backgroundColor"
+ toObject:[NSUserDefaultsController sharedUserDefaultsController]
+ withKeyPath:@"values.CustomQueryEditorBackgroundColor"
+ options:bindingOptions];
+}
+
#pragma mark -
#pragma mark IBAction methods