diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-03-21 22:17:50 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-03-21 22:17:50 +0000 |
commit | b5cabd449156acaf18815759ee4cc5383e8fa4f6 (patch) | |
tree | 7e1c0c01cb8c86fb7dba26abf4c0b7a582d0a20f /Source/TablesList.m | |
parent | 919f4705fc4d4e59133e4279a1e87dc432e12f2d (diff) | |
download | sequelpro-b5cabd449156acaf18815759ee4cc5383e8fa4f6.tar.gz sequelpro-b5cabd449156acaf18815759ee4cc5383e8fa4f6.tar.bz2 sequelpro-b5cabd449156acaf18815759ee4cc5383e8fa4f6.zip |
• Navigator
- added 'sync' mode - the navigator follows the active window db/table selection if navigator has not multiple selected items
- added drag support of selected items
-- as comma separated and backtick quoted string for external apps
-- as array of schema paths for SP
• CMTextView
- added drop support for selected items coming from the Navigator
- insert them as comma list relative to current selected db/table
Diffstat (limited to 'Source/TablesList.m')
-rw-r--r-- | Source/TablesList.m | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m index 74f4a390..6de845f3 100644 --- a/Source/TablesList.m +++ b/Source/TablesList.m @@ -39,6 +39,7 @@ #import "NSNotificationAdditions.h" #import "SPConstants.h" #import "SPAlertSheets.h" +#import "SPNavigatorController.h" @interface TablesList (PrivateAPI) @@ -1420,6 +1421,20 @@ if ([tablesListView numberOfSelectedRows] == 1 && [(NSString *)[filteredTables objectAtIndex:[tablesListView selectedRow]] length]) tableName = [filteredTables objectAtIndex:[tablesListView selectedRow]]; [self updateSelectionWithTaskString:[NSString stringWithFormat:NSLocalizedString(@"Loading %@...", @"Loading table task string"), tableName]]; + + if([[SPNavigatorController sharedNavigatorController] syncMode]) { + NSMutableString *schemaPath = [NSMutableString string]; + [schemaPath setString:[tableDocumentInstance connectionID]]; + if([tableDocumentInstance database] && [[tableDocumentInstance database] length]) { + [schemaPath appendString:SPUniqueSchemaDelimiter]; + [schemaPath appendString:[tableDocumentInstance database]]; + if(tableName && [tableName length]) { + [schemaPath appendString:SPUniqueSchemaDelimiter]; + [schemaPath appendString:tableName]; + } + } + [[SPNavigatorController sharedNavigatorController] selectPath:schemaPath]; + } } /** |