diff options
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r-- | Source/SPDatabaseDocument.m | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index a140db3f..43b5e844 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -2348,22 +2348,19 @@ } /** - * Opens the export dialog on the SQL dump tab with the selected tables checked for export. If no tables - * are selected then all tables are checked. + * Exports the selected tables in the chosen file format. */ -- (IBAction)export:(id)sender +- (IBAction)exportSelectedTablesAs:(id)sender { - NSArray *tables = [tablesListInstance selectedTableItems]; - - [exportControllerInstance exportTables:([tables count]) ? tables : nil asFormat:SPSQLExport usingSource:SPTableExport]; + [exportControllerInstance exportTables:[tablesListInstance selectedTableItems] asFormat:[sender tag] usingSource:SPTableExport]; } /** - * Exports the selected tables in the chosen file format. + * Opens the data export dialog. */ -- (IBAction)exportSelectedTablesAs:(id)sender +- (IBAction)export:(id)sender { - [exportControllerInstance exportTables:[tablesListInstance selectedTableItems] asFormat:[sender tag] usingSource:SPTableExport]; + [exportControllerInstance export:self]; } #pragma mark - @@ -3453,16 +3450,6 @@ [tableDumpInstance importFromClipboard]; } -- (IBAction)exportTable:(id)sender -{ - return [self export:sender]; -} - -- (IBAction)exportMultipleTables:(id)sender -{ - return [self export:sender]; -} - /* * Show the MySQL Help TOC of the current MySQL connection * Invoked by the MainMenu > Help > MySQL Help @@ -3508,7 +3495,6 @@ } if ([menuItem action] == @selector(import:) || - [menuItem action] == @selector(exportMultipleTables:) || [menuItem action] == @selector(removeDatabase:) || [menuItem action] == @selector(copyDatabase:) || [menuItem action] == @selector(renameDatabase:)) @@ -3537,10 +3523,6 @@ return YES; } - if ([menuItem action] == @selector(exportTable:)) { - return ([self database] != nil && [self table] != nil); - } - if ([menuItem action] == @selector(printDocument:)) { return (([self database] != nil && [[tablesListInstance valueForKeyPath:@"tablesListView"] numberOfSelectedRows] == 1) // if Custom Query Tab is active the textView will handle printDocument by itself |