|
@@ -96,7 +96,11 @@ import Cocoa
|
|
|
listView.pdfListViewDelegate = self
|
|
|
listView.editingConfig().isSupportMultipleSelectEditingArea = true
|
|
|
if (document != nil) {
|
|
|
- listView.document = document
|
|
|
+// if (self.document!.isLocked) {
|
|
|
+//
|
|
|
+// } else {
|
|
|
+ listView.document = document
|
|
|
+// }
|
|
|
// listView.document.delegate = self
|
|
|
let autoScale = listView.autoScales
|
|
|
if !autoScale {
|
|
@@ -108,27 +112,27 @@ import Cocoa
|
|
|
self.toolbarController.listView = self.listView
|
|
|
}
|
|
|
|
|
|
-// override func viewDidAppear() {
|
|
|
-// super.viewDidAppear()
|
|
|
-//
|
|
|
-// if (self.document == nil) {
|
|
|
-// return
|
|
|
-// }
|
|
|
-// if (self.document!.isLocked == false) {
|
|
|
-// return
|
|
|
-// }
|
|
|
-// if (self.view.window == nil) {
|
|
|
-// return
|
|
|
-// }
|
|
|
-// KMPasswordInputWindow.openWindow(window: self.view.window!, url: self.document!.documentURL) { result , password in
|
|
|
-// if (result == .cancel) {
|
|
|
-// self.browserWindowController?.browser.closeTab()
|
|
|
-// return
|
|
|
-// }
|
|
|
-// self.document?.unlock(withPassword: password)
|
|
|
-// self.listView.document = self.document
|
|
|
-// }
|
|
|
-// }
|
|
|
+ override func viewDidAppear() {
|
|
|
+ super.viewDidAppear()
|
|
|
+
|
|
|
+ if (self.document == nil) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (self.document!.isLocked == false) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (self.view.window == nil) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ KMPasswordInputWindow.openWindow(window: self.view.window!, url: self.document!.documentURL) { result , password in
|
|
|
+ if (result == .cancel) {
|
|
|
+ self.browserWindowController?.browser.closeTab()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ self.document?.unlock(withPassword: password)
|
|
|
+ self.listView.document = self.document
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
override func viewWillDisappear() {
|
|
|
super.viewWillDisappear()
|