aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCopyTable.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-10-17 22:49:46 +0000
committerrowanbeentje <rowan@beent.je>2011-10-17 22:49:46 +0000
commita60219ad6b0d6988635f6cde44a6c6335872f439 (patch)
tree4648ec1d98a209c0daf6d34ad712a2e554c401f9 /Source/SPCopyTable.m
parent02860c5fac3244ad86d2699611f220746aef2f56 (diff)
downloadsequelpro-a60219ad6b0d6988635f6cde44a6c6335872f439.tar.gz
sequelpro-a60219ad6b0d6988635f6cde44a6c6335872f439.tar.bz2
sequelpro-a60219ad6b0d6988635f6cde44a6c6335872f439.zip
- Update code to use NSStrings for NSTableColumn identifiers, as per 10.7 SDK
- Update localizable strings
Diffstat (limited to 'Source/SPCopyTable.m')
-rw-r--r--Source/SPCopyTable.m18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m
index 857b45c3..bfd00c49 100644
--- a/Source/SPCopyTable.m
+++ b/Source/SPCopyTable.m
@@ -152,7 +152,7 @@ static const NSInteger kBlobAsImageFile = 4;
// Create an array of table column mappings for fast iteration
NSUInteger *columnMappings = malloc(numColumns * sizeof(NSUInteger));
for ( c = 0; c < numColumns; c++ )
- columnMappings[c] = [[NSArrayObjectAtIndex(columns, c) identifier] unsignedIntValue];
+ columnMappings[c] = (NSUInteger)[[NSArrayObjectAtIndex(columns, c) identifier] integerValue];
// Loop through the rows, adding their descriptive contents
NSUInteger rowIndex = [selectedRows firstIndex];
@@ -290,7 +290,7 @@ static const NSInteger kBlobAsImageFile = 4;
// Create an array of table column mappings for fast iteration
NSUInteger *columnMappings = malloc(numColumns * sizeof(NSUInteger));
for ( c = 0; c < numColumns; c++ )
- columnMappings[c] = [[NSArrayObjectAtIndex(columns, c) identifier] unsignedIntValue];
+ columnMappings[c] = (NSUInteger)[[NSArrayObjectAtIndex(columns, c) identifier] integerValue];
// Loop through the rows, adding their descriptive contents
NSUInteger rowIndex = [selectedRows firstIndex];
@@ -432,7 +432,7 @@ static const NSInteger kBlobAsImageFile = 4;
for (c = 0; c < numColumns; c++)
{
- columnMappings[c] = [[NSArrayObjectAtIndex(columns, c) identifier] unsignedIntValue];
+ columnMappings[c] = (NSUInteger)[[NSArrayObjectAtIndex(columns, c) identifier] integerValue];
NSString *t = [NSArrayObjectAtIndex(columnDefinitions, columnMappings[c]) objectForKey:@"typegrouping"];
@@ -611,7 +611,7 @@ static const NSInteger kBlobAsImageFile = 4;
// Create an array of table column mappings for fast iteration
NSUInteger *columnMappings = malloc(numColumns * sizeof(NSUInteger));
for ( c = 0; c < numColumns; c++ )
- columnMappings[c] = [[NSArrayObjectAtIndex(columns, c) identifier] unsignedIntValue];
+ columnMappings[c] = (NSUInteger)[[NSArrayObjectAtIndex(columns, c) identifier] integerValue];
// Loop through the rows, adding their descriptive contents
NSUInteger rowIndex = [selectedRows firstIndex];
@@ -711,7 +711,7 @@ static const NSInteger kBlobAsImageFile = 4;
if ([[NSThread currentThread] isCancelled]) return nil;
columnWidth = [self autodetectWidthForColumnDefinition:columnDefinition maxRows:100];
- [columnWidths setObject:[NSNumber numberWithUnsignedInteger:columnWidth] forKey:[columnDefinition objectForKey:@"datacolumnindex"]];
+ [columnWidths setObject:[NSString stringWithFormat:@"%llu", columnWidth] forKey:[columnDefinition objectForKey:@"datacolumnindex"]];
allColumnWidths += columnWidth;
}
@@ -721,7 +721,7 @@ static const NSInteger kBlobAsImageFile = 4;
// Look for columns that are wider than the multi-column max
for (NSString *columnIdentifier in columnWidths) {
- columnWidth = [[columnWidths objectForKey:columnIdentifier] unsignedIntegerValue];
+ columnWidth = [[columnWidths objectForKey:columnIdentifier] integerValue];
if (columnWidth > SP_MAX_CELL_WIDTH_MULTICOLUMN) availableWidthToReduce += columnWidth - SP_MAX_CELL_WIDTH_MULTICOLUMN;
}
@@ -733,7 +733,7 @@ static const NSInteger kBlobAsImageFile = 4;
if (widthToReduce) {
NSArray *columnIdentifiers = [columnWidths allKeys];
for (NSString *columnIdentifier in columnIdentifiers) {
- columnWidth = [[columnWidths objectForKey:columnIdentifier] unsignedIntegerValue];
+ columnWidth = [[columnWidths objectForKey:columnIdentifier] integerValue];
if (columnWidth > SP_MAX_CELL_WIDTH_MULTICOLUMN) {
columnWidth -= ceil((double)(columnWidth - SP_MAX_CELL_WIDTH_MULTICOLUMN) / availableWidthToReduce * widthToReduce);
[columnWidths setObject:[NSNumber numberWithUnsignedInteger:columnWidth] forKey:columnIdentifier];
@@ -762,7 +762,7 @@ static const NSInteger kBlobAsImageFile = 4;
#else
NSFont *tableFont = [NSFont systemFontOfSize:[NSFont smallSystemFontSize]];
#endif
- NSUInteger columnIndex = [[columnDefinition objectForKey:@"datacolumnindex"] unsignedIntegerValue];
+ NSUInteger columnIndex = (NSUInteger)[[columnDefinition objectForKey:@"datacolumnindex"] integerValue];
NSDictionary *stringAttributes = [NSDictionary dictionaryWithObject:tableFont forKey:NSFontAttributeName];
Class mcpGeometryData = [MCPGeometryData class];
@@ -1330,7 +1330,7 @@ static const NSInteger kBlobAsImageFile = 4;
NSUInteger *columnMappings = malloc(numColumns * sizeof(NSUInteger));
NSUInteger c;
for ( c = 0; c < numColumns; c++ )
- columnMappings[c] = [[NSArrayObjectAtIndex(columns, c) identifier] unsignedIntValue];
+ columnMappings[c] = (NSUInteger)[[NSArrayObjectAtIndex(columns, c) identifier] integerValue];
NSMutableString *tableMetaData = [NSMutableString string];
if([[self delegate] isKindOfClass:[SPCustomQuery class]]) {