Bladeren bron

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

tangchao 1 jaar geleden
bovenliggende
commit
1af0dffd7b

+ 4 - 4
PDF Office/PDF Master/Class/KMLightMember/Manager/KMRequestServerManager.swift

@@ -643,10 +643,10 @@ extension KMRequestServerManager {
             DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.2, execute: { [unowned self] in
                 if loginAlert == nil {
                     loginAlert = NSAlert()
-                    loginAlert?.messageText = NSLocalizedString("请重新登录", comment: "")
-                    loginAlert?.informativeText = NSLocalizedString("您的账号已在其他设备登录,若非本人操作,请尽快修改您的账号密码", comment: "")
-                    loginAlert?.addButton(withTitle: NSLocalizedString("登录", comment: ""))
-                    loginAlert?.addButton(withTitle: NSLocalizedString("取消", comment: ""))
+                    loginAlert?.messageText = NSLocalizedString("Please Log in again", comment: "")
+                    loginAlert?.informativeText = NSLocalizedString("Your account has been logged into another device. If it was not done by you, please change your password as soon as possible.", comment: "")
+                    loginAlert?.addButton(withTitle: NSLocalizedString("Change Password", comment: ""))
+                    loginAlert?.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
                     var window = NSApp.mainWindow
                     if NSApp.mainWindow?.sheets.first != nil {
                         window = NSApp.mainWindow?.sheets.first

+ 17 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/Manager/KMEditPDFTextManager.swift

@@ -111,10 +111,27 @@ let defaultTextPresupposition: NSDictionary = [
     //单例
     public static let manager = KMEditPDFTextManager()
     
+    var textFontNames: [String] = []
     var textPresuppositionArray: [KMEditPDFTextFontModel] = []
     var textPresuppositionFontNameArray: [String] = []
 }
 
+//MARK: - Text FontNamees Data
+extension KMEditPDFTextManager {
+    func fetchTextFontNames() -> [String] {
+        return textFontNames
+    }
+    
+    func updateTextFontNames(listView: CPDFListView?) -> [String] {
+        if textFontNames.count == 0 {
+            if listView != nil {
+                textFontNames = listView!.getEditFontList() as? [String] ?? []
+            }
+        }
+        return textFontNames
+    }
+}
+
 //MARK: - piblic
 //MARK: OC
 @objc extension KMEditPDFTextManager {

+ 2 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideViewController.swift

@@ -183,7 +183,8 @@ class KMRightSideViewController: NSViewController,CipherTextViewDelegate {
         
     }
     
-   private func initEditPDFTextPropertyViewController() {
+    private func initEditPDFTextPropertyViewController() {
+        _ = KMEditPDFTextManager.manager.updateTextFontNames(listView: self.listView)
         self.eidtPDFTextProperty = KMEditPDFTextPropertyViewController()
         self.eidtPDFTextProperty.listView = self.listView
         self.eidtPDFTextProperty.view.frame = self.view.bounds