WIP on supporting more than one recent document when OS document history is disabled

This commit is contained in:
Michael Starke
2022-01-05 17:29:27 +01:00
parent c1155bd061
commit af960b0b38

View File

@@ -31,6 +31,8 @@
#import "KeePassKit/KeePassKit.h"
#import "KPKFormat+MPUTIDetection.h"
#import "NSApplication+MPAdditions.h"
@interface MPDocumentController ()
@property (strong) IBOutlet NSView *accessoryView;
@@ -43,6 +45,14 @@
@implementation MPDocumentController
- (BOOL)hasEditedDocuments {
MPAppDelegate *delegate = NSApp.mp_delegate;
if(delegate.isTerminating) {
// store all open documents once?!
}
return [super hasEditedDocuments];
}
- (void)beginOpenPanel:(NSOpenPanel *)openPanel forTypes:(NSArray *)inTypes completionHandler:(void (^)(NSInteger))completionHandler {
self.openPanel = openPanel;
if(!self.accessoryView) {