|
@@ -4594,6 +4594,13 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
|
|
|
} else if itemID == KMDocumentScanOCRToolbarItemIdentifier {
|
|
|
showOCRWindow()
|
|
|
} else if itemID == KMDocumentDigitalSignToolbarItemIdentifier {
|
|
|
+ if self.listView.document.permissionsStatus != .owner /*!self.pdfView.document!.allowsPrinting || !self.pdfView.document!.allowsCopying*/ {
|
|
|
+ let alert = NSAlert()
|
|
|
+ alert.alertStyle = .critical
|
|
|
+ alert.messageText = NSLocalizedString("This is a secured document. Editing is not permitted.", comment: "")
|
|
|
+ alert.runModal()
|
|
|
+ return
|
|
|
+ }
|
|
|
self.listView.toolMode = .textToolMode
|
|
|
toolbarItem.isSelected = !toolbarItem.isSelected
|
|
|
self.toolbarController.lastItemBox = toolbarItem
|