Browse Source

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

niehaoyu 1 year ago
parent
commit
6d37ab1aa4
23 changed files with 485 additions and 118 deletions
  1. 10 0
      PDF Office/PDF Master/Class/Appearance/KMAppearance.swift
  2. 7 7
      PDF Office/PDF Master/Class/Batch/View/KMConvertCollectionViewHeader.swift
  3. 1 1
      PDF Office/PDF Master/Class/Batch/View/KMConvertCollectionViewHeader.xib
  4. 69 19
      PDF Office/PDF Master/Class/ChromiumTabs/KMBrowserWindowController.swift
  5. 3 0
      PDF Office/PDF Master/Class/Common/Category/NSObject+KMExtension.swift
  6. 50 1
      PDF Office/PDF Master/Class/Document/KMMainDocument.swift
  7. 38 38
      PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMConvertWindowController.swift
  8. 8 7
      PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMToolCompareWindowController.swift
  9. 5 5
      PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMToolCompareWindowController.xib
  10. 1 1
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Controller/KMBookmarkController.xib
  11. 62 3
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Controller/KMBookmarkSheetController.swift
  12. 7 1
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Controller/KMBookmarkSheetController.xib
  13. 45 1
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Model/KMBookmark.swift
  14. 13 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Model/KMFileBookmark.swift
  15. 12 0
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Model/KMFolderBookmark.swift
  16. 1 1
      PDF Office/PDF Master/Class/PDFTools/TTS/WindowController/KMTTSWindowController.swift
  17. 7 0
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift
  18. 2 1
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/WindowController/KMAnnotationFontWindowController.swift
  19. 20 20
      PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseFirstTrialWindowController.swift
  20. 5 5
      PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseLimitWindowController.swift
  21. 3 3
      PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.m
  22. 16 0
      PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj
  23. 100 4
      PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

+ 10 - 0
PDF Office/PDF Master/Class/Appearance/KMAppearance.swift

@@ -616,6 +616,16 @@ let KMImageNameElsei = "KMImageNameElsei";
         return NSColor.km_init(hex: "#DFE1E5")
     }
     
+    @objc class func controlBackgroundColor() -> NSColor {
+        if (!KMAppearance.isSupportNewColor()) {
+            return NSColor(white: 246/255.0, alpha: 1)
+        }
+        if let _color = NSColor(named: "KMControlBackgroundColor") {
+            return _color
+        }
+        return NSColor(white: 246/255.0, alpha: 1)
+    }
+    
     class func isSupportNewColor() -> Bool {
         if #available(macOS 10.14, *) {
             return true

+ 7 - 7
PDF Office/PDF Master/Class/Batch/View/KMConvertCollectionViewHeader.swift

@@ -57,19 +57,19 @@ class KMConvertCollectionViewHeader: KMBaseXibView{
         super.mouseUp(with: event)
         let point = event.locationInWindow
         let newPoint = convert(point, from: nil)
-//        if let data = self.containerView?.frame.contains(newPoint), data {
-//            if !IAPProductsManager.defaultManager().isAvailableAdvancedPDFToOffice {
-//                self.convertHeaderClickedCallBack?()
-//            }
-//        }
+        if let data = self.containerView?.frame.contains(newPoint), data {
+            if !IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
+                self.convertHeaderClickedCallBack?()
+            }
+        }
     }
     
     @objc func IAPProductPurchasedNotification(notification: Notification) {
-//        containerView.isHidden = true
+        containerView.isHidden = true
     }
     
     @objc func IAPProductRestoreFinishedNotification(notification: Notification) {
-//        containerView.isHidden = true
+        containerView.isHidden = true
     }
     
 }

+ 1 - 1
PDF Office/PDF Master/Class/Batch/View/KMConvertCollectionViewHeader.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="KMConvertCollectionViewHeader" customModule="PDF_Master" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMConvertCollectionViewHeader" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
                 <outlet property="containerView" destination="65M-xr-NTJ" id="CbO-vk-fBP"/>
                 <outlet property="imageView" destination="JZM-NO-k0s" id="hEv-AK-w8s"/>

+ 69 - 19
PDF Office/PDF Master/Class/ChromiumTabs/KMBrowserWindowController.swift

@@ -20,12 +20,29 @@ import Cocoa
     var rightToolbarItemView: NSView!
     
     private var homeVC: KMHomeViewController?
+    
+    deinit {
+        KMPrint("KMBrowserWindowController deinit...")
+        
+//        self.removeObserverForAppearanceChange()
+        DistributedNotificationCenter.default().removeObserver(self)
+        NotificationCenter.default.removeObserver(self)
+    }
+    
+    override func loadWindow() {
+        super.loadWindow()
+        
+//        self.window?.titlebarAppearsTransparent = true
+    }
 
     override func windowDidLoad() {
         super.windowDidLoad()
         
         NSImage.makeTextAlignImages()
         window?.backgroundColor = NSColor.km_init(hex: "#DFE1E5")
+        self.window?.appearance = NSApp.appearance
+        self.window?.titlebarAppearsTransparent = true
+//        self.window?.standardWindowButton(.closeButton)?.superview?.needsLayout = true
         
 //        window?.setFrameAutosaveName("")
         rightTabStripView_.delete = self
@@ -35,12 +52,13 @@ import Cocoa
         homeRightTabStripView_.homeRightSearchField.delegate = self
         
         isMultiTabMode = true
-        addObserverForAppearanceChange()
+//        self.addObserverForAppearanceChange()
         
         refreshToolBar(homeToolState: .Home)
         
         NotificationCenter.default.addObserver(self, selector: #selector(closeAllTabs(_:)), name: NSNotification.Name.init(rawValue: "KMTabControllerCloseAllTabs"), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(openNewWindow(_:)), name: NSNotification.Name.init(rawValue: "KMTabControllerOpenNewWindow"), object: nil)
+        DistributedNotificationCenter.default().addObserver(self, selector: #selector(_themeChanged), name: NSApplication.interfaceThemeChangedNotification, object: nil)
         
 //        if (KMWelcomeWindowController.welcomeHasShow() == false) {
 //            //AI 版本禁掉首次开启帮助文档
@@ -101,30 +119,62 @@ import Cocoa
     override func layoutSubviews() {
         super.layoutSubviews()
         
-        if let button = (self.window as? CTBrowserWindow)?.standardWindowButton(.closeButton) {
-            button.frame = NSMakeRect(button.frame.minX, 0, button.frame.width, button.frame.height)
-        }
-        if let button = (self.window as? CTBrowserWindow)?.standardWindowButton(.zoomButton) {
-            button.frame = NSMakeRect(button.frame.minX, 0, button.frame.width, button.frame.height)
-        }
-        if let button = (self.window as? CTBrowserWindow)?.standardWindowButton(.miniaturizeButton) {
-            button.frame = NSMakeRect(button.frame.minX, 0, button.frame.width, button.frame.height)
-        }
+//        if let button = (self.window as? CTBrowserWindow)?.standardWindowButton(.closeButton) {
+//            button.frame = NSMakeRect(button.frame.minX, 0, button.frame.width, button.frame.height)
+//        }
+//        if let button = (self.window as? CTBrowserWindow)?.standardWindowButton(.zoomButton) {
+//            button.frame = NSMakeRect(button.frame.minX, 0, button.frame.width, button.frame.height)
+//        }
+//        if let button = (self.window as? CTBrowserWindow)?.standardWindowButton(.miniaturizeButton) {
+//            button.frame = NSMakeRect(button.frame.minX, 0, button.frame.width, button.frame.height)
+//        }
     }
     
     // MARK: Dark&Light
     
-    func addObserverForAppearanceChange() -> Void {
-        window?.contentView!.addObserver(self, forKeyPath: "effectiveAppearance", options: .new, context: nil)
-    }
+//    func addObserverForAppearanceChange() -> Void {
+//        window?.contentView?.addObserver(self, forKeyPath: "effectiveAppearance", options: .new, context: nil)
+//    }
     
-    func removeObserverForAppearanceChange() -> Void {
-        window?.contentView!.removeObserver(self, forKeyPath: "effectiveAppearance")
-    }
+//    func removeObserverForAppearanceChange() -> Void {
+//        window?.contentView?.removeObserver(self, forKeyPath: "effectiveAppearance")
+//    }
     
-    override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
-        if keyPath == "effectiveAppearance" {
-            updateViewColor()
+//    override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
+//        if keyPath == "effectiveAppearance" {
+//            self.updateViewColor()
+//        }
+//    }
+    
+    @objc private func _themeChanged(_ sender: Notification) {
+        if let data = self.window?.appearance?.name, data == .darkAqua {
+            self.window?.appearance = .init(named: .aqua)
+        } else {
+            self.window?.appearance = .init(named: .darkAqua)
+        }
+        
+        Task { @MainActor in
+//            self.interfaceThemeDidChanged(self.window?.appearance?.name ?? .aqua)
+            self.updateViewColor()
+            
+//            _themeChanged
+//            let selector = NSSelectorFromString("_themeChanged:")
+//            let mainWindow = self.window
+//            var responder = mainWindow?.firstResponder
+//            
+//            while (responder != nil) {
+//                KMPrint("res: \(responder)")
+//                
+//                if self.isEqual(to: responder) {
+//                    responder = responder?.nextResponder
+//                    continue
+//                }
+//                if let res = responder?.responds(to: selector), res {
+//                    responder?.perform(selector, with: sender)
+//                }
+//                
+//                responder = responder!.nextResponder
+//            }
         }
     }
     

+ 3 - 0
PDF Office/PDF Master/Class/Common/Category/NSObject+KMExtension.swift

@@ -671,6 +671,9 @@ extension NSApplication {
     }
 }
 
+@objc protocol KMInterfaceThemeChangedProtocol: NSObjectProtocol {
+    @objc optional func interfaceThemeChanged(_ appearance: NSAppearance.Name)
+}
 
 // MARK: - NSOutlineView
 

+ 50 - 1
PDF Office/PDF Master/Class/Document/KMMainDocument.swift

@@ -646,9 +646,58 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
     }
     
     @IBAction func addBookmark(_ sender: Any?) {
-        KMPrint("addBookmark")
+        guard let item = sender as? NSMenuItem else {
+            return
+        }
+        
+        var bookmarkSheetController: KMBookmarkSheetController?
+        if item.tag == 2 {
+            KMPrint("Edit Bookmark")
+        } else if item.tag == 1 {
+            KMPrint("session Bookmark")
+            bookmarkSheetController = KMBookmarkSheetController.showBookmarkSheetController(type: .session)
+        } else if item.tag == 0 {
+            KMPrint("add Bookmark")
+            bookmarkSheetController = KMBookmarkSheetController.showBookmarkSheetController(type: .bookmark)
+        }
+        
+        bookmarkSheetController?.cancelAction = { [unowned self] controller, type in
+            
+        }
+        
+        bookmarkSheetController?.doneAction = { [unowned self] controller, type, label in
+            let folder = controller.selectedFolder
+            var bookmark: KMBookmark?
+
+            switch type {
+            case .bookmark:
+                let mainViewController = mainViewController
+                
+                if let page = mainViewController?.listView.currentPage() {
+                    let pageIndex = page.pageIndex
+                    bookmark = KMBookmark.bookmark(url: self.fileURL!, pageIndex: pageIndex(), label: label)
+                }
+//            case .setup:
+//                if let setup = currentDocumentSetup {
+//                    bookmark = SKBookmark.bookmark(withSetup: setup, label: label)
+//                }
+            case .session:
+                let setups = NSApp.orderedDocuments.compactMap { $0.value(forKey:"currentDocumentSetup") }
+                bookmark = KMBookmark.bookmarkSession(setups: setups as NSArray, label: label)
+            default:
+                break
+            }
+
+            if let bookmark = bookmark {
+                if let mutableChildren = folder?.mutableArrayValue(forKey: "children") as? NSMutableArray {
+                    mutableChildren.add(bookmark)
+                }
+            }
+        }
     }
     
+    
+    
     @IBAction func showWindow(_ sender: Any?) {
         KMPrint("showWindow")
     }

+ 38 - 38
PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMConvertWindowController.swift

@@ -253,7 +253,7 @@ class KMConvertWindowController: NSWindowController, NSTextFieldDelegate, NSWind
         // 桌机版
         wordItem.tag = convertSample.rawValue
         isShowAdvanced = true
-        if IAPProductsManager.default().isAvailableAllFunction {
+        if IAPProductsManager.default().isAvailableAllFunction() {
             if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
                 convertSample = .AdvancedWord
                 wordItem.tag = convertSample.rawValue
@@ -387,45 +387,45 @@ class KMConvertWindowController: NSWindowController, NSTextFieldDelegate, NSWind
         excelStyleBox.isHidden = true
 #if VERSION_FREE
         // 座机版
-        //    if !(IAPProductsManager.defaultManager().isAvailableAllFunction) {
-        //        moreLabelString = KMLocalizedString("The first 10 pages for free. More precise one.", nil)
-        //    } else {
-        //        if !(IAPProductsManager.defaultManager().isAvailableAdvancedPDFToOffice) {
-        if .Word == self.convertType {
-            moreLabelString = KMLocalizedString("Export PDF to Word and other Microsoft Office formats", nil)
-        } else if self.convertType == .AdvancedWord ||
-            .Excel == self.convertType ||
-            .PPT == self.convertType ||
-            .CSV == self.convertType ||
-            .RTF == self.convertType ||
-            .GIF == self.convertType ||
-            .TIFF == self.convertType ||
-            .JP2 == self.convertType ||
-            .BMP == self.convertType ||
-            .TGA == self.convertType {
+        if !(IAPProductsManager.default().isAvailableAllFunction()) {
             moreLabelString = KMLocalizedString("The first 10 pages for free. More precise one.", nil)
+        } else {
+            if !(IAPProductsManager.default().isAvailableAdvancedPDFToOffice()) {
+                if .Word == self.convertType {
+                    moreLabelString = KMLocalizedString("Export PDF to Word and other Microsoft Office formats", nil)
+                } else if self.convertType == .AdvancedWord ||
+                    .Excel == self.convertType ||
+                    .PPT == self.convertType ||
+                    .CSV == self.convertType ||
+                    .RTF == self.convertType ||
+                    .GIF == self.convertType ||
+                    .TIFF == self.convertType ||
+                    .JP2 == self.convertType ||
+                    .BMP == self.convertType ||
+                    .TGA == self.convertType {
+                    moreLabelString = KMLocalizedString("The first 10 pages for free. More precise one.", nil)
+                }
+            }
         }
-        //        }
-        //    }
         
 #else
         // 付费版
-        //    if !(IAPProductsManager.defaultManager().isAvailableAdvancedPDFToOffice) {
-        if .Word == self.convertType {
-            moreLabelString = KMLocalizedString("Export PDF to Word and other Microsoft Office formats", nil)
-        } else if self.convertType == .AdvancedWord ||
-            .Excel == self.convertType ||
-            .PPT == self.convertType ||
-            .CSV == self.convertType ||
-            .RTF == self.convertType ||
-            .GIF == self.convertType ||
-            .TIFF == self.convertType ||
-            .JP2 == self.convertType ||
-            .BMP == self.convertType ||
-            .TGA == self.convertType {
-            moreLabelString = KMLocalizedString("The first 10 pages for free. More precise one.", nil)
+        if !(IAPProductsManager.default().isAvailableAdvancedPDFToOffice()) {
+            if .Word == self.convertType {
+                moreLabelString = KMLocalizedString("Export PDF to Word and other Microsoft Office formats", nil)
+            } else if self.convertType == .AdvancedWord ||
+                .Excel == self.convertType ||
+                .PPT == self.convertType ||
+                .CSV == self.convertType ||
+                .RTF == self.convertType ||
+                .GIF == self.convertType ||
+                .TIFF == self.convertType ||
+                .JP2 == self.convertType ||
+                .BMP == self.convertType ||
+                .TGA == self.convertType {
+                moreLabelString = KMLocalizedString("The first 10 pages for free. More precise one.", nil)
+            }
         }
-        //    }
 #endif
         
         if convertType.rawValue >= 7 && convertType.rawValue <= 14 {
@@ -659,10 +659,10 @@ class KMConvertWindowController: NSWindowController, NSTextFieldDelegate, NSWind
         }
     }
     @IBAction func buttonClicked_Batch(_ sender: NSButton) {
-        //        if !IAPProductsManager.defaultManager().isAvailableAllFunction {
-        //            KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
-        //            return
-        //        }
+        if !IAPProductsManager.default().isAvailableAllFunction() {
+            KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
+            return
+        }
         if self.pdfDocument?.documentURL == nil {
             NSSound.beep()
             return

+ 8 - 7
PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMToolCompareWindowController.swift

@@ -9,7 +9,7 @@ import Cocoa
 
 var currentWindowController: KMToolCompareWindowController? = nil
 
-class KMToolCompareWindowController: NSWindowController, NSWindowDelegate{
+@objcMembers class KMToolCompareWindowController: NSWindowController, NSWindowDelegate{
     var type: KMCompareWithToolType?
     
     lazy var payConvertCompareViewController: KMConvertComparePayViewController? = {
@@ -120,13 +120,14 @@ class KMToolCompareWindowController: NSWindowController, NSWindowDelegate{
         super.windowDidLoad()
 #if VERSION_DMG
         IAPProductsManager.default().loadProducts()
-        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductLoadedNotification(notification:)), name: NSNotification.Name("KMIAPProductLoadedNotification"), object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(IAPSubscriptionLoadedNotification(notification:)), name: NSNotification.Name("KMIAPSubscriptionLoadedNotification"), object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductPurchasedNotification(notification:)), name: NSNotification.Name("KMIAPProductPurchasedNotification"), object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductFailedNotification(notification:)), name: NSNotification.Name("KMIAPProductFailedNotification"), object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductRestoreFinishedNotification(notification:)), name: NSNotification.Name("KMIAPProductRestoreFinishedNotification"), object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductRestoreFailedNotification(notification:)), name: NSNotification.Name("KMIAPProductRestoreFailedNotification"), object: nil)
+       
 #endif
+        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductLoadedNotification(notification:)), name: NSNotification.Name(NSNotification.Name.KMIAPProductLoaded.rawValue), object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(IAPSubscriptionLoadedNotification(notification:)), name: NSNotification.Name(NSNotification.Name.KMIAPSubscriptionLoaded.rawValue), object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductPurchasedNotification(notification:)), name: NSNotification.Name(NSNotification.Name.KMIAPProductPurchased.rawValue), object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductFailedNotification(notification:)), name: NSNotification.Name(NSNotification.Name.KMIAPProductFailed.rawValue), object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductRestoreFinishedNotification(notification:)), name: NSNotification.Name(NSNotification.Name.KMIAPProductRestoreFinished.rawValue), object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductRestoreFailedNotification(notification:)), name: NSNotification.Name(NSNotification.Name.KMIAPProductRestoreFailed.rawValue), object: nil)
         self.window?.backgroundColor = NSColor(red: 36.0/255.0, green:37.0/255.0, blue:39.0/255.0, alpha:1.0)
         self.window?.isMovableByWindowBackground = true
 

+ 5 - 5
PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMToolCompareWindowController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22154" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22154"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -24,16 +24,16 @@
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <box boxType="custom" borderType="none" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="itV-9f-OvL">
-                        <rect key="frame" x="0.0" y="0.0" width="596" height="404"/>
+                        <rect key="frame" x="0.0" y="0.0" width="596" height="433"/>
                         <view key="contentView" id="2J4-Kq-rG7">
-                            <rect key="frame" x="0.0" y="0.0" width="596" height="404"/>
+                            <rect key="frame" x="0.0" y="0.0" width="596" height="433"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         </view>
                     </box>
                 </subviews>
                 <constraints>
                     <constraint firstAttribute="bottom" secondItem="itV-9f-OvL" secondAttribute="bottom" id="0yA-eX-Jbe"/>
-                    <constraint firstItem="itV-9f-OvL" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="DnU-fE-4f1"/>
+                    <constraint firstItem="itV-9f-OvL" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="-29" id="5U6-LS-Djh"/>
                     <constraint firstItem="itV-9f-OvL" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="qpL-Z5-ZuV"/>
                     <constraint firstAttribute="trailing" secondItem="itV-9f-OvL" secondAttribute="trailing" id="xL9-xv-52W"/>
                 </constraints>

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Controller/KMBookmarkController.xib

@@ -38,7 +38,7 @@
                                     <subviews>
                                         <outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" typeSelect="NO" autosaveName="SKBookmarksTable" rowHeight="16" headerView="DUP-Q2-ASL" indentationPerLevel="13" outlineTableColumn="qcP-Ly-Zi3" id="O1w-IL-33b" customClass="SKOutlineView">
                                             <rect key="frame" x="0.0" y="0.0" width="512" height="184"/>
-                                            <autoresizingMask key="autoresizingMask"/>
+                                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                             <size key="intercellSpacing" width="3" height="2"/>
                                             <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                             <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>

+ 62 - 3
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Controller/KMBookmarkSheetController.swift

@@ -7,12 +7,71 @@
 
 import Cocoa
 
+
+typealias KMBookmarkSheetControllerDoneAction = (_ controller: KMBookmarkSheetController, _ type: KMBookmarkType, _ label: String) -> ()
+typealias KMBookmarkSheetControllerCancelAction = (_ controller: KMBookmarkSheetController, _ type: KMBookmarkType) -> ()
+
 class KMBookmarkSheetController: NSWindowController {
+    @IBOutlet weak var folderPopUp: NSPopUpButton!
+    @IBOutlet weak var bookmarkTextField: NSTextField!
+    
+    var doneAction: KMBookmarkSheetControllerDoneAction?
+    var cancelAction: KMBookmarkSheetControllerCancelAction?
+    
+    var type: KMBookmarkType = .bookmark
 
-    override func windowDidLoad() {
-        super.windowDidLoad()
+    static func showBookmarkSheetController(type: KMBookmarkType) -> KMBookmarkSheetController {
+        let controller = KMBookmarkSheetController.init(windowNibName: "KMBookmarkSheetController")
+        controller.type = type
+        NSWindow.currentWindow().beginSheet(controller.window!)
+        
+        return controller
+    }
 
-        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
+    func addMenuItems(forBookmarks bookmarks: [KMBookmark], level: Int, toMenu menu: NSMenu) {
+        for bm in bookmarks {
+            if bm.bookmarkType == .folder {
+                let label = bm.label
+                let item = menu.addItem(withTitle: label, action: nil, keyEquivalent: "")
+                item.setImageAndSize(bm.icon)
+                item.indentationLevel = level
+                item.representedObject = bm
+                addMenuItems(forBookmarks: bm.children, level: level + 1, toMenu: menu)
+            }
+        }
+    }
+    
+    // MARK: Sheet Presentation
+    
+    func beginSheetModal(for window: NSWindow, completionHandler handler: @escaping (NSApplication.ModalResponse) -> Void) {
+//        let bookmarkController = KMBookmarkController.sharedBookmarkController()
+//        let root = bookmarkController.bookmarkRoot()
+//        folderPopUp.removeAllItems()
+//        addMenuItems(forBookmarks: [root], level: 0, toMenu: folderPopUp.menu!)
+//        folderPopUp.selectItem(at: 0)
+//        
+//
+//        super.window?.beginSheet(window, completionHandler: { response in
+//            handler(response)
+//        })
+//        super.beginSheetModal(for: window) { response in
+//            handler(response)
+//        }
+    }
+    
+    // MARK: Accessors
+    
+    var selectedFolder: KMBookmark? {
+        return folderPopUp.selectedItem?.representedObject as? KMBookmark
+    }
+    
+    @IBAction func cancelButtonAction(_ sender: Any) {
+        self.cancelAction?(self, type)
+        self.window?.close()
+    }
+    
+    @IBAction func doneButtonAction(_ sender: Any) {
+        self.doneAction?(self, type, bookmarkTextField.stringValue)
     }
     
 }

+ 7 - 1
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Controller/KMBookmarkSheetController.xib

@@ -8,6 +8,8 @@
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="KMBookmarkSheetController" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
+                <outlet property="bookmarkTextField" destination="p8e-MI-ByW" id="1fq-NO-s3r"/>
+                <outlet property="folderPopUp" destination="plc-mT-b5y" id="n7t-l2-yr6"/>
                 <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
             </connections>
         </customObject>
@@ -46,6 +48,7 @@ DQ
                                 </buttonCell>
                                 <connections>
                                     <accessibilityConnection property="link" destination="zqw-vB-SGL" id="Hgc-3q-yde"/>
+                                    <action selector="doneButtonAction:" target="-2" id="yEz-I2-vKT"/>
                                 </connections>
                             </button>
                             <button imageHugsTitle="YES" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="zqw-vB-SGL">
@@ -58,6 +61,9 @@ DQ
 Gw
 </string>
                                 </buttonCell>
+                                <connections>
+                                    <action selector="cancelButtonAction:" target="-2" id="a9d-Ar-EB5"/>
+                                </connections>
                             </button>
                             <textField focusRingType="none" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="p8e-MI-ByW">
                                 <rect key="frame" x="94" y="82" width="236" height="22"/>
@@ -76,7 +82,7 @@ Gw
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
                                 <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="Ez5-vL-MEw" id="gFv-pL-Na1">
                                     <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
+                                    <font key="font" metaFont="menu"/>
                                     <menu key="menu" id="QCH-VJ-LAu">
                                         <items>
                                             <menuItem state="on" id="Ez5-vL-MEw"/>

+ 45 - 1
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Model/KMBookmark.swift

@@ -7,6 +7,50 @@
 
 import Cocoa
 
-class KMBookmark: NSObject {
+enum KMBookmarkType: Int {
+    case bookmark = 0
+    case folder
+    case session
+    case separator
+}
 
+class KMBookmark: NSObject {
+    var properties: NSDictionary?
+    var bookmarkType: KMBookmarkType = .bookmark
+    var label: String = ""
+    var icon: NSImage = NSImage()
+    var alternateIcon: NSImage =  NSImage()
+    var fileURL: URL?
+    var pageIndex: UInt = 0
+    var pageNumber: NSNumber = 0
+    var parent: KMBookmark = KMBookmark()
+    
+    var children: [KMBookmark] = []
+    
+    func initSessionWithSetups() {
+        var childs: [KMBookmark] = []
+//        for setup in setups {
+//            let child = KMBookmark.init
+//        }
+//        for (NSDictionary *setup in aSetupDicts) {
+//            if ((child = [[KMBookmark alloc] initWithSetup:setup label:""])) {
+//                [aChildren addObject:child];
+//            }
+//        }
+    }
+    
+    
+    static func bookmarkSession(setups: NSArray, label: String) -> KMBookmark {
+        var bookmark = KMBookmark()
+        
+        return bookmark
+    }
+    
+    static func bookmark(url: URL, pageIndex: UInt, label: String) -> KMBookmark {
+        var bookmark = KMBookmark()
+        bookmark.fileURL = url
+        bookmark.pageIndex = pageIndex
+        bookmark.label = label
+        return bookmark
+    }
 }

+ 13 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Model/KMFileBookmark.swift

@@ -0,0 +1,13 @@
+//
+//  KMFileBookmark.swift
+//  PDF Reader Pro
+//
+//  Created by lizhe on 2024/2/6.
+//
+
+import Cocoa
+
+class KMFileBookmark: KMBookmark {
+    var fileInfo: NSDictionary?
+    
+}

+ 12 - 0
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Model/KMFolderBookmark.swift

@@ -0,0 +1,12 @@
+//
+//  KMFolderBookmark.swift
+//  PDF Reader Pro
+//
+//  Created by lizhe on 2024/2/6.
+//
+
+import Cocoa
+
+class KMFolderBookmark: KMBookmark {
+
+}

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/TTS/WindowController/KMTTSWindowController.swift

@@ -384,7 +384,7 @@ class KMTTSWindowController: NSWindowController, KMTTSManagerDelegate, NSWindowD
     //MARK: KMTTSManagerDelegate
     func ttsMananger(_ tts: KMTTSManager, willSpeak selection: CPDFSelection) {
 //        if (selection != nil) {
-            self.pdfView.setHighlightedSelection(selection, animated: false)
+            self.pdfView?.setHighlightedSelection(selection, animated: false)
 //        }
     }
     func ttsManangerDidFinishSpeech(_ tts: KMTTSManager) -> Bool {

+ 7 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -40,6 +40,7 @@ class KMLeftSideViewController: KMSideViewController {
         KMPrint("KMLeftSideViewController deinit.")
         
         NotificationCenter.default.removeObserver(self)
+        DistributedNotificationCenter.default().removeObserver(self)
     }
     
     override var nibName: NSNib.Name? {
@@ -1123,6 +1124,8 @@ extension KMLeftSideViewController {
             self.snapshotSearchField.backgroundColor = NSColor(red: 0.224, green: 0.235, blue: 0.243, alpha: 1)
             self.outlineSearchField.backgroundColor = NSColor(red: 0.224, green: 0.235, blue: 0.243, alpha: 1)
             self.noteSearchField.backgroundColor = NSColor(red: 0.224, green: 0.235, blue: 0.243, alpha: 1)
+//            self.leftView.layer?.backgroundColor = NSColor(red: 0.922, green: 0.925, blue: 0.941, alpha: 1).cgColor
+//            self.leftView.layer?.backgroundColor = NSColor.red.cgColor
         } else {
             self.leftListView.layer?.backgroundColor = NSColor(red: 0.988, green: 0.992, blue: 1, alpha: 1).cgColor
             self.snapshotNormalView.layer?.backgroundColor = NSColor(red: 0.988, green: 0.992, blue: 1, alpha: 1).cgColor
@@ -1144,7 +1147,11 @@ extension KMLeftSideViewController {
             self.snapshotSearchField.backgroundColor = NSColor(red: 0.922, green: 0.925, blue: 0.941, alpha: 1)
             self.outlineSearchField.backgroundColor = NSColor(red: 0.922, green: 0.925, blue: 0.941, alpha: 1)
             self.noteSearchField.backgroundColor = NSColor(red: 0.922, green: 0.925, blue: 0.941, alpha: 1)
+//            self.leftView.layer?.backgroundColor = .white
         }
+        
+        self.leftView.wantsLayer = true
+        self.leftView.layer?.backgroundColor = KMAppearance.controlBackgroundColor().cgColor
     }
     
     private func _hasContainString(_ searchString: String, rootOutline outline: CPDFOutline) -> Bool {

+ 2 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/WindowController/KMAnnotationFontWindowController.swift

@@ -111,7 +111,8 @@ import Cocoa
     
     var annotation: CPDFAnnotation {
         set {
-            let equal: Bool = ((_annotation?.isEqual(newValue)) != nil)
+//            let equal: Bool = ((_annotation?.isEqual(newValue)) != nil)
+            let equal = self._annotation?.isEqual(to: newValue) ?? false
             if equal {
                 if _annotation is CPDFTextAnnotation {
                     let keys = ["string", "color"]

+ 20 - 20
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseFirstTrialWindowController.swift

@@ -199,8 +199,8 @@ import Cocoa
     }
     
     @objc func updateViewColor () {
-        self.trialMessageField.textColor = KMAppearance.KMColor_Layout_H0()
-        self.trialFeaturesField.textColor = KMAppearance.KMColor_Layout_H0()
+        self.trialMessageField.textColor = KMAppearance.Layout.h0Color()
+        self.trialFeaturesField.textColor = KMAppearance.Layout.h0Color()
         
         self.features1Field.textColor = NSColor(red: 14.0/255.0, green: 17.0/255.0, blue: 20.0/255.0, alpha: 1)
         self.features2Field.textColor = NSColor(red: 14.0/255.0, green: 17.0/255.0, blue: 20.0/255.0, alpha: 1)
@@ -211,21 +211,21 @@ import Cocoa
         
         self.nameTextFieldView.layer?.borderWidth = 1.0
         if (KMAppearance.isDarkMode)(){
-            self.nameTextFieldView.layer?.borderColor = KMAppearance.KMColor_Layout_W30().cgColor
+            self.nameTextFieldView.layer?.borderColor = KMAppearance.Layout.w30Color().cgColor
         } else {
             self.nameTextFieldView.layer?.borderColor = NSColor(red: 0.0/255.0, green: 85.0/255.0, blue: 251.0/255.0, alpha: 1).cgColor
         }
         
         self.emailTextFieldView.layer?.borderWidth = 1.0
         if (KMAppearance.isDarkMode)(){
-            self.emailTextFieldView.layer?.borderColor = KMAppearance.KMColor_Layout_W30().cgColor
+            self.emailTextFieldView.layer?.borderColor = KMAppearance.Layout.w30Color().cgColor
         } else {
             self.emailTextFieldView.layer?.borderColor = NSColor(red: 0.0/255.0, green: 85.0/255.0, blue: 251.0/255.0, alpha: 1).cgColor
         }
         
         if (KMAppearance.isDarkMode)() {
-            self.nameTextField.textColor = KMAppearance.KMColor_Layout_W0()
-            self.emailTextField.textColor = KMAppearance.KMColor_Layout_W0()
+            self.nameTextField.textColor = KMAppearance.Layout.w0Color()
+            self.emailTextField.textColor = KMAppearance.Layout.w0Color()
 
             self.rView.layer?.backgroundColor = NSColor(red: 24.0/255.0, green: 22.0/255.0, blue: 31.0/255.0, alpha: 0.9).cgColor
             
@@ -280,7 +280,7 @@ import Cocoa
             let privacyPolicy : String = NSLocalizedString("Privacy Policy.", comment: "")
             
             let allRange = (stringValue as NSString).range(of: stringValue)
-            attributedString.addAttributes([NSAttributedString.Key.foregroundColor : KMAppearance.KMColor_Layout_W70()], range: allRange)
+            attributedString.addAttributes([NSAttributedString.Key.foregroundColor : KMAppearance.Layout.w70Color()], range: allRange)
             attributedString.addAttributes([NSAttributedString.Key.font :NSFont(name: "SFProText-Regular", size: 12.0) as Any], range: allRange)
             
             let urlString : String = "https://www.pdfreaderpro.com/privacy-policy"
@@ -290,7 +290,7 @@ import Cocoa
             attributedString.addAttribute(.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: linkRange)
             
             self.bottomTextView.linkTextAttributes = [
-                NSAttributedString.Key.foregroundColor: KMAppearance.KMColor_Interactive_A0(),
+                NSAttributedString.Key.foregroundColor: KMAppearance.Interactive.a0Color(),
                 NSAttributedString.Key.underlineStyle: NSUnderlineStyle.single.rawValue
             ]
             
@@ -300,8 +300,8 @@ import Cocoa
             self.bottomTextView.sizeToFit()
         } else {
             
-            self.nameTextField.textColor = KMAppearance.KMColor_Layout_H0()
-            self.emailTextField.textColor = KMAppearance.KMColor_Layout_H0()
+            self.nameTextField.textColor = KMAppearance.Layout.h0Color()
+            self.emailTextField.textColor = KMAppearance.Layout.h0Color()
             
             self.rView.layer?.backgroundColor = NSColor(red: 248.0/255.0, green: 249.0/255.0, blue: 255.0/255.0, alpha: 1).cgColor
             
@@ -358,7 +358,7 @@ import Cocoa
             attributedString.addAttribute(NSAttributedString.Key.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: linkRange)
             
             let allRange = (stringValue as NSString).range(of: stringValue)
-            attributedString.addAttributes([NSAttributedString.Key.foregroundColor : KMAppearance.KMColor_Layout_H1()], range: allRange)
+            attributedString.addAttributes([NSAttributedString.Key.foregroundColor : KMAppearance.Layout.h1Color()], range: allRange)
             attributedString.addAttributes([NSAttributedString.Key.font :NSFont(name: "SFProText-Regular", size: 12.0) as Any], range: allRange)
             
             // 设置悬停时链接文本颜色
@@ -366,7 +366,7 @@ import Cocoa
 //            attributedString.addAttribute(NSAttributedString.Key(rawValue: "NSMouseInRectAttribute"), value: hoverColor, range: linkRange)
             // 设置TextView的富文本属性
             self.bottomTextView.linkTextAttributes = [
-                NSAttributedString.Key.foregroundColor: KMAppearance.KMColor_Interactive_A0(),
+                NSAttributedString.Key.foregroundColor: KMAppearance.Interactive.a0Color(),
                 NSAttributedString.Key.underlineStyle: NSUnderlineStyle.single.rawValue
             ]
             
@@ -442,14 +442,14 @@ import Cocoa
             
             self.nameTextFieldView.layer?.borderWidth = 0.0
             if (KMAppearance.isDarkMode)(){
-                self.nameTextFieldView.layer?.borderColor = KMAppearance.KMColor_Layout_W30().cgColor
+                self.nameTextFieldView.layer?.borderColor = KMAppearance.Layout.w30Color().cgColor
             } else {
                 self.nameTextFieldView.layer?.borderColor = NSColor(red: 0.0/255.0, green: 85.0/255.0, blue: 251.0/255.0, alpha: 1).cgColor
             }
             
             self.emailTextFieldView.layer?.borderWidth = 1.0
             if (KMAppearance.isDarkMode)(){
-                self.emailTextFieldView.layer?.borderColor = KMAppearance.KMColor_Layout_W30().cgColor
+                self.emailTextFieldView.layer?.borderColor = KMAppearance.Layout.w30Color().cgColor
             } else {
                 self.emailTextFieldView.layer?.borderColor = NSColor(red: 0.0/255.0, green: 85.0/255.0, blue: 251.0/255.0, alpha: 1).cgColor
             }
@@ -461,14 +461,14 @@ import Cocoa
             
             self.nameTextFieldView.layer?.borderWidth = 1.0
             if (KMAppearance.isDarkMode)(){
-                self.nameTextFieldView.layer?.borderColor = KMAppearance.KMColor_Layout_W30().cgColor
+                self.nameTextFieldView.layer?.borderColor = KMAppearance.Layout.w30Color().cgColor
             } else {
                 self.nameTextFieldView.layer?.borderColor = NSColor(red: 0.0/255.0, green: 85.0/255.0, blue: 251.0/255.0, alpha: 1).cgColor
             }
             
             self.emailTextFieldView.layer?.borderWidth = 0.0
             if (KMAppearance.isDarkMode)(){
-                self.emailTextFieldView.layer?.borderColor = KMAppearance.KMColor_Layout_W30().cgColor
+                self.emailTextFieldView.layer?.borderColor = KMAppearance.Layout.w30Color().cgColor
             } else {
                 self.emailTextFieldView.layer?.borderColor = NSColor(red: 0.0/255.0, green: 85.0/255.0, blue: 251.0/255.0, alpha: 1).cgColor
             }
@@ -486,14 +486,14 @@ import Cocoa
             }
             self.nameTextFieldView.layer?.borderWidth = 1.0
             if (KMAppearance.isDarkMode)(){
-                self.nameTextFieldView.layer?.borderColor = KMAppearance.KMColor_Layout_W30().cgColor
+                self.nameTextFieldView.layer?.borderColor = KMAppearance.Layout.w30Color().cgColor
             } else {
                 self.nameTextFieldView.layer?.borderColor = NSColor(red: 0.0/255.0, green: 85.0/255.0, blue: 251.0/255.0, alpha: 1).cgColor
             }
             
             self.emailTextFieldView.layer?.borderWidth = 0.0
             if (KMAppearance.isDarkMode)(){
-                self.emailTextFieldView.layer?.borderColor = KMAppearance.KMColor_Layout_W30().cgColor
+                self.emailTextFieldView.layer?.borderColor = KMAppearance.Layout.w30Color().cgColor
             } else {
                 self.emailTextFieldView.layer?.borderColor = NSColor(red: 0.0/255.0, green: 85.0/255.0, blue: 251.0/255.0, alpha: 1).cgColor
             }
@@ -506,14 +506,14 @@ import Cocoa
             }
             self.nameTextFieldView.layer?.borderWidth = 0.0
             if (KMAppearance.isDarkMode)(){
-                self.nameTextFieldView.layer?.borderColor = KMAppearance.KMColor_Layout_W30().cgColor
+                self.nameTextFieldView.layer?.borderColor = KMAppearance.Layout.w30Color().cgColor
             } else {
                 self.nameTextFieldView.layer?.borderColor = NSColor(red: 0.0/255.0, green: 85.0/255.0, blue: 251.0/255.0, alpha: 1).cgColor
             }
             
             self.emailTextFieldView.layer?.borderWidth = 1.0
             if (KMAppearance.isDarkMode)(){
-                self.emailTextFieldView.layer?.borderColor = KMAppearance.KMColor_Layout_W30().cgColor
+                self.emailTextFieldView.layer?.borderColor = KMAppearance.Layout.w30Color().cgColor
             } else {
                 self.emailTextFieldView.layer?.borderColor = NSColor(red: 0.0/255.0, green: 85.0/255.0, blue: 251.0/255.0, alpha: 1).cgColor
             }

+ 5 - 5
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseLimitWindowController.swift

@@ -73,11 +73,11 @@ class KMPurchaseLimitWindowController: NSWindowController {
         self.desLabel2.stringValue = NSLocalizedString("Get converted files in high quality", comment: "")
         self.desLabel3.stringValue = NSLocalizedString("Batch Convert PDFs", comment: "")
         
-        self.subTitleLabel.textColor = KMAppearance.KMColor_Layout_H0()
-        self.infoTitleLabel.textColor = KMAppearance.KMColor_Layout_H0()
-        self.desLabel1.textColor = KMAppearance.KMColor_Layout_H0()
-        self.desLabel2.textColor = KMAppearance.KMColor_Layout_H0()
-        self.desLabel3.textColor = KMAppearance.KMColor_Layout_H0()
+        self.subTitleLabel.textColor = KMAppearance.Layout.h0Color()
+        self.infoTitleLabel.textColor = KMAppearance.Layout.h0Color()
+        self.desLabel1.textColor = KMAppearance.Layout.h0Color()
+        self.desLabel2.textColor = KMAppearance.Layout.h0Color()
+        self.desLabel3.textColor = KMAppearance.Layout.h0Color()
         
         self.titleLbl.font = NSFont.UbuntuBoldFontWithSize(21)
         self.subTitleLabel.font = NSFont.SFProTextRegularFont(14)

+ 3 - 3
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.m

@@ -481,9 +481,9 @@ NSPopoverDelegate>
     }
 #else
     if (![IAPProductsManager defaultManager].isAvailableAdvancedPDFToOffice) {
-//        KMToolCompareWindowController *vc = [KMToolCompareWindowController toolCompareWithType:KMCompareWithToolType_Convert setSelectIndex:0];
-//        [vc.window center];
-//        [vc showWindow:nil];
+        KMToolCompareWindowController *vc = [KMToolCompareWindowController toolCompareWithToolType:KMCompareWithToolTypeConvert selectNum:0];
+        [vc.window center];
+        [vc showWindow:nil];
     }
 #endif
     

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

@@ -1219,6 +1219,12 @@
 		AD055E302B70B3D50035F824 /* KMBookmarkSheetController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD055E2C2B70B3D50035F824 /* KMBookmarkSheetController.xib */; };
 		AD055E312B70B3D50035F824 /* KMBookmarkSheetController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD055E2C2B70B3D50035F824 /* KMBookmarkSheetController.xib */; };
 		AD055E322B70B3D50035F824 /* KMBookmarkSheetController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD055E2C2B70B3D50035F824 /* KMBookmarkSheetController.xib */; };
+		AD055E352B72090A0035F824 /* KMFolderBookmark.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD055E342B72090A0035F824 /* KMFolderBookmark.swift */; };
+		AD055E362B72090A0035F824 /* KMFolderBookmark.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD055E342B72090A0035F824 /* KMFolderBookmark.swift */; };
+		AD055E372B72090A0035F824 /* KMFolderBookmark.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD055E342B72090A0035F824 /* KMFolderBookmark.swift */; };
+		AD055E392B7209280035F824 /* KMFileBookmark.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD055E382B7209280035F824 /* KMFileBookmark.swift */; };
+		AD055E3A2B7209280035F824 /* KMFileBookmark.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD055E382B7209280035F824 /* KMFileBookmark.swift */; };
+		AD055E3B2B7209280035F824 /* KMFileBookmark.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD055E382B7209280035F824 /* KMFileBookmark.swift */; };
 		AD0E8AB02A31B76300DBFD3C /* KMInAppPurchaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD0E8AAF2A31B76300DBFD3C /* KMInAppPurchaseManager.swift */; };
 		AD0E8AB12A31B76300DBFD3C /* KMInAppPurchaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD0E8AAF2A31B76300DBFD3C /* KMInAppPurchaseManager.swift */; };
 		AD0E8AB42A31B78900DBFD3C /* KMDMGPurchaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD0E8AB32A31B78900DBFD3C /* KMDMGPurchaseManager.swift */; };
@@ -5477,6 +5483,8 @@
 		AD055E242B70B3C10035F824 /* KMBookmarkController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMBookmarkController.xib; sourceTree = "<group>"; };
 		AD055E2B2B70B3D50035F824 /* KMBookmarkSheetController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBookmarkSheetController.swift; sourceTree = "<group>"; };
 		AD055E2C2B70B3D50035F824 /* KMBookmarkSheetController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMBookmarkSheetController.xib; sourceTree = "<group>"; };
+		AD055E342B72090A0035F824 /* KMFolderBookmark.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMFolderBookmark.swift; sourceTree = "<group>"; };
+		AD055E382B7209280035F824 /* KMFileBookmark.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMFileBookmark.swift; sourceTree = "<group>"; };
 		AD0E8AAF2A31B76300DBFD3C /* KMInAppPurchaseManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMInAppPurchaseManager.swift; sourceTree = "<group>"; };
 		AD0E8AB32A31B78900DBFD3C /* KMDMGPurchaseManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMDMGPurchaseManager.swift; sourceTree = "<group>"; };
 		AD0E8AB82A31BDDD00DBFD3C /* KMProduct.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMProduct.swift; sourceTree = "<group>"; };
@@ -8166,6 +8174,8 @@
 			isa = PBXGroup;
 			children = (
 				AD055E1E2B70B3840035F824 /* KMBookmark.swift */,
+				AD055E342B72090A0035F824 /* KMFolderBookmark.swift */,
+				AD055E382B7209280035F824 /* KMFileBookmark.swift */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -14591,6 +14601,7 @@
 				ADBC372929CA950500D93208 /* KMComparativeOutlineView.swift in Sources */,
 				9FDD0F64294AB645000C4DAD /* KMMainViewController.swift in Sources */,
 				BBD4267F2B4FCF1500AC8660 /* KMTextFieldCell.swift in Sources */,
+				AD055E392B7209280035F824 /* KMFileBookmark.swift in Sources */,
 				89D2D2FB294C806000BFF5FE /* KMPDFThumbnailItem.swift in Sources */,
 				BB9599CB2B3184230062D346 /* KMRedactSelectPagesWindowController.swift in Sources */,
 				BBB9B313299A5D6D004F3235 /* DropboxModel.m in Sources */,
@@ -15005,6 +15016,7 @@
 				ADDF83412B391A5C00A81A4E /* DSignatureConfigWindowController.swift in Sources */,
 				AD199DE72B230A9300D56FEE /* KMPrintMultipageView.swift in Sources */,
 				BB6719FD2AD2CE1B003D44D5 /* CPDFSquareAnnotation+PDFListView.swift in Sources */,
+				AD055E352B72090A0035F824 /* KMFolderBookmark.swift in Sources */,
 				BB146FC3299DC0D100784A6A /* GTMReadMonitorInputStream.m in Sources */,
 				BB8115FB29924A5F0008F536 /* KMSecureEncryptCheckCellView.swift in Sources */,
 				AD867FAF29DFBB1200F00440 /* KMAnnotationOutlineCellView.swift in Sources */,
@@ -15629,6 +15641,7 @@
 				BBFE6E88293210AB00142C01 /* KMCompressCellView.swift in Sources */,
 				899700F728F4051B009AF911 /* KMAnnotationViewController.swift in Sources */,
 				9F1FE4C429406E4700E952CA /* CTPageTransition.c in Sources */,
+				AD055E362B72090A0035F824 /* KMFolderBookmark.swift in Sources */,
 				BBB9B311299A5D6D004F3235 /* KMCloudDownloadOperationQueue.m in Sources */,
 				BBFCCE092B56988C003742B3 /* KMPreferenceCommon.swift in Sources */,
 				ADDF834E2B391A5C00A81A4E /* DSignatureCertifyDetailViewController.swift in Sources */,
@@ -16480,6 +16493,7 @@
 				ADB5E51A2A3711CB007110A8 /* KMSubscribeWaterMarkView.swift in Sources */,
 				BB8F456E295AC1220037EA22 /* KMHeaderFooterAdjectiveModel.swift in Sources */,
 				F3599174292B62F5000D25DE /* CStringConstants.m in Sources */,
+				AD055E3A2B7209280035F824 /* KMFileBookmark.swift in Sources */,
 				BBC8A7692B05EB8000FA9377 /* KMThumbnailTableviewCell.swift in Sources */,
 				BB6D2DA82B674A6300624C24 /* CPDFOutline+KMExtension.swift in Sources */,
 				89752DEB293875FC003FF08E /* KMMainToolbarController.swift in Sources */,
@@ -16822,6 +16836,7 @@
 				BB6DD823293497B6001F0544 /* KMSecureEncryptModel.swift in Sources */,
 				ADE86AF02B0AF56200414DFA /* KMCompareCoveringSettingView.swift in Sources */,
 				BB35732F2AF50068004CDA92 /* KMBatchOperateConvertViewController.swift in Sources */,
+				AD055E3B2B7209280035F824 /* KMFileBookmark.swift in Sources */,
 				89D2D2E0294C451400BFF5FE /* KMThumbnailViewController.swift in Sources */,
 				ADDEEA642AD3A6E700EF675D /* KMPDFSignatureTextView.swift in Sources */,
 				9FAAA334290BD0A20046FFCE /* KMHistoryFileCollectionViewItem.swift in Sources */,
@@ -17696,6 +17711,7 @@
 				BBF1705A2AE296B90013CE02 /* KMView.swift in Sources */,
 				BBD3C8B82B2C438F00EB0867 /* KMToolbarPreviousNextItemView.swift in Sources */,
 				ADDEEA7C2AD3F4C800EF675D /* KMPopUpButton.swift in Sources */,
+				AD055E372B72090A0035F824 /* KMFolderBookmark.swift in Sources */,
 				BB93CDE72AE757A000B29C57 /* KMToolbarItemView.swift in Sources */,
 				BB24FFDF2B28578C00A59054 /* KMTTSWindowController.swift in Sources */,
 				9F705F8F291E579F005199AD /* KMHistoryFileTableView.swift in Sources */,

+ 100 - 4
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -110,8 +110,8 @@
             filePath = "PDF Master/Class/ChromiumTabs/KMBrowserWindowController.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2146"
-            endingLineNumber = "2146"
+            startingLineNumber = "2196"
+            endingLineNumber = "2196"
             landmarkName = "savePDFSettingToDefaults(_:)"
             landmarkType = "7">
          </BreakpointContent>
@@ -526,8 +526,8 @@
             filePath = "PDF Master/Class/Common/Category/NSObject+KMExtension.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "805"
-            endingLineNumber = "805"
+            startingLineNumber = "808"
+            endingLineNumber = "808"
             landmarkName = "uniqueChewableItemsDirectoryURL()"
             landmarkType = "7">
          </BreakpointContent>
@@ -548,5 +548,101 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "877893A4-191F-4DC0-B4BA-6AD764BA2605"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1101"
+            endingLineNumber = "1101"
+            landmarkName = "_themeChanged(_:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "877893A4-191F-4DC0-B4BA-6AD764BA2605 - 3e436c85ec6693d0"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMLeftSideViewController._themeChanged(__C.NSNotification) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/work/tangchao/git/PDFOffice/PDF%20Office/PDF%20Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1101"
+                  endingLineNumber = "1101"
+                  offsetFromSymbolStart = "277">
+               </Location>
+               <Location
+                  uuid = "877893A4-191F-4DC0-B4BA-6AD764BA2605 - b06821624ed6e2ad"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "closure #1 @Swift.MainActor () -&gt; () in PDF_Reader_Pro.KMLeftSideViewController._themeChanged(__C.NSNotification) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/work/tangchao/git/PDFOffice/PDF%20Office/PDF%20Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1102"
+                  endingLineNumber = "1102"
+                  offsetFromSymbolStart = "22">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "DB926723-14B1-4358-AF9B-3BC932A40699"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/ChromiumTabs/KMBrowserWindowController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "150"
+            endingLineNumber = "150"
+            landmarkName = "_themeChanged(_:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "DB926723-14B1-4358-AF9B-3BC932A40699 - 74c2745fc2dd85a8"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMBrowserWindowController._themeChanged(Foundation.Notification) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/work/tangchao/git/PDFOffice/PDF%20Office/PDF%20Master/Class/ChromiumTabs/KMBrowserWindowController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "150"
+                  endingLineNumber = "150"
+                  offsetFromSymbolStart = "85">
+               </Location>
+               <Location
+                  uuid = "DB926723-14B1-4358-AF9B-3BC932A40699 - 74c2745fc2dd85a8"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMBrowserWindowController._themeChanged(Foundation.Notification) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/work/tangchao/git/PDFOffice/PDF%20Office/PDF%20Master/Class/ChromiumTabs/KMBrowserWindowController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "150"
+                  endingLineNumber = "150"
+                  offsetFromSymbolStart = "381">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>