aboutsummaryrefslogtreecommitdiffstats
path: root/TableDump.m
diff options
context:
space:
mode:
authormltownsend <mltownsend@gmail.com>2008-11-21 01:12:59 +0000
committermltownsend <mltownsend@gmail.com>2008-11-21 01:12:59 +0000
commit1f3824ec2bc2465d9fe20c30f93db9ec5281151b (patch)
tree13f771c9e9b0f026097d8038e794c16db8d97cbf /TableDump.m
parenta1fe720cf5d7b6a04e7fa2b096721bad8a9e4532 (diff)
downloadsequelpro-1f3824ec2bc2465d9fe20c30f93db9ec5281151b.tar.gz
sequelpro-1f3824ec2bc2465d9fe20c30f93db9ec5281151b.tar.bz2
sequelpro-1f3824ec2bc2465d9fe20c30f93db9ec5281151b.zip
Issue 34 Fix. Plus fixes for some warnings.
Diffstat (limited to 'TableDump.m')
-rw-r--r--TableDump.m19
1 files changed, 16 insertions, 3 deletions
diff --git a/TableDump.m b/TableDump.m
index ea1a2914..185becec 100644
--- a/TableDump.m
+++ b/TableDump.m
@@ -44,7 +44,7 @@ get the tables in db
//get tables
[tables removeAllObjects];
- queryResult = [mySQLConnection listTables];
+ queryResult = (CMMCPResult *)[mySQLConnection listTables];
for ( i = 0 ; i < [queryResult numOfRows] ; i++ ) {
[queryResult dataSeek:i];
@@ -460,14 +460,14 @@ reads mysql-dumpfile
//show fieldMapping sheet
CMMCPResult *theResult;
int i;
- theResult = [mySQLConnection listTables];
+ theResult = (CMMCPResult *) [mySQLConnection listTables];
for ( i = 0 ; i < [theResult numOfRows] ; i++ ) {
[theResult dataSeek:i];
[fieldMappingPopup addItemWithTitle:[[theResult fetchRowAsArray] objectAtIndex:0]];
}
if ([tableDocumentInstance table] != nil && ![(NSString *)[tableDocumentInstance table] isEqualToString:@""]) {
- [fieldMappingPopup selectItemWithTitle:[tableDocumentInstance table]];
+ [fieldMappingPopup selectItemWithTitle:[(TableDocument *)tableDocumentInstance table]];
} else {
[fieldMappingPopup selectItemAtIndex:0];
}
@@ -1475,6 +1475,19 @@ sets the connection (received from TableDocument) and makes things that have to
}
}
+- (void)tableView:(NSTableView *)aTableView
+ willDisplayCell:(id)aCell
+ forTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex
+{
+ if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"useMonospacedFonts"] ) {
+ [aCell setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ }
+ else
+ {
+ [aCell setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ }
+}
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex