mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 08:52:20 +00:00
WIP on supporting more than one recent document when OS document history is disabled
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user