diff options
author | stuconnolly <stuart02@gmail.com> | 2010-07-15 12:08:13 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-07-15 12:08:13 +0000 |
commit | 3558fee0667274f8ae325d0354ac6e31b2144db9 (patch) | |
tree | 7d01a0e7b8c2b1bade1dd162835d05a67a551d3e /Source/SPDatabaseDocument.m | |
parent | b21ab51d37672f7e5934938d0ffde641f4de3a26 (diff) | |
download | sequelpro-3558fee0667274f8ae325d0354ac6e31b2144db9.tar.gz sequelpro-3558fee0667274f8ae325d0354ac6e31b2144db9.tar.bz2 sequelpro-3558fee0667274f8ae325d0354ac6e31b2144db9.zip |
Make the 'Export' menu item in the 'File' menu behave more like the export context menu by checking only the selecting tables. If no tables are selected all of them are checked by default (the same as before). Fixes issue #755.
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r-- | Source/SPDatabaseDocument.m | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index d6c17b5e..75e18ff3 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -2342,6 +2342,17 @@ } /** + * 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. + */ +- (IBAction)export:(id)sender +{ + NSArray *tables = [tablesListInstance selectedTableItems]; + + [exportControllerInstance exportTables:([tables count]) ? tables : nil asFormat:SPSQLExport usingSource:SPTableExport]; +} + +/** * Exports the selected tables in the chosen file format. */ - (IBAction)exportSelectedTablesAs:(id)sender @@ -3436,19 +3447,6 @@ [tableDumpInstance importFromClipboard]; } -/** - * Passes the request to the dataImport object - */ -- (IBAction)export:(id)sender -{ - if ([sender tag] == -1) { - [exportControllerInstance export]; - } - else { - [tableDumpInstance exportFile:[sender tag]]; - } -} - - (IBAction)exportTable:(id)sender { return [self export:sender]; |