aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m19
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index d0637eed..ce87a1ef 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -2283,6 +2283,14 @@
[tablesListInstance performSelector:@selector(makeTableListFilterHaveFocus) withObject:nil afterDelay:0.1];
}
+/**
+ * Exports the selected tables in the chosen file format.
+ */
+- (IBAction)exportSelectedTablesAs:(id)sender
+{
+ [exportControllerInstance exportTables:[tablesListInstance selectedTableItems] asFormat:[sender tag]];
+}
+
#pragma mark -
#pragma mark Other Methods
@@ -3159,9 +3167,18 @@
return YES;
}
}
+
+ // Data export
+ if ([menuItem action] == @selector(export:)) {
+ return (([self database] != nil) && ([[tablesListInstance tables] count] > 1));
+ }
+
+ // Selected tables data export
+ if ([menuItem action] == @selector(exportSelectedTablesAs:)) {
+ return (([self database] != nil) && ([[[tablesListInstance valueForKeyPath:@"tablesListView"] selectedRowIndexes] count]));
+ }
if ([menuItem action] == @selector(import:) ||
- [menuItem action] == @selector(export:) ||
[menuItem action] == @selector(exportMultipleTables:) ||
[menuItem action] == @selector(removeDatabase:) ||
[menuItem action] == @selector(copyDatabase:) ||