|
@@ -337,22 +337,15 @@ extension KMHomeViewController {
|
|
if let _password = password {
|
|
if let _password = password {
|
|
windowC.myDocument.unlock(withPassword: _password)
|
|
windowC.myDocument.unlock(withPassword: _password)
|
|
}
|
|
}
|
|
- self.currentWindowController = windowC
|
|
|
|
|
|
|
|
let newDocument: CPDFDocument = CPDFDocument(url: url)
|
|
let newDocument: CPDFDocument = CPDFDocument(url: url)
|
|
windowC.itemClick = { [weak self] _ in
|
|
windowC.itemClick = { [weak self] _ in
|
|
- if let _currentWindow = self?.currentWindowController?.window {
|
|
|
|
- self?.view.window?.endSheet(_currentWindow)
|
|
|
|
- }
|
|
|
|
- self?.currentWindowController = nil
|
|
|
|
|
|
+ self?.km_endSheet()
|
|
}
|
|
}
|
|
|
|
|
|
windowC.resultCallback = { [weak self] _ in
|
|
windowC.resultCallback = { [weak self] _ in
|
|
- let windowController_secure: KMSecureEncryptWindowController = self?.currentWindowController as! KMSecureEncryptWindowController
|
|
|
|
- if let _currentWindow = self?.currentWindowController?.window {
|
|
|
|
- self?.view.window?.endSheet(_currentWindow)
|
|
|
|
- }
|
|
|
|
- self?.currentWindowController = nil
|
|
|
|
|
|
+ let windowController_secure: KMSecureEncryptWindowController = self?.kmCurrentWindowC as! KMSecureEncryptWindowController
|
|
|
|
+ self?.km_endSheet()
|
|
if let _password = password {
|
|
if let _password = password {
|
|
newDocument.unlock(withPassword: _password)
|
|
newDocument.unlock(withPassword: _password)
|
|
}
|
|
}
|
|
@@ -387,7 +380,7 @@ extension KMHomeViewController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- self.view.window?.beginSheet(windowC.window!)
|
|
|
|
|
|
+ self.km_beginSheet(windowC: windowC)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|