|
@@ -3915,12 +3915,11 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
|
|
|
//// 自定义裁剪区域
|
|
|
// self.cropCustomArea()
|
|
|
} else if (type == .bates || type == .headerAndFooter) {
|
|
|
+ if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
if (index == 1) {
|
|
|
- if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
- KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
var windowController: KMBaseWindowController = KMBaseWindowController()
|
|
|
|
|
|
if (type == .bates) {
|
|
@@ -3980,11 +3979,6 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
|
|
|
self.showBatchWindow(type: .RemoveHeaderFooter, files: [file])
|
|
|
}
|
|
|
} else if (index == 2) { //// 移除
|
|
|
- if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
- KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
if type == .headerAndFooter {
|
|
|
let savePanelAccessoryViewController = KMSavePanelAccessoryController()
|
|
|
let savePanel = NSSavePanel()
|
|
@@ -4157,11 +4151,6 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
|
|
|
return
|
|
|
}
|
|
|
} else if (type == .secure) { /// 安全
|
|
|
-// if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
-// KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
-// return
|
|
|
-// }
|
|
|
-//
|
|
|
if (index == 1) { /// 设置密码
|
|
|
if (!self.listView.document!.allowsCopying || !self.listView.document!.allowsPrinting) {
|
|
|
KMPasswordInputWindow.openWindow(window: self.view.window!, type: .owner, url: self.listView.document.documentURL) { [weak self] result, password in
|
|
@@ -4306,12 +4295,12 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
|
|
|
|
|
|
await NSWindow.currentWindow().beginSheet(controller.window!)
|
|
|
} else if type == .watermark {
|
|
|
+ if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
if index == 1 {
|
|
|
- if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
- KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
let controller = KMWatermarkWindowController(windowNibName: "KMWatermarkWindowController")
|
|
|
self.currentWindowController = controller
|
|
|
controller.pdfDocument = self.document
|
|
@@ -4329,11 +4318,6 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
|
|
|
// NSWindow.currentWindow().beginSheet(controller.window!)
|
|
|
NSWindow.currentWindow().beginSheet(controller.window!, completionHandler: nil)
|
|
|
} else if index == 2 {
|
|
|
- if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
- KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
let watermarks = self.listView.document.watermarks()
|
|
|
if (watermarks == nil || watermarks!.count <= 0) {
|
|
|
let alert = NSAlert()
|
|
@@ -4389,12 +4373,12 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
|
|
|
return
|
|
|
}
|
|
|
} else if type == .background {
|
|
|
+ if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
if index == 1 {
|
|
|
- if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
- KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
let controller = KMBackgroundWindowController(windowNibName: "KMBackgroundWindowController")
|
|
|
self.currentWindowController = controller
|
|
|
controller.pdfDocument = self.document
|
|
@@ -4412,11 +4396,6 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
|
|
|
|
|
|
await NSWindow.currentWindow().beginSheet(controller.window!)
|
|
|
} else if index == 2 {
|
|
|
- if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
- KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
guard let document = self.document else { return }
|
|
|
|
|
|
if !document.allowsPrinting || !document.allowsCopying {
|