mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:07:43 +00:00
MacPDF: Make "Open With" and dropping files on dock tile work
I would've expected that there's some way to have this work automatically in an NSDocument-based application, but I haven't found it yet. So manually implement the delegate for now.
This commit is contained in:
parent
708d5e2fe6
commit
ff4b0e678b
1 changed files with 9 additions and 0 deletions
|
@ -35,4 +35,13 @@
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)application:(NSApplication*)sender openFile:(NSString*)filename
|
||||
{
|
||||
[[NSDocumentController sharedDocumentController]
|
||||
openDocumentWithContentsOfURL:[NSURL fileURLWithPath:filename]
|
||||
display:YES
|
||||
completionHandler:^(NSDocument*, BOOL, NSError*) {}];
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue