|
@@ -329,9 +329,7 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController,NSCo
|
|
|
|
|
|
self.detailInfoView.mouseDownCallback = { [weak self] (downEntered: Bool) in
|
|
|
if downEntered {
|
|
|
-// if (![IAPProductsManager defaultManager].isAvailableAdvancedPDFToOffice) {
|
|
|
- self?.convertActionVC()
|
|
|
-// }
|
|
|
+ self?.moreConvertInfoAction()
|
|
|
}
|
|
|
}
|
|
|
self.updateViewColor()
|
|
@@ -342,6 +340,8 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController,NSCo
|
|
|
// NotificationCenter.default.addObserver(self, selector: #selector(themeChanged(notification:)), name: NSNotification.Name("AppleInterfaceThemeChangedNotification"), object: nil)
|
|
|
DistributedNotificationCenter.default().addObserver(self, selector: #selector(themeChanged(notification:)), name: NSNotification.Name("AppleInterfaceThemeChangedNotification"), object: nil)
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
@objc func batchFilesCountNotification(notification: NSNotification) {
|
|
|
let arr: Array? = notification.object as? [KMBatchOperateFile]
|
|
|
self.files? = arr ?? []
|
|
@@ -455,7 +455,15 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController,NSCo
|
|
|
}
|
|
|
|
|
|
@IBAction func moreButtonAction(_ sender: NSButton) {
|
|
|
- self.convertActionVC()
|
|
|
+#if VERSION_DMG
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
+#else
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() {
|
|
|
+ self.convertActionVC()
|
|
|
+ } else {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
+ }
|
|
|
+#endif
|
|
|
self.buttonClicked_Cancel("")
|
|
|
}
|
|
|
|
|
@@ -545,8 +553,8 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController,NSCo
|
|
|
func collectionView(_ collectionView: NSCollectionView, viewForSupplementaryElementOfKind kind: NSCollectionView.SupplementaryElementKind, at indexPath: IndexPath) -> NSView {
|
|
|
let view = collectionView.makeSupplementaryView(ofKind: kind, withIdentifier:NSUserInterfaceItemIdentifier(rawValue: "convertHeader") , for: indexPath) as? KMConvertCollectionViewHeader
|
|
|
|
|
|
- view?.convertHeaderClickedCallBack = {
|
|
|
- self.convertActionVC()
|
|
|
+ view?.convertHeaderClickedCallBack = { [weak self] in
|
|
|
+ self?.moreConvertInfoAction()
|
|
|
}
|
|
|
return view ?? NSView()
|
|
|
}
|
|
@@ -591,6 +599,27 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController,NSCo
|
|
|
}
|
|
|
return type!
|
|
|
}
|
|
|
+
|
|
|
+ func moreConvertInfoAction() {
|
|
|
+ if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() == false {
|
|
|
+ #if VERSION_DMG
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() && IAPProductsManager.default().isAvailableAdvancedPDFToOffice() == false {
|
|
|
+ let limitWC = KMPurchaseLimitWindowController.currentLimitWC()
|
|
|
+ limitWC.continueBlock = { windowController in
|
|
|
+
|
|
|
+ }
|
|
|
+ limitWC.window?.center()
|
|
|
+ limitWC.showWindow(nil)
|
|
|
+ }
|
|
|
+ #else
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() {
|
|
|
+ self.convertActionVC()
|
|
|
+ } else {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
+ }
|
|
|
+ #endif
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
extension KMBatchOperateConvertViewController: NSCollectionViewDelegateFlowLayout {
|