aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMTextView.m14
-rw-r--r--Source/SPEditSheetTextView.m11
-rw-r--r--Source/SPNarrowDownCompletion.m4
3 files changed, 25 insertions, 4 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)
diff --git a/Source/SPEditSheetTextView.m b/Source/SPEditSheetTextView.m
index 7f3611a8..cb597f08 100644
--- a/Source/SPEditSheetTextView.m
+++ b/Source/SPEditSheetTextView.m
@@ -73,6 +73,10 @@
{
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];
@@ -196,7 +200,12 @@
[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)
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m
index 591b40d0..8b7b98ce 100644
--- a/Source/SPNarrowDownCompletion.m
+++ b/Source/SPNarrowDownCompletion.m
@@ -269,9 +269,9 @@
for(i=0; i<[newFiltered count]; i++)
{
if(dictMode)
- item = NSArrayObjectAtIndex([newFiltered objectAtIndex:i], 0);
+ item = NSArrayObjectAtIndex(newFiltered, i);
else
- item = [NSArrayObjectAtIndex([newFiltered objectAtIndex:i], 0) objectForKey:@"display"];
+ item = [NSArrayObjectAtIndex(newFiltered, i) objectForKey:@"display"];
// If space in suggestion add space to allowed input chars
if(!spaceInSuggestion && [item rangeOfString:@" "].length) {
[textualInputCharacters addCharactersInString:@" "];