Browse Source

[加解密] - 加密文档移除密码批量操作

liujiajie 11 tháng trước cách đây
mục cha
commit
81033dde9e

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/RemovePassword/New/View/KMRemovePasswordView.xib

@@ -6,7 +6,7 @@
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMRemovePasswordView" customModule="PDF_Master" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMRemovePasswordView" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
                 <outlet property="batchButton" destination="ICS-FO-MJ6" id="fJd-SR-Rpy"/>
                 <outlet property="cancelButton" destination="VMK-65-rig" id="4ok-JO-85q"/>

+ 4 - 8
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -4255,13 +4255,7 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
                             self.currentWindowController = nil
                             
                             self.toolbarController.cancelSelected(KMToolbarToolCompressItemIdentifier)
-                            
-//                            let batchWindowController = KMBatchOperateWindowController.sharedWindowController
-//                                    batchWindowController.window?.makeKeyAndOrderFront("")
-//                            let batchOperateFile = KMBatchOperateFile(filePath: files.first?.filePath ?? "")
-//                            batchWindowController.switchToOperateType(.RemovePassword, files: [batchOperateFile])
-//                            batchWindowController.window?.makeKeyAndOrderFront("")
-                            
+
                             let baseWindowController = KMBatchOperateBaseWindowController(windowNibName: "KMBatchOperateBaseWindowController")
                             if #available(macOS 10.13, *) {
                                 baseWindowController.window?.makeKeyAndOrderFront(nil)
@@ -4270,8 +4264,10 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
                             }
                             let arr = NSMutableArray()
                             let file = KMBatchOperateFile(filePath: self.listView!.document!.documentURL!.path, type: .RemovePassword)
+                            file.password = document?.password ?? ""
                             arr.add(file)
-                            baseWindowController.checkNeedPasswordSwitchToOperateType(operateType: .RemovePassword, files: arr as! [KMBatchOperateFile])
+//                            baseWindowController.checkNeedPasswordSwitchToOperateType(operateType: .RemovePassword, files: arr as! [KMBatchOperateFile])
+                            baseWindowController.switchToOperateType(.RemovePassword, files: arr as! [KMBatchOperateFile])
                         }
                         
                         controller.cancelAction = { [unowned self] controller in