diff options
-rw-r--r-- | Source/SPCustomQuery.m | 7 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.m | 4 | ||||
-rw-r--r-- | Source/SPTableContent.m | 8 |
3 files changed, 17 insertions, 2 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index bfb6f952..f590de42 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -1486,6 +1486,13 @@ [[dataCell formatter] setTextLimit:[[columnDefinition objectForKey:@"char_length"] integerValue]]; } + // Set the column to right-aligned for numeric data types + if ([[columnDefinition objectForKey:@"typegrouping"] isEqualToString:@"integer"] + || [[columnDefinition objectForKey:@"typegrouping"] isEqualToString:@"float"]) + { + [dataCell setAlignment:NSRightTextAlignment]; + } + // Set field type for validations [[dataCell formatter] setFieldType:[columnDefinition objectForKey:@"type"]]; [theCol setDataCell:dataCell]; diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 270892f0..be5f1155 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -3960,11 +3960,11 @@ [connection setObject:[NSNumber numberWithInt:[connectionController useSSL]] forKey:@"useSSL"]; [connection setObject:[NSNumber numberWithInt:[connectionController sslKeyFileLocationEnabled]] forKey:@"sslKeyFileLocationEnabled"]; - [connection setObject:[connectionController sslKeyFileLocation] forKey:@"sslKeyFileLocation"]; + if ([connectionController sslKeyFileLocation]) [connection setObject:[connectionController sslKeyFileLocation] forKey:@"sslKeyFileLocation"]; [connection setObject:[NSNumber numberWithInt:[connectionController sslCertificateFileLocationEnabled]] forKey:@"sslCertificateFileLocationEnabled"]; [connection setObject:[connectionController sslCertificateFileLocation] forKey:@"sslCertificateFileLocation"]; [connection setObject:[NSNumber numberWithInt:[connectionController sslCACertFileLocationEnabled]] forKey:@"sslCACertFileLocationEnabled"]; - [connection setObject:[connectionController sslCACertFileLocation] forKey:@"sslCACertFileLocation"]; + if ([connectionController sslCACertFileLocation]) [connection setObject:[connectionController sslCACertFileLocation] forKey:@"sslCACertFileLocation"]; [stateDetails setObject:[NSDictionary dictionaryWithDictionary:connection] forKey:@"connection"]; } diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 5b7f4a4b..393e0e94 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -483,6 +483,14 @@ } else { dataCell = [[[SPTextAndLinkCell alloc] initTextCell:@""] autorelease]; } + + // Set the column to right-aligned for numeric data types + if ([[columnDefinition objectForKey:@"typegrouping"] isEqualToString:@"integer"] + || [[columnDefinition objectForKey:@"typegrouping"] isEqualToString:@"float"]) + { + [dataCell setAlignment:NSRightTextAlignment]; + } + [dataCell setEditable:YES]; // Set the line break mode and an NSFormatter subclass which truncates long strings for display |