diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-04-10 18:16:25 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-04-10 18:16:25 +0000 |
commit | 1bf7220ca576a3c09b9d9e53e24e0c6f30f15850 (patch) | |
tree | 1e9981cbf9585cbc008182edb30f8be6a4f7b979 /Source/TableDocument.m | |
parent | 3b59093cd3d5be30a809bdc6bb9f3ba63c9ce275 (diff) | |
download | sequelpro-1bf7220ca576a3c09b9d9e53e24e0c6f30f15850.tar.gz sequelpro-1bf7220ca576a3c09b9d9e53e24e0c6f30f15850.tar.bz2 sequelpro-1bf7220ca576a3c09b9d9e53e24e0c6f30f15850.zip |
• added "Import from Clipboard" ⌥⇧⌘I
- sheet showing the first 4kB of pasteboard content and the SQL/CSV accessory view
- pasteboard content will be saved as temp file and read by using the current table/connection encoding
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r-- | Source/TableDocument.m | 18 |
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) { |