Browse Source

【2025】【综合】阅读界面代码整理

niehaoyu 2 months ago
parent
commit
2fd0fafbeb

File diff suppressed because it is too large
+ 9 - 1260
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift


+ 0 - 180
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift

@@ -1,180 +0,0 @@
-//
-//  KMMainViewController+UI.swift
-//  PDF Reader Pro
-//
-//  Created by wanjun on 2022/12/15.
-//
-
-import Foundation
-
-extension KMMainViewController {
-    //通知
-    func preferenceDidChangeNotification(notification:Notification) {
-        
-    }
-    
-    func convertNotesUsingPDFDocument(_ pdfDocument: CPDFDocument, callback: (()->Void)? = nil) {
-        guard let doc = self.listView.document else {
-            return
-        }
-        DispatchQueue.main.async {
-            self.beginProgressSheet(withMessage: "", maxValue: 0)
-            
-            let count = pdfDocument.pageCount
-            DispatchQueue.global().async {
-                self.model.addAnnotations.removeAll()
-                self.model.removeAnnotations.removeAll()
-                for i in 0..<count {
-                    let page = pdfDocument.page(at: i)
-                    
-                    for annotation in page?.annotations ?? [] {
-                        var newAnnotation: CPDFAnnotation?
-                        if let inkAnnotation = annotation as? CPDFInkAnnotation, inkAnnotation.contents.hasPrefix("<?xml version=\"1.0\" encoding=\"utf-8\"?>") {
-                            let table = KMTableAnnotation(KMNoteBounds: inkAnnotation.bounds, document: doc)
-                            table.border = inkAnnotation.border
-                            table.color = inkAnnotation.color
-                            table.createForm(withList: inkAnnotation.contents, andPaths: inkAnnotation.bezierPaths())
-                            table.updateAppearanceInk(withIsAdd: false)
-                            table.contents = annotation.contents
-                            newAnnotation = table
-                        }
-                        if let newAnnotation = newAnnotation {
-                            self.model.addAnnotations.append(newAnnotation)
-                            self.model.removeAnnotations.append(annotation)
-                        }
-                    }
-                    
-                }
-                
-                DispatchQueue.main.async {
-                    for i in 0..<self.model.addAnnotations.count {
-                        let newAnnotation = self.model.addAnnotations[i]
-                        let annotation = self.model.removeAnnotations[i]
-                        
-                        let page = annotation.page
-                        // this is only to make sure markup annotations generate the lineRects, for thread safety
-                        self.listView.addAnnotation(with: newAnnotation, to: page)
-                        self.listView.remove(annotation)
-                        if newAnnotation.contents != nil {
-                            if newAnnotation.contents.count == 0 {
-                                newAnnotation.autoUpdateString()
-                            }
-                        }
-                    }
-                    
-                    self.dismissProgressSheet()
-                    
-                    self.listView.undoManager?.removeAllActions()
-                    self.undoManager?.removeAllActions()
-                    
-                    // 清空数据
-                    self.model.addAnnotations.removeAll()
-                    self.model.removeAnnotations.removeAll()
-                    
-                    callback?()
-                }
-            }
-        }
-    }
-    
-    // MARK: - KMInterfaceThemeChangedProtocol
-    
-    override func interfaceThemeDidChanged(_ appearance: NSAppearance.Name) {
-        super.interfaceThemeDidChanged(appearance)
-                
-    }
-}
-
-
-//MARK: - ReadModel
-extension KMMainViewController {
-    
-    @objc func lookUpAction() {
-        let label = self.listView.currentSelection?.string() ?? ""
-        
-    }
-    
-    @objc func showInfoInFinder() {
-        
-    }
-    
-    @objc func NextPageAction() {
-        
-    }
-    
-    @objc func PreviousPageAction() {
-        
-    }
-    
-    @objc func TranslateItemAction() {
-        // 获取选中的文本
-        if let selection = self.listView.currentSelection?.string() {
-            // 进行翻译
-            let escapedText = selection.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
-            let urlStr = "https://translate.google.com/?sl=auto&amp;tl=zh-CN&amp;text=\(escapedText)"
-            if let url = URL(string: urlStr) {
-                NSWorkspace.shared.open(url)
-            }
-        } else {
-            print("No text selected.")
-        }
-    }
-    @objc func AutoScrollItemAction() {
-        //增加判断,如果是正在滚动,就停止,否则就开始滚动
-        self.listView.autoFlow()
-    }
-    
-    
-    @objc func cutAction(sender: NSMenuItem) {
-        
-    }
-    @objc func deleteAction(sender: NSMenuItem) {
-        
-    }
-    @objc func ColorsItemAction(sender: NSMenuItem) {
-        
-    }
-    @objc func LinesItemAction(sender: NSMenuItem) {
-        
-    }
-    @objc func EditNoteItemAction(sender: NSMenuItem) {
-        
-    }
-    @objc func AITranslateItemAction(sender: NSMenuItem) {
-        self.showAITypeChooseView(aiConfigType: .translate)
-    }
-    @objc func AIProofreadItemAction(sender: NSMenuItem) {
-        self.showAITypeChooseView(aiConfigType: .proofreading)
-    }
-    @objc func AIRewriteItemAction(sender: NSMenuItem) {
-        self.showAITypeChooseView(aiConfigType: .reWriting)
-    }
-    
-}
-
-
-// MARK: - KMSnapshotWindowControllerDelegate
-
-extension KMMainViewController: KMSnapshotWindowControllerDelegate {
-    func snapshotControllerWillClose(_ controller: KMSnapshotWindowController) {
-        
-    }
-    
-    func snapshotController(_ controller: KMSnapshotWindowController, miniaturizedRect isMiniaturize: Bool) -> NSRect {
-        return CGRectZero
-    }
-    
-    func snapshotControllerDidFinishSetup(_ controller: KMSnapshotWindowController) {
-    }
-}
-
-// MARK: - CPDFDocumentDelegate
-
-extension KMMainViewController: CPDFDocumentDelegate {
-    func documentDidBeginDocumentFind(_ document: CPDFDocument!) {
-    }
-    
-    func documentDidEndDocumentFind(_ document: CPDFDocument!) {
-    }
-}
-

+ 304 - 4
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -2249,6 +2249,142 @@ struct KMNMWCFlags {
         
     }
     
+    //文件对比
+    func openContentCompareVC(with pdfCompareContent: CPDFCompareContent?, results: [CPDFCompareResults], oldDocument: CPDFDocument, document: CPDFDocument) {
+        self.isCompareModel = true
+        
+        let compareContentView = KMCompareContentView()
+        compareContentView.oldDocument = oldDocument
+        compareContentView.document = document
+        compareContentView.compareResults = results
+        compareContentView.saveHandle = { [unowned self] view in
+            DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.25) { [unowned self] in
+                let saveController = KMCompareSaveWindow(windowNibName: "KMCompareSaveWindow")
+                self.currentWindowController = saveController
+                saveController.cancelHandle = { [unowned self] controller in
+                    self.view.window!.endSheet(controller.window!)
+                    self.currentWindowController = nil
+                }
+                
+                saveController.saveHandle = { [unowned self] controller, saveType in
+                    let folderPath = controller.fileSaveFolderPath
+                    if folderPath != nil {
+                        if !FileManager.default.fileExists(atPath: folderPath) {
+                            try? FileManager.default.createDirectory(atPath: folderPath, withIntermediateDirectories: true, attributes: nil)
+                        }
+#if VERSION_DMG
+#else
+                        let url = URL(fileURLWithPath: folderPath)
+                        let fileAccess = AppSandboxFileAccess()
+                        fileAccess?.persistPermissionURL(url)
+                        if let bookmarkData = try?url.bookmarkData(options: [.withSecurityScope]) {
+                            fileAccess?.bookmarkPersistanceDelegate.setBookmarkData(bookmarkData, for: url)
+                            let urlString = url.path
+                            let _url = URL(fileURLWithPath: urlString)
+                            fileAccess?.bookmarkPersistanceDelegate.setBookmarkData(bookmarkData, for: _url)
+                        }
+#endif
+                        var savePath: String
+                        
+                        switch saveType {
+                        case 0:
+                            let filePath = oldDocument.documentURL.path
+                            let fileName = filePath.deletingPathExtension.lastPathComponent
+                            
+                            savePath = "\(folderPath)/\(fileName)_compare\(filePath.extension)"
+                            savePath = self.getValidFilePath(savePath)
+                            oldDocument.write(to: URL(fileURLWithPath: savePath))
+                            NSWorkspace.shared.activateFileViewerSelecting([URL(fileURLWithPath: savePath)])
+                        case 1:
+                            let filePath = document.documentURL.path
+                            let fileName = filePath.deletingPathExtension.lastPathComponent
+                            
+                            savePath = "\(folderPath)/\(fileName)_compare\(filePath.extension)"
+                            savePath = self.getValidFilePath(savePath)
+                            document.write(to: URL(fileURLWithPath: savePath))
+                            NSWorkspace.shared.activateFileViewerSelecting([URL(fileURLWithPath: savePath)])
+                        case 2:
+                            let filePath = oldDocument.documentURL.path
+                            let fileName = filePath.deletingPathExtension.lastPathComponent
+                            
+                            savePath = "\(folderPath)/MergedCompareFile\(filePath.extension)"
+                            savePath = self.getValidFilePath(savePath)
+                            pdfCompareContent!.saveAsComparisonDocument(withFilePath: savePath)
+                            NSWorkspace.shared.activateFileViewerSelecting([URL(fileURLWithPath: savePath)])
+                        default:
+                            break
+                        }
+                    }
+                    
+                    self.view.window!.endSheet(controller.window!)
+                    self.currentWindowController = nil
+                }
+                
+                NSWindow.currentWindow().beginSheet(saveController.window!)
+            }
+        }
+        
+        compareContentView.closeHandle = { [unowned self] view in
+            self.isCompareModel = false
+            view.removeFromSuperview()
+        }
+        
+        compareContentView.autoresizingMask = [.width,.height]
+    }
+    
+    func openCoveringCompareVC(with pdfDocument: CPDFDocument) {
+        self.isCompareModel = true
+        
+        let coveringView = KMCompareCoveringView()
+        coveringView.pdfDocument = pdfDocument
+        coveringView.closeHandle = { [unowned self] view in
+            self.isCompareModel = false
+            view.removeFromSuperview()
+        }
+        
+        coveringView.saveHandle = { [unowned self] view in
+            let savePanel = NSSavePanel()
+            savePanel.nameFieldStringValue = "untitled"
+            savePanel.allowedFileTypes = ["pdf"]
+            savePanel.beginSheetModal(for: NSWindow.currentWindow()) { result in
+                if result == .OK {
+                    pdfDocument.write(to: savePanel.url!)
+                    NSWorkspace.shared.activateFileViewerSelecting([savePanel.url!])
+                }
+            }
+        }
+        
+        coveringView.autoresizingMask = [.width,.height]
+    }
+    
+    func getValidFilePath(_ oldPath: String) -> String {
+        let fileManager = FileManager.default
+        
+        do {
+            let fileAttributes = try fileManager.attributesOfItem(atPath: oldPath)
+            guard let fileType = fileAttributes[FileAttributeKey.type] as? String else {
+                return oldPath
+            }
+            
+            var i = 1
+            var newPath = oldPath
+            
+            while fileManager.fileExists(atPath: newPath) {
+                if fileType == FileAttributeType.typeDirectory.rawValue {
+                    newPath = oldPath + "(\(i))"
+                } else {
+                    let fileExtension = (oldPath as NSString).pathExtension
+                    newPath = ((oldPath as NSString).deletingPathExtension as NSString).appendingFormat("(\(i)).\(fileExtension)" as NSString) as String
+                }
+                i += 1
+            }
+            
+            return newPath
+        } catch {
+            print("Error getting file attributes: \(error)")
+            return oldPath
+        }
+    }
     //MARK: - TTS
     @IBAction func startSpeaking(_ sender: Any?) {
         self.showTTSWindow()
@@ -6005,11 +6141,175 @@ extension KMMainViewController: ComponentGroupDelegate {
     }
 
 }
+ 
+// MARK: - KMSnapshotWindowControllerDelegate
 
-//MARK: -
-//MARK: -
-//MARK: -
-//MARK: - 旧代码,需要用到的内容需要拖出来,写好注释
+extension KMMainViewController: KMSnapshotWindowControllerDelegate {
+    func snapshotControllerWillClose(_ controller: KMSnapshotWindowController) {
+        
+    }
+    
+    func snapshotController(_ controller: KMSnapshotWindowController, miniaturizedRect isMiniaturize: Bool) -> NSRect {
+        return CGRectZero
+    }
+    
+    func snapshotControllerDidFinishSetup(_ controller: KMSnapshotWindowController) {
+    }
+}
+
+// MARK: - CPDFDocumentDelegate
+
+extension KMMainViewController: CPDFDocumentDelegate {
+    func documentDidBeginDocumentFind(_ document: CPDFDocument!) {
+    }
+    
+    func documentDidEndDocumentFind(_ document: CPDFDocument!) {
+    }
+}
+
+
+// MARK: CDistanceMeasureInfoWindowControllerDelegate
+
+extension KMMainViewController : CDistanceMeasureInfoWindowControllerDelegate {
+    func distanceMeasureInfoWindowControllerSetting(_ distanceMeasureInfoWindowController: CDistanceMeasureInfoWindowController) {
+        let distanceSettingWC = CDistanceSettingWindowController(distanceMeasureInfo: self.distanceMeasureInfoWindowController!.measureInfo)
+        self.distanceMeasureInfoWindowController?.hideFloatingWindow()
+        distanceSettingWC.delegate = self
+        distanceSettingWC.startModal("")
+    }
+    
+    func cancelMeasureInfoWindowControllerSetting(_ distanceMeasureInfoWindowController: CDistanceMeasureInfoWindowController) {
+        
+    }
+}
+
+// MARK: CPerimeterMeasureInfoWindowControllerDelegate
+
+extension KMMainViewController : CPerimeterMeasureInfoWindowControllerDelegate {
+    func perimeterMeasureInfoWindowControllerSetting(_ perimeterMeasureInfoWindowController: CPerimeterMeasureInfoWindowController) {
+        let distanceSettingWC = CDistanceSettingWindowController(perimeterMeasureInfo: self.perimeterMeasureInfoWindowController!.measureInfo)
+        self.distanceMeasureInfoWindowController?.hideFloatingWindow()
+        distanceSettingWC.delegate = self
+        distanceSettingWC.startModal("")
+    }
+}
+
+// MARK: CAreaMeasureInfoWindowControllerDelegate
+
+extension KMMainViewController : CAreaMeasureInfoWindowControllerDelegate {
+    func areaMeasureInfoWindowControllerSetting(_ areaMeasureInfoWindowController: CAreaMeasureInfoWindowController) {
+        let areaSettingWC = CAreaSettingWindowController(measureInfo: self.areaMeasureInfoWindowController!.measureInfo)
+        self.areaMeasureInfoWindowController?.hideFloatingWindow()
+        areaSettingWC.delegate = self
+        areaSettingWC.startModal("")
+    }
+}
+
+// MARK: CDistanceSettingWindowControllerDelegate
+
+extension KMMainViewController : CDistanceSettingWindowControllerDelegate {
+    func distanceSettingWindowController(_ distanceSettingWindowController: CDistanceSettingWindowController, distanceMeasureInfo: CPDFDistanceMeasureInfo?) {
+        if distanceMeasureInfo != nil {
+            if self.listView.activeAnnotations.count > 0 {
+                if self.listView.activeAnnotation.isKind(of: CPDFLineAnnotation.self) {
+                    (self.listView.activeAnnotation as! CPDFLineAnnotation).measureInfo = distanceMeasureInfo
+                    self.listView.setNeedsDisplayAnnotationViewFor(self.listView.activeAnnotation.page)
+                }
+                self.distanceMeasureInfoWindowController?.reloadData(with: (self.listView.activeAnnotation as! CPDFLineAnnotation).measureInfo!)
+            } else {
+                distanceMeasureInfo?.leadLength = 0
+                self.listView.distanceMeasureInfo = distanceMeasureInfo
+                self.distanceMeasureInfoWindowController?.reloadData(with: self.listView.distanceMeasureInfo)
+                self.distanceMeasureInfoWindowController?.lengthLabel.stringValue = ""
+                self.distanceMeasureInfoWindowController?.angleLabel.stringValue = ""
+                self.distanceMeasureInfoWindowController?.xLabel.stringValue = ""
+                self.distanceMeasureInfoWindowController?.yLabel.stringValue = ""
+            }
+            
+            if let data = self.listView.activeAnnotation {
+             }
+        }
+        self.distanceMeasureInfoWindowController?.showWindow(self)
+    }
+    
+    func distanceSettingWindowController(_ distanceSettingWindowController: CDistanceSettingWindowController, perimeterMeasureInfo: CPDFPerimeterMeasureInfo?) {
+        if perimeterMeasureInfo != nil {
+            if self.listView.activeAnnotations.count > 0 {
+                if self.listView.activeAnnotation.isKind(of: CPDFPolylineAnnotation.self) {
+                    (self.listView.activeAnnotation as! CPDFPolylineAnnotation).measureInfo = perimeterMeasureInfo
+                    self.listView.setNeedsDisplayAnnotationViewFor(self.listView.activeAnnotation.page)
+                }
+                self.perimeterMeasureInfoWindowController?.reloadData(with: (self.listView.activeAnnotation as! CPDFPolylineAnnotation).measureInfo!)
+            } else {
+                self.listView.perimeterMeasureInfo = perimeterMeasureInfo
+                self.perimeterMeasureInfoWindowController?.reloadData(with: self.listView.perimeterMeasureInfo)
+                self.perimeterMeasureInfoWindowController?.lengthLabel.stringValue = ""
+                self.perimeterMeasureInfoWindowController?.angleLabel.stringValue = ""
+            }
+            
+            if let data = self.listView.activeAnnotation {
+             }
+        }
+        
+        self.perimeterMeasureInfoWindowController?.showWindow(self)
+    }
+}
+
+// MARK: CAreaSettingWindowControllerDelegate
+
+extension KMMainViewController : CAreaSettingWindowControllerDelegate {
+    func areaSettingWindowController(_ areaSettingWindowController: CAreaSettingWindowController, measureInfo: CPDFAreaMeasureInfo?) {
+        if self.listView.annotationType == .measureSquare && self.listView.toolMode == .CNoteToolMode {
+            if measureInfo != nil {
+                if self.listView.activeAnnotations.count > 0 {
+                    if self.listView.activeAnnotation.isKind(of: CPDFPolygonAnnotation.self) {
+                        (self.listView.activeAnnotation as! CPDFPolygonAnnotation).measureInfo = measureInfo
+                        self.listView.setNeedsDisplayAnnotationViewFor(self.listView.activeAnnotation.page)
+                    }
+                    self.areaMeasureInfoWindowController?.reloadData((self.listView.activeAnnotation as! CPDFPolygonAnnotation).measureInfo!)
+                } else {
+                    self.listView.squareAreaMeasureInfo = measureInfo
+                    self.areaMeasureInfoWindowController?.reloadData(self.listView.squareAreaMeasureInfo)
+                    self.areaMeasureInfoWindowController?.areaLabel.stringValue = ""
+                    self.areaMeasureInfoWindowController?.angleLabel.stringValue = ""
+                }
+            }
+            self.areaMeasureInfoWindowController?.showWindow(self)
+        } else if self.listView.annotationType == .measurePolyGon && self.listView.toolMode == .CNoteToolMode {
+            if measureInfo != nil {
+                if self.listView.activeAnnotations.count > 0 {
+                    if self.listView.activeAnnotation.isKind(of: CPDFPolygonAnnotation.self) {
+                        (self.listView.activeAnnotation as! CPDFPolygonAnnotation).measureInfo = measureInfo
+                        self.listView.setNeedsDisplayAnnotationViewFor(self.listView.activeAnnotation.page)
+                    }
+                    self.areaMeasureInfoWindowController?.reloadData((self.listView.activeAnnotation as! CPDFPolygonAnnotation).measureInfo!)
+                } else {
+                    self.listView.polygonAreaMeasureInfo = measureInfo
+                    self.areaMeasureInfoWindowController?.reloadData(self.listView.polygonAreaMeasureInfo)
+                    self.areaMeasureInfoWindowController?.areaLabel.stringValue = ""
+                    self.areaMeasureInfoWindowController?.angleLabel.stringValue = ""
+                }
+            }
+            self.areaMeasureInfoWindowController?.showWindow(self)
+        } else {
+            if measureInfo != nil {
+                if self.listView.activeAnnotations.count > 0 {
+                    if self.listView.activeAnnotation.isKind(of: CPDFPolygonAnnotation.self) {
+                        (self.listView.activeAnnotation as! CPDFPolygonAnnotation).measureInfo = measureInfo
+                        self.listView.setNeedsDisplayAnnotationViewFor(self.listView.activeAnnotation.page)
+                    }
+                    self.areaMeasureInfoWindowController?.reloadData((self.listView.activeAnnotation as! CPDFPolygonAnnotation).measureInfo!)
+                }
+            }
+            self.areaMeasureInfoWindowController?.showWindow(self)
+        }
+        
+        if measureInfo != nil {
+            if let data = self.listView.activeAnnotation {
+             }
+        }
+    }
+}
 
 extension KMMainViewController {
     

+ 0 - 8
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -785,9 +785,6 @@
 		9FDD0F67294AB645000C4DAD /* KMMainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FDD0F63294AB645000C4DAD /* KMMainViewController.xib */; };
 		9FDD0F68294AB645000C4DAD /* KMMainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FDD0F63294AB645000C4DAD /* KMMainViewController.xib */; };
 		9FDD0F69294AB645000C4DAD /* KMMainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FDD0F63294AB645000C4DAD /* KMMainViewController.xib */; };
-		9FDD0F6B294AD12C000C4DAD /* KMMainViewController+UI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FDD0F6A294AD12C000C4DAD /* KMMainViewController+UI.swift */; };
-		9FDD0F6C294AD12C000C4DAD /* KMMainViewController+UI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FDD0F6A294AD12C000C4DAD /* KMMainViewController+UI.swift */; };
-		9FDD0F6D294AD12C000C4DAD /* KMMainViewController+UI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FDD0F6A294AD12C000C4DAD /* KMMainViewController+UI.swift */; };
 		9FDD0F6F294AD13C000C4DAD /* KMMainViewController+Action.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FDD0F6E294AD13C000C4DAD /* KMMainViewController+Action.swift */; };
 		9FDD0F70294AD13C000C4DAD /* KMMainViewController+Action.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FDD0F6E294AD13C000C4DAD /* KMMainViewController+Action.swift */; };
 		9FDD0F71294AD13C000C4DAD /* KMMainViewController+Action.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FDD0F6E294AD13C000C4DAD /* KMMainViewController+Action.swift */; };
@@ -4837,7 +4834,6 @@
 		9FD0FA4A29D43D6800F2AB0D /* KMDeviceBrowserWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMDeviceBrowserWindowController.xib; sourceTree = "<group>"; };
 		9FDD0F62294AB645000C4DAD /* KMMainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMMainViewController.swift; sourceTree = "<group>"; };
 		9FDD0F63294AB645000C4DAD /* KMMainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMMainViewController.xib; sourceTree = "<group>"; };
-		9FDD0F6A294AD12C000C4DAD /* KMMainViewController+UI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "KMMainViewController+UI.swift"; sourceTree = "<group>"; };
 		9FDD0F6E294AD13C000C4DAD /* KMMainViewController+Action.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "KMMainViewController+Action.swift"; sourceTree = "<group>"; };
 		9FDD0F76294FEF64000C4DAD /* KMConvertPDFManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMConvertPDFManager.swift; sourceTree = "<group>"; };
 		9FDDFDBE2C93E4DC0051B6FC /* paddle.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = paddle.js; sourceTree = "<group>"; };
@@ -7425,7 +7421,6 @@
 			isa = PBXGroup;
 			children = (
 				BB48F86F2BE07D7B002DA996 /* Model */,
-				9FDD0F6A294AD12C000C4DAD /* KMMainViewController+UI.swift */,
 				9FDD0F6E294AD13C000C4DAD /* KMMainViewController+Action.swift */,
 				BBE0BDF229A22EF300440583 /* KMMainViewController+MenuAction.swift */,
 				BB61F2112B59120F00777E27 /* KMScroller.swift */,
@@ -14260,7 +14255,6 @@
 				BB0308562CC7443100F4AAC7 /* KMPDFToolbarManager.swift in Sources */,
 				AD07BC972D02CBA90075054B /* KMCompressSettingViewController.swift in Sources */,
 				9FCFEC702AC40F9B00EAD2CB /* CStampSignatureObject.swift in Sources */,
-				9FDD0F6B294AD12C000C4DAD /* KMMainViewController+UI.swift in Sources */,
 				BBF811E02B07178F0074874F /* KMExtractImageWindowController.swift in Sources */,
 				BB96A0B82AFCE45800559E24 /* WaitingView.swift in Sources */,
 				F3EF179C2CD5FF8D0007D364 /* KMNThumnailHeaderViewController.swift in Sources */,
@@ -15249,7 +15243,6 @@
 				89D2D2E3294C452B00BFF5FE /* KMPDFThumbnailView.swift in Sources */,
 				BB6B4C0D292F62B20071CA06 /* KMPDFThumbnialPageView.swift in Sources */,
 				9F8539D72943180000DF644E /* KMTabAppearance.swift in Sources */,
-				9FDD0F6C294AD12C000C4DAD /* KMMainViewController+UI.swift in Sources */,
 				BB451AAB2CF59F68003E1565 /* KMNoteController.swift in Sources */,
 				BB3AD6FA29935483004FC1AE /* Reachability.m in Sources */,
 				F3DB85F32CCA209600D0AFDE /* KMNBaseWindowController.swift in Sources */,
@@ -16194,7 +16187,6 @@
 				9F8539D82943180000DF644E /* KMTabAppearance.swift in Sources */,
 				BB1969E22B2856A900922736 /* KMSnapshotPDFView.swift in Sources */,
 				AD58F4182B1DAC0900299EE0 /* KMPrintSettingView.swift in Sources */,
-				9FDD0F6D294AD12C000C4DAD /* KMMainViewController+UI.swift in Sources */,
 				BB451AE62CF5BEC5003E1565 /* CPDFListView+AnnotationsCompare.swift in Sources */,
 				BB1BFF902AEA547B003EB179 /* NSButton+CustomAppearance.swift in Sources */,
 				9FD0D2B12AD51BCC00DA3FF8 /* CPDFListEditAnnotationViewController.swift in Sources */,