aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableSource.m
diff options
context:
space:
mode:
authoravenjamin <avenjamin@gmail.com>2009-04-10 15:11:22 +0000
committeravenjamin <avenjamin@gmail.com>2009-04-10 15:11:22 +0000
commitb69bbf81201e94b82232e73a0d43a96f10af2fa9 (patch)
treef207f57773c968610a89108cbc92dfd4e6b01e2c /Source/TableSource.m
parent06bfa0d4c2f79aeda9c3585a80c13845029cfa2d (diff)
downloadsequelpro-b69bbf81201e94b82232e73a0d43a96f10af2fa9.tar.gz
sequelpro-b69bbf81201e94b82232e73a0d43a96f10af2fa9.tar.bz2
sequelpro-b69bbf81201e94b82232e73a0d43a96f10af2fa9.zip
- part 4 of merge from 'avenjamin' branch into trunk.
- committing Source
Diffstat (limited to 'Source/TableSource.m')
-rw-r--r--Source/TableSource.m16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/TableSource.m b/Source/TableSource.m
index 117ce99b..92aa9811 100644
--- a/Source/TableSource.m
+++ b/Source/TableSource.m
@@ -236,7 +236,7 @@ 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]
+ 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]]];
[tableSourceView reloadData];
@@ -503,7 +503,7 @@ sets the connection (received from TableDocument) and makes things that have to
[tableSourceView registerForDraggedTypes:[NSArray arrayWithObjects:@"SequelProPasteboard", nil]];
while ( (indexColumn = [indexColumnsEnumerator nextObject]) ) {
- if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ if ( [prefs boolForKey:@"UseMonospacedFonts"] ) {
[[indexColumn dataCell] setFont:[NSFont fontWithName:@"Monaco" size:10]];
}
else
@@ -512,7 +512,7 @@ sets the connection (received from TableDocument) and makes things that have to
}
}
while ( (fieldColumn = [fieldColumnsEnumerator nextObject]) ) {
- if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ if ( [prefs boolForKey:@"UseMonospacedFonts"] ) {
[[fieldColumn dataCell] setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
}
else
@@ -542,7 +542,7 @@ fetches the result as an array with a dictionary for each row in it
for (int i = 0; i < [keys count] ; i++) {
key = [keys objectAtIndex:i];
if ( [[tempRow objectForKey:key] isMemberOfClass:[NSNull class]] )
- [tempRow setObject:[prefs objectForKey:@"nullValue"] forKey:key];
+ [tempRow setObject:[prefs objectForKey:@"NullValue"] forKey:key];
}
// change some fields to be more human-readable or GUI compatible
if ( [[tempRow objectForKey:@"Extra"] isEqualToString:@""] ) {
@@ -646,7 +646,7 @@ returns YES if no row is beeing edited and nothing has to be written to db
if ( [[theRow objectForKey:@"Null"] isEqualToString:@"NO"] )
[queryString appendString:@" NOT NULL"];
if ( ![[theRow objectForKey:@"Extra"] isEqualToString:@"auto_increment"] && !([[theRow objectForKey:@"Type"] isEqualToString:@"timestamp"] && [[theRow objectForKey:@"Default"] isEqualToString:@"NULL"]) ) {
- if ( [[theRow objectForKey:@"Default"] isEqualToString:[prefs objectForKey:@"nullValue"]] ) {
+ if ( [[theRow objectForKey:@"Default"] isEqualToString:[prefs objectForKey:@"NullValue"]] ) {
if ([[theRow objectForKey:@"Null"] isEqualToString:@"YES"] ) {
[queryString appendString:@" DEFAULT NULL "];
}
@@ -793,9 +793,9 @@ get the default value for a specified field
- (NSString *)defaultValueForField:(NSString *)field
{
if ( ![defaultValues objectForKey:field] ) {
- return [prefs objectForKey:@"nullValue"];
+ return [prefs objectForKey:@"NullValue"];
} else if ( [[defaultValues objectForKey:field] isMemberOfClass:[NSNull class]] ) {
- return [prefs objectForKey:@"nullValue"];
+ return [prefs objectForKey:@"NullValue"];
} else {
return [defaultValues objectForKey:field];
}
@@ -980,7 +980,7 @@ would result in a position change.
}
// Add the default value
- if ([[originalRow objectForKey:@"Default"] isEqualToString:[prefs objectForKey:@"nullValue"]]) {
+ if ([[originalRow objectForKey:@"Default"] isEqualToString:[prefs objectForKey:@"NullValue"]]) {
if ([[originalRow objectForKey:@"Null"] isEqualToString:@"YES"]) {
[queryString appendString:@" DEFAULT NULL"];
}