Fix ability to open files other than those with .rsrc suffix.

This commit is contained in:
Uli Kusterer 2017-01-10 16:07:55 +01:00
parent 30936843c9
commit 08670082ee

View File

@ -2,8 +2,15 @@
#import "ApplicationDelegate.h"
#import "OpenPanelDelegate.h"
#import "ResourceDocument.h"
@implementation RKDocumentController
- (nullable Class)documentClassForType:(NSString *)typeName
{
return [ResourceDocument class];
}
- (int)runModalOpenPanel:(NSOpenPanel *)openPanel forTypes:(NSArray *)extensions
{
// set-up open panel (this happens every time, but no harm done)
@ -17,7 +24,7 @@
[openPanelAccessoryView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
// run panel
int button = [super runModalOpenPanel:openPanel forTypes:extensions];
int button = [super runModalOpenPanel:openPanel forTypes:nil/*extensions*/];
if(button == NSOKButton)
[openPanelDelegate setReadOpenPanelForFork:YES];
return button;