diff options
author | mltownsend <mltownsend@gmail.com> | 2008-11-21 01:12:59 +0000 |
---|---|---|
committer | mltownsend <mltownsend@gmail.com> | 2008-11-21 01:12:59 +0000 |
commit | 1f3824ec2bc2465d9fe20c30f93db9ec5281151b (patch) | |
tree | 13f771c9e9b0f026097d8038e794c16db8d97cbf /TablesList.m | |
parent | a1fe720cf5d7b6a04e7fa2b096721bad8a9e4532 (diff) | |
download | sequelpro-1f3824ec2bc2465d9fe20c30f93db9ec5281151b.tar.gz sequelpro-1f3824ec2bc2465d9fe20c30f93db9ec5281151b.tar.bz2 sequelpro-1f3824ec2bc2465d9fe20c30f93db9ec5281151b.zip |
Issue 34 Fix. Plus fixes for some warnings.
Diffstat (limited to 'TablesList.m')
-rw-r--r-- | TablesList.m | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/TablesList.m b/TablesList.m index 83a36a06..a5ab02e5 100644 --- a/TablesList.m +++ b/TablesList.m @@ -28,6 +28,8 @@ #import "TableContent.h" #import "TableDump.h" #import "ImageAndTextCell.h" +#import "CMMCPConnection.h" +#import "CMMCPResult.h" @implementation TablesList @@ -47,9 +49,10 @@ loads all table names in array tables and reload the tableView [tablesListView deselectAll:self]; [tables removeAllObjects]; - [tables addObject:@"TABLES"]; + [tables addObject:NSLocalizedString(@"TABLES",@"header for table list")]; - theResult = [mySQLConnection listTables]; + theResult = (CMMCPResult *)[mySQLConnection listTables]; + for ( i = 0 ; i < [theResult numOfRows] ; i++ ) { [theResult dataSeek:i]; [tables addObject:[[theResult fetchRowAsArray] objectAtIndex:0]]; @@ -275,19 +278,6 @@ sets the connection (received from TableDocument) and makes things that have to - (void)setConnection:(CMMCPConnection *)theConnection { mySQLConnection = theConnection; - - //prefs = [[NSUserDefaults standardUserDefaults] retain]; - - //set smallSystemFonts - //[[[tablesListView tableColumnWithIdentifier:@"tables"] dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; - //[copyTableNameField setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; - //if ( [prefs boolForKey:@"useMonospacedFonts"] ) { - - if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"useMonospacedFonts"] ) { - [[[tablesListView tableColumnWithIdentifier:@"tables"] dataCell] - setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; - } - [self updateTables:self]; } @@ -652,6 +642,13 @@ loads structure or source if tab selected the first time if (rowIndex > 0 && [[aTableColumn identifier] isEqualToString:@"tables"]) { [(ImageAndTextCell*)aCell setImage:[NSImage imageNamed:@"table-small"]]; [(ImageAndTextCell*)aCell setIndentationLevel:1]; + if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"useMonospacedFonts"] ) { + [(ImageAndTextCell*)aCell setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + } + else + { + [(ImageAndTextCell*)aCell setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } } else { [(ImageAndTextCell*)aCell setImage:nil]; |