aboutsummaryrefslogtreecommitdiffstats
path: root/TablesList.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2008-12-09 00:08:35 +0000
committerstuconnolly <stuart02@gmail.com>2008-12-09 00:08:35 +0000
commita6c17dfdaa46f413ee8aee6d39904eb89454f813 (patch)
tree4dc1b40656543e2e40ebc7ed33acec2203ef98a5 /TablesList.m
parentd7892ee21760a09fcedaa46e8a2f544146bd9a29 (diff)
downloadsequelpro-a6c17dfdaa46f413ee8aee6d39904eb89454f813.tar.gz
sequelpro-a6c17dfdaa46f413ee8aee6d39904eb89454f813.tar.bz2
sequelpro-a6c17dfdaa46f413ee8aee6d39904eb89454f813.zip
- Partial fix for issue #109 by making the option to 'Autodetect' character encoding specific to each table
- Added the selected table's character encoding to the table information pane and removed the table's name
Diffstat (limited to 'TablesList.m')
-rw-r--r--TablesList.m14
1 files changed, 8 insertions, 6 deletions
diff --git a/TablesList.m b/TablesList.m
index 500ac349..40ea87c5 100644
--- a/TablesList.m
+++ b/TablesList.m
@@ -543,12 +543,12 @@ traps enter and esc and edit/cancel without entering next row
}
}
-/*
-loads a table in content or source view (if tab selected)
-*/
+/**
+ * Loads a table in content or source view (if tab selected)
+ */
- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
{
- if ( [tablesListView numberOfSelectedRows] == 1 ) {
+ if ( [tablesListView numberOfSelectedRows] == 1 ) {
if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 0 ) {
[tableSourceInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]];
structureLoaded = YES;
@@ -575,6 +575,10 @@ loads a table in content or source view (if tab selected)
[tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@/%@", [tableDocumentInstance mySQLVersion], [tableDocumentInstance user],
[tableDocumentInstance host], [tableDocumentInstance database], [tables objectAtIndex:[tablesListView selectedRow]]]];
+ // Update connection characater set encoding based on the table's encoding if required
+ if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"encoding"] isEqualToString:@"Autodetect"]) {
+ [tableDocumentInstance detectTableEncodingForTable:[tables objectAtIndex:[tablesListView selectedRow]]];
+ }
} else {
[tableSourceInstance loadTable:nil];
[tableContentInstance loadTable:nil];
@@ -589,8 +593,6 @@ loads a table in content or source view (if tab selected)
}
}
-
-
- (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(int)rowIndex
{
return (rowIndex != 0);