mirror of
https://github.com/nickshanks/ResKnife.git
synced 2025-03-22 13:29:59 +00:00
Fix ability to open files other than those with .rsrc suffix.
This commit is contained in:
parent
30936843c9
commit
08670082ee
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user