diff options
author | stuconnolly <stuart02@gmail.com> | 2009-05-11 21:52:13 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2009-05-11 21:52:13 +0000 |
commit | 94fc42a398c088c822390fe3fba6ddffb66e426d (patch) | |
tree | d354fd1af86c237c05dbc9efe16c11b95ba10bc2 /Source | |
parent | 22a5a0a31c4807604e2eb229bc257a4027eff46c (diff) | |
download | sequelpro-94fc42a398c088c822390fe3fba6ddffb66e426d.tar.gz sequelpro-94fc42a398c088c822390fe3fba6ddffb66e426d.tar.bz2 sequelpro-94fc42a398c088c822390fe3fba6ddffb66e426d.zip |
Implementation of enhancement #28: Allow customizing default value of NULL property when adding new table fields.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/TableSource.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/TableSource.m b/Source/TableSource.m index d52fe13d..13341165 100644 --- a/Source/TableSource.m +++ b/Source/TableSource.m @@ -236,8 +236,8 @@ adds an empty row to the tableSource-array and goes into edit mode if ( ![self saveRowOnDeselect] ) return; [tableFields addObject:[NSMutableDictionary - dictionaryWithObjects:[NSArray arrayWithObjects:@"",@"int",@"",@"0",@"0",@"0",@"YES",@"",[prefs stringForKey:@"NullValue"],@"None",nil] - forKeys:[NSArray arrayWithObjects:@"Field",@"Type",@"Length",@"unsigned",@"zerofill",@"binary",@"Null",@"Key",@"Default",@"Extra",nil]]]; + dictionaryWithObjects:[NSArray arrayWithObjects:@"", @"int", @"", @"0", @"0", @"0", ([prefs boolForKey:@"NewFieldsAllowNulls"]) ? @"YES" : @"NO", @"", [prefs stringForKey:@"NullValue"], @"None", nil] + forKeys:[NSArray arrayWithObjects:@"Field", @"Type", @"Length", @"unsigned", @"zerofill", @"binary", @"Null", @"Key", @"Default", @"Extra", nil]]]; [tableSourceView reloadData]; [tableSourceView selectRow:[tableSourceView numberOfRows]-1 byExtendingSelection:NO]; |