|
@@ -222,20 +222,22 @@ class KMPrintWindowController: NSWindowController, NetServiceBrowserDelegate {
|
|
if document != nil {
|
|
if document != nil {
|
|
if inputDocument != nil {
|
|
if inputDocument != nil {
|
|
document?.unlock(withPassword: password)
|
|
document?.unlock(withPassword: password)
|
|
- if (inputDocument!.allowsPrinting == false) {
|
|
|
|
- KMPasswordInputWindow.openWindow(window: NSApp.mainWindow!, type: .owner, url: (inputDocument!.documentURL)!) { result , password in
|
|
|
|
- if (result == .cancel) {
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- document!.unlock(withPassword: password!)
|
|
|
|
- KMPrintWindowController.openPrintView(document: document)
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (inputDocument!.allowsPrinting == false) {
|
|
|
|
+ KMPasswordInputWindow.openWindow(window: NSApp.mainWindow!, type: .owner, url: (inputDocument!.documentURL)!) { result , password in
|
|
|
|
+ if (result == .cancel) {
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- return
|
|
|
|
|
|
+
|
|
|
|
+ document!.unlock(withPassword: password!)
|
|
|
|
+ KMPrintWindowController.openPrintView(document: document)
|
|
}
|
|
}
|
|
|
|
+ return
|
|
} else {
|
|
} else {
|
|
KMPrintWindowController.openPrintView(document: document)
|
|
KMPrintWindowController.openPrintView(document: document)
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -249,7 +251,7 @@ class KMPrintWindowController: NSWindowController, NetServiceBrowserDelegate {
|
|
printOperation = document!.printOperation(for: printInfo, scalingMode: scalingMode, autoRotate: false)!
|
|
printOperation = document!.printOperation(for: printInfo, scalingMode: scalingMode, autoRotate: false)!
|
|
}
|
|
}
|
|
|
|
|
|
- printOperation.printPanel.options = [.showsPreview, .showsCopies, .showsPageRange, .showsPaperSize, .showsCopies, .showsPrintSelection, .showsScaling]
|
|
|
|
|
|
+ printOperation.printPanel.options = [.showsPreview, .showsCopies, .showsOrientation, .showsPageRange, .showsPaperSize, .showsCopies, .showsPrintSelection, .showsScaling]
|
|
let controller = KMPrintAccessoryController_OC(nibName: "KMPrintAccessoryController_OC", bundle: nil)
|
|
let controller = KMPrintAccessoryController_OC(nibName: "KMPrintAccessoryController_OC", bundle: nil)
|
|
printOperation.printPanel.addAccessoryController(controller)
|
|
printOperation.printPanel.addAccessoryController(controller)
|
|
|
|
|