Browse Source

Merge branch 'develop_PDFReaderProNew' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderProNew

niehaoyu 11 tháng trước cách đây
mục cha
commit
5b74763b6c

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

@@ -2713,8 +2713,8 @@ extension KMMainViewController {
             self?.toolbarController.cancelSelected(KMToolbarToolCompressItemIdentifier)
 
             let batchWindowController = KMBatchOperateWindowController.sharedWindowController
-                    batchWindowController.window?.makeKeyAndOrderFront("")
-            let batchOperateFile = KMBatchOperateFile(filePath: filePaths.first!.path)
+//            batchWindowController.window?.makeKeyAndOrderFront("")
+            let batchOperateFile = KMBatchOperateFile(filePath: filePaths.first!.path, type: .Compress)
             batchWindowController.switchToOperateType(KMBatchOperationType.Compress, files: [batchOperateFile])
             batchWindowController.window?.makeKeyAndOrderFront("")
         }
@@ -4508,11 +4508,11 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
 
     func showBatchWindow(type: KMBatchOperationType, files: [KMFileAttribute]?) {
         let batchWindowController = KMBatchOperateWindowController.sharedWindowController
-                batchWindowController.window?.makeKeyAndOrderFront("")
+//        batchWindowController.window?.makeKeyAndOrderFront("")
         
         var array: [KMBatchOperateFile] = []
         for file in files! {
-            let batchOperateFile = KMBatchOperateFile(filePath: file.filePath)
+            let batchOperateFile = KMBatchOperateFile(filePath: file.filePath, type: type)
             array.append(batchOperateFile)
         }
         batchWindowController.switchToOperateType(type, files: array)

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -1446,8 +1446,8 @@ let LOCKED_KEY  = "locked"
             self.toolbarController.cancelSelected(KMToolbarToolCompressItemIdentifier)
 
             let batchWindowController = KMBatchOperateWindowController.sharedWindowController
-                    batchWindowController.window?.makeKeyAndOrderFront("")
-            let batchOperateFile = KMBatchOperateFile(filePath: files.first?.filePath ?? "")
+//            batchWindowController.window?.makeKeyAndOrderFront("")
+            let batchOperateFile = KMBatchOperateFile(filePath: files.first?.filePath ?? "", type: .AddPassword)
             batchWindowController.switchToOperateType(.AddPassword, files: [batchOperateFile])
             batchWindowController.window?.makeKeyAndOrderFront("")
         }