aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m18
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index ab8a7ac5..3e442d6e 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -1684,7 +1684,7 @@
}
[createTableSyntaxTextField setStringValue:[NSString stringWithFormat:@"Create syntax for %@ '%@'", typeString, [self table]]];
-
+
[createTableSyntaxTextView setEditable:YES];
[createTableSyntaxTextView setString:@""];
[createTableSyntaxTextView insertText:([tablesListInstance tableType] == SPTableTypeView) ? [[tableSyntax createViewSyntaxPrettifier] stringByAppendingString:@";"] : [tableSyntax stringByAppendingString:@";"]];
@@ -3025,6 +3025,14 @@
/**
* Passes the request to the tableDump object
*/
+- (IBAction)importFromClipboard:(id)sender
+{
+ [tableDumpInstance importFromClipboard];
+}
+
+/**
+ * Passes the request to the tableDump object
+ */
- (IBAction)export:(id)sender
{
if ([sender tag] == -1) {
@@ -3086,7 +3094,13 @@
{
return ([self database] != nil);
}
-
+
+ if ([menuItem action] == @selector(importFromClipboard:))
+ {
+ return ([[NSPasteboard generalPasteboard] availableTypeFromArray:[NSArray arrayWithObjects:NSStringPboardType, nil]]) ? YES : NO;
+
+ }
+
// Change "Save Query/Queries" menu item title dynamically
// and disable it if no query in the editor
if ([menuItem action] == @selector(saveConnectionSheet:) && [menuItem tag] == 0) {