|
@@ -510,11 +510,7 @@ static NSCursor *cursorFromSelector(SEL selector, SEL fallback = nil) {
|
|
|
trackingArea = nil;
|
|
|
imeInputEventInProgress = false;
|
|
|
[self updateTrackingAreas];
|
|
|
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
|
|
|
[self registerForDraggedTypes:[NSArray arrayWithObject:NSPasteboardTypeFileURL]];
|
|
|
-#else
|
|
|
- [self registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
|
|
|
-#endif
|
|
|
markedText = [[NSMutableAttributedString alloc] init];
|
|
|
return self;
|
|
|
}
|
|
@@ -660,7 +656,6 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
|
|
Vector<String> files;
|
|
|
NSPasteboard *pboard = [sender draggingPasteboard];
|
|
|
|
|
|
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
|
|
|
NSArray *items = pboard.pasteboardItems;
|
|
|
for (NSPasteboardItem *item in items) {
|
|
|
NSString *path = [item stringForType:NSPasteboardTypeFileURL];
|
|
@@ -671,16 +666,6 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
|
|
free(utfs);
|
|
|
files.push_back(ret);
|
|
|
}
|
|
|
-#else
|
|
|
- NSArray *filenames = [pboard propertyListForType:NSFilenamesPboardType];
|
|
|
- for (NSString *ns in filenames) {
|
|
|
- char *utfs = strdup([ns UTF8String]);
|
|
|
- String ret;
|
|
|
- ret.parse_utf8(utfs);
|
|
|
- free(utfs);
|
|
|
- files.push_back(ret);
|
|
|
- }
|
|
|
-#endif
|
|
|
|
|
|
if (files.size()) {
|
|
|
OS_OSX::singleton->main_loop->drop_files(files, 0);
|