diff options
author | rowanbeentje <rowan@beent.je> | 2009-07-28 01:02:40 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-07-28 01:02:40 +0000 |
commit | 9c06d1219c66acc043b5f13ab29379f60eb00350 (patch) | |
tree | 57f6a57ad8a10552eb22a372fdbf297522d39d65 /Source/TableDump.m | |
parent | 9b827edbb16a50f3e0c42e0f1c21a9bca3e7a77b (diff) | |
download | sequelpro-9c06d1219c66acc043b5f13ab29379f60eb00350.tar.gz sequelpro-9c06d1219c66acc043b5f13ab29379f60eb00350.tar.bz2 sequelpro-9c06d1219c66acc043b5f13ab29379f60eb00350.zip |
Improve TablesList significantly:
- If there are twenty or more tables, show a table quicksearch/filter at the top of the list, and update the rest of the code to match. This addresses issue #178.
- Select tables and views alphabetically by user's current locale (instead of default MySQL "A B C a b c")
- When adding or duplicating tables, insert them at the correct point
- Fix a number of minor display bugs caused by incorrect interaction with the tables list caches
Diffstat (limited to 'Source/TableDump.m')
-rw-r--r-- | Source/TableDump.m | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m index 3edf0619..34ffe262 100644 --- a/Source/TableDump.m +++ b/Source/TableDump.m @@ -379,8 +379,8 @@ } - (IBAction)changeTable:(id)sender -{ - [tableListView selectRowIndexes:[NSIndexSet indexSetWithIndex:[[tablesListInstance tables] indexOfObject:[fieldMappingPopup titleOfSelectedItem]]] byExtendingSelection:NO]; +{ + [tablesListInstance selectTableOrViewWithName:[fieldMappingPopup titleOfSelectedItem]]; //set up tableView currentRow = 0; @@ -603,12 +603,9 @@ [fieldMappingPopup selectItemAtIndex:0]; } - int indexOfFirstTable = [[tablesListInstance tables] indexOfObject:[fieldMappingPopup titleOfSelectedItem]]; - - if( indexOfFirstTable == NSNotFound ){ + if( ![tablesListInstance selectTableOrViewWithName:[fieldMappingPopup titleOfSelectedItem]] ) { [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"[ERROR] %@\n", @"error text when trying to import csv data, but we have no tables in the db"), @"Can't import CSV data into a database without any tables!"]]; } else { - [tableListView selectRowIndexes:[NSIndexSet indexSetWithIndex:indexOfFirstTable] byExtendingSelection:NO]; //set up tableView currentRow = 0; |