aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-06-19 09:41:22 +0000
committerBibiko <bibiko@eva.mpg.de>2009-06-19 09:41:22 +0000
commit83d961abc1f551a44ca81bb0f8c4281e918c0f5f (patch)
tree9b664be929534c9f0231828db45677a87e29ffd3 /Source/CMTextView.m
parent515e93007d444c33ca82f7c43b76cf8c228cb9d6 (diff)
downloadsequelpro-83d961abc1f551a44ca81bb0f8c4281e918c0f5f.tar.gz
sequelpro-83d961abc1f551a44ca81bb0f8c4281e918c0f5f.tar.bz2
sequelpro-83d961abc1f551a44ca81bb0f8c4281e918c0f5f.zip
• added support to drag&drop textClipping files to Custom Query Editor and to editSheet
• fixed tiny issue for narrow-down completion
Diffstat (limited to 'Source/CMTextView.m')
-rw-r--r--Source/CMTextView.m14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/CMTextView.m b/Source/CMTextView.m
index 313a88bc..2cdda2da 100644
--- a/Source/CMTextView.m
+++ b/Source/CMTextView.m
@@ -2466,6 +2466,9 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
{
NSPasteboard *pboard = [sender draggingPasteboard];
+ if ( [[pboard types] containsObject:NSFilenamesPboardType] && [[pboard types] containsObject:@"CorePasteboardFlavorType 0x54455854"])
+ return [super performDragOperation:sender];
+
if ( [[pboard types] containsObject:NSFilenamesPboardType] ) {
NSArray *files = [pboard propertyListForType:NSFilenamesPboardType];
@@ -2476,6 +2479,10 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
}
NSString *filepath = [[pboard propertyListForType:NSFilenamesPboardType] objectAtIndex:0];
+ // if (([filenamesAttributes fileHFSTypeCode] == 'clpt' && [filenamesAttributes fileHFSCreatorCode] == 'MACS') || [[filename pathExtension] isEqualToString:@"textClipping"] == YES) {
+ //
+ // }
+
// Set the new insertion point
NSPoint draggingLocation = [sender draggingLocation];
@@ -2589,7 +2596,12 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
[task release];
// UTF16/32 files are detected as application/octet-stream resp. audio/mpeg
- if([result hasPrefix:@"application/octet-stream"] || [result hasPrefix:@"audio/mpeg"] || [result hasPrefix:@"text/plain"] || [[[aPath pathExtension] lowercaseString] isEqualToString:@"sql"])
+ if( [result hasPrefix:@"text/plain"]
+ || [[[aPath pathExtension] lowercaseString] isEqualToString:@"sql"]
+ || [[[aPath pathExtension] lowercaseString] isEqualToString:@"txt"]
+ || [result hasPrefix:@"audio/mpeg"]
+ || [result hasPrefix:@"application/octet-stream"]
+ )
{
// if UTF16/32 cocoa will try to find the correct encoding
if([result hasPrefix:@"application/octet-stream"] || [result hasPrefix:@"audio/mpeg"] || [result rangeOfString:@"utf-16"].length)