os x: handle multiple dropped files on the window

Should fix #3076 (partially).

Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
Nyx0uf
2016-04-30 18:58:06 +02:00
committed by wm4
parent 949247d6e6
commit ed695ce689
+7 -2
View File
@@ -358,8 +358,13 @@
{
NSPasteboard *pboard = [sender draggingPasteboard];
if ([[pboard types] containsObject:NSURLPboardType]) {
NSURL *file_url = [NSURL URLFromPasteboard:pboard];
[self.adapter handleFilesArray:@[[file_url absoluteString]]];
NSArray *pbitems = [pboard readObjectsForClasses:@[[NSURL class]]
options:@{}];
NSMutableArray* ar = [[[NSMutableArray alloc] init] autorelease];
for (NSURL* url in pbitems) {
[ar addObject:[url path]];
}
[self.adapter handleFilesArray:ar];
return YES;
} else if ([[pboard types] containsObject:NSFilenamesPboardType]) {
NSArray *pbitems = [pboard propertyListForType:NSFilenamesPboardType];