diff options
-rw-r--r-- | macosx/HBController.m | 6 | ||||
-rw-r--r-- | macosx/HBTabView.m | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/macosx/HBController.m b/macosx/HBController.m index 776e78302..7dfa61709 100644 --- a/macosx/HBController.m +++ b/macosx/HBController.m @@ -196,6 +196,7 @@ // Register HBController's Window as a receiver for files/folders drag & drop operations [self.window registerForDraggedTypes:@[NSFilenamesPboardType]]; + [fMainTabView registerForDraggedTypes:@[NSFilenamesPboardType]]; // Set up the preset drawer fPresetsView = [[HBPresetsViewController alloc] initWithPresetManager:presetManager]; @@ -251,6 +252,11 @@ return fileURLs.count ? NSDragOperationGeneric : NSDragOperationNone; } +- (BOOL)prepareForDragOperation:(id<NSDraggingInfo>)sender +{ + return YES; +} + - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender { NSArray<NSURL *> *fileURLs = [self fileURLsFromPasteboard:[sender draggingPasteboard]]; diff --git a/macosx/HBTabView.m b/macosx/HBTabView.m index f0adc6544..dc20f0223 100644 --- a/macosx/HBTabView.m +++ b/macosx/HBTabView.m @@ -9,11 +9,16 @@ @implementation HBTabView --(NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender +- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender { return [self.dropDelegate draggingEntered:sender]; } +- (BOOL)prepareForDragOperation:(id<NSDraggingInfo>)sender +{ + return [self.dropDelegate prepareForDragOperation:sender]; +} + - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender { return [self.dropDelegate performDragOperation:sender]; |