aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TablesList.h
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-07-28 01:02:40 +0000
committerrowanbeentje <rowan@beent.je>2009-07-28 01:02:40 +0000
commit9c06d1219c66acc043b5f13ab29379f60eb00350 (patch)
tree57f6a57ad8a10552eb22a372fdbf297522d39d65 /Source/TablesList.h
parent9b827edbb16a50f3e0c42e0f1c21a9bca3e7a77b (diff)
downloadsequelpro-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/TablesList.h')
-rw-r--r--Source/TablesList.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/Source/TablesList.h b/Source/TablesList.h
index 6210f9e7..68578010 100644
--- a/Source/TablesList.h
+++ b/Source/TablesList.h
@@ -40,6 +40,7 @@ enum sp_table_types
@interface NSObject (NSSplitView)
- (NSView *)collapsibleSubview;
- (IBAction)toggleCollapse:(id)sender;
+- (BOOL)collapsibleSubviewIsCollapsed;
- (void)setCollapsibleSubviewCollapsed:(BOOL)flag;
@end
@@ -74,8 +75,11 @@ enum sp_table_types
IBOutlet id truncateTableButton;
IBOutlet id truncateTableContextButton;
IBOutlet NSSplitView *tableListSplitView;
+ IBOutlet NSSplitView *tableListFilterSplitView;
IBOutlet NSButton *tableInfoCollapseButton;
-
+
+ IBOutlet NSSearchField *listFilterField;
+
IBOutlet NSMenuItem *removeTableMenuItem;
IBOutlet NSMenuItem *duplicateTableMenuItem;
IBOutlet NSMenuItem *renameTableMenuItem;
@@ -89,7 +93,13 @@ enum sp_table_types
IBOutlet NSMenuItem *separatorTableContextMenuItem;
NSMutableArray *tables;
+ NSMutableArray *filteredTables;
NSMutableArray *tableTypes;
+ NSMutableArray *filteredTableTypes;
+ int selectedTableType;
+ NSString *selectedTableName;
+ BOOL isTableListFiltered;
+ BOOL tableListContainsViews;
BOOL structureLoaded, contentLoaded, statusLoaded, alertSheetOpened;
}
@@ -112,6 +122,7 @@ enum sp_table_types
- (void)setConnection:(MCPConnection *)theConnection;
- (void)truncateTable;
- (void)doPerformQueryService:(NSString *)query;
+- (void)updateSelection;
// Getters
- (NSString *)tableName;
@@ -133,4 +144,11 @@ enum sp_table_types
- (void)setStatusRequiresReload:(BOOL)reload;
- (BOOL)selectTableOrViewWithName:(NSString *)theName;
+// Table list filter interaction
+- (void) showFilter;
+- (void) hideFilter;
+- (void) clearFilter;
+- (IBAction) updateFilter:(id)sender;
+- (void) selectTableAtIndex:(NSNumber *)rowIndex;
+
@end