aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-06-21 19:14:55 +0000
committerBibiko <bibiko@eva.mpg.de>2009-06-21 19:14:55 +0000
commite0b11c990a8c561e49b2148ea7208785ad6d0bd1 (patch)
treee7ddc8e7d612dd155d49e4553db962bea90605dc /Source
parent0535b8762460ab6e41fafe1b2b6744fc19fc05d6 (diff)
downloadsequelpro-e0b11c990a8c561e49b2148ea7208785ad6d0bd1.tar.gz
sequelpro-e0b11c990a8c561e49b2148ea7208785ad6d0bd1.tar.bz2
sequelpro-e0b11c990a8c561e49b2148ea7208785ad6d0bd1.zip
• changed: if the current edited field is a "ENUM" field
- show NULL in the combobox only if NULL value is allowed for the current field - display NULL value according to prefs' setting for NULL value
Diffstat (limited to 'Source')
-rw-r--r--Source/TableContent.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m
index cd894188..3d723c1b 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -167,6 +167,8 @@
numRows = [self getNumberOfRows];
areShowingAllRows = YES;
+ NSString *nullValue = [prefs objectForKey:@"NullValue"];
+
// Add the new columns to the table
for ( i = 0 ; i < [theColumns count] ; i++ ) {
columnDefinition = NSArrayObjectAtIndex(theColumns, i);
@@ -185,7 +187,9 @@
[dataCell setDrawsBackground:NO];
[dataCell setCompletes:YES];
[dataCell setControlSize:NSSmallControlSize];
- [dataCell addItemWithObjectValue:@"NULL"];
+ // add prefs NULL value representation if NULL value is allowed for that field
+ if([[columnDefinition objectForKey:@"null"] boolValue])
+ [dataCell addItemWithObjectValue:nullValue];
[dataCell addItemsWithObjectValues:[columnDefinition objectForKey:@"values"]];
} else {
dataCell = [[[NSTextFieldCell alloc] initTextCell:@""] autorelease];