aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFieldMapperController.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-04-10 18:16:25 +0000
committerBibiko <bibiko@eva.mpg.de>2010-04-10 18:16:25 +0000
commit1bf7220ca576a3c09b9d9e53e24e0c6f30f15850 (patch)
tree1e9981cbf9585cbc008182edb30f8be6a4f7b979 /Source/SPFieldMapperController.m
parent3b59093cd3d5be30a809bdc6bb9f3ba63c9ce275 (diff)
downloadsequelpro-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/SPFieldMapperController.m')
-rw-r--r--Source/SPFieldMapperController.m13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/SPFieldMapperController.m b/Source/SPFieldMapperController.m
index ae935b44..a3d17f1c 100644
--- a/Source/SPFieldMapperController.m
+++ b/Source/SPFieldMapperController.m
@@ -82,8 +82,13 @@
{
// Set source path
- [fileSourcePath setURL:[NSURL fileURLWithPath:sourcePath]];
+ if([sourcePath hasPrefix:SPImportClipboardTempFileNamePrefix]) {
+ [fileSourcePath setURL:[NSURL fileURLWithPath:NSLocalizedString(@"Clipboard", @"Clipboard")]];
+ } else {
+ [fileSourcePath setURL:[NSURL fileURLWithPath:sourcePath]];
+ }
[fileSourcePath setDoubleAction:@selector(goBackToFileChooser:)];
+
[onupdateTextView setDelegate:theDelegate];
windowMinWidth = [[self window] minSize].width;
windowMinHeigth = [[self window] minSize].height;
@@ -541,7 +546,11 @@
- (IBAction)goBackToFileChooser:(id)sender
{
[NSApp endSheet:[self window] returnCode:[sender tag]];
- [theDelegate importFile];
+ if([sourcePath hasPrefix:SPImportClipboardTempFileNamePrefix]) {
+ [theDelegate importFromClipboard];
+ } else {
+ [theDelegate importFile];
+ }
}
#pragma mark -