Browse Source

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

tangchao 11 months ago
parent
commit
db51410c46
17 changed files with 95 additions and 14 deletions
  1. 2 2
      PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/New/View/KMHeaderFooterView.swift
  2. 1 1
      PDF Office/PDF Master/Class/PDFTools/Background/New/View/KMAddBackgroundView.swift
  3. 1 1
      PDF Office/PDF Master/Class/PDFTools/Watermark/New/View/KMWatermarkView.swift
  4. 1 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFLinkAnnotation+PDFListView.swift
  5. 10 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m
  6. 3 2
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMImageToolTipWindow.swift
  7. 5 5
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/WindowController/KMAnnotationLineWindowController.swift
  8. 7 0
      PDF Office/PDF Master/Strings/de.lproj/Localizable.strings
  9. 7 1
      PDF Office/PDF Master/Strings/es.lproj/Localizable.strings
  10. 7 0
      PDF Office/PDF Master/Strings/fr.lproj/Localizable.strings
  11. 7 0
      PDF Office/PDF Master/Strings/it.lproj/Localizable.strings
  12. 8 0
      PDF Office/PDF Master/Strings/ja.lproj/Localizable.strings
  13. 7 1
      PDF Office/PDF Master/Strings/nl.lproj/Localizable.strings
  14. 7 0
      PDF Office/PDF Master/Strings/pl.lproj/Localizable.strings
  15. 7 0
      PDF Office/PDF Master/Strings/ru.lproj/Localizable.strings
  16. 8 0
      PDF Office/PDF Master/Strings/zh-Hans.lproj/Localizable.strings
  17. 7 0
      PDF Office/PDF Master/Strings/zh-Hant.lproj/Localizable.strings

+ 2 - 2
PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/New/View/KMHeaderFooterView.swift

@@ -1206,9 +1206,9 @@ extension KMHeaderFooterView {
             
             var fileName: String?
             if isBates {
-                fileName = "\(pdfDocument.documentURL?.lastPathComponent ?? NSLocalizedString("Untitled", comment: ""))_Bates"
+                fileName = "\(pdfDocument.documentURL?.deletingPathExtension().lastPathComponent ?? NSLocalizedString("Untitled", comment: ""))_Bates"
             } else {
-                fileName = "\(pdfDocument.documentURL?.lastPathComponent ?? NSLocalizedString("Untitled", comment: ""))_Header_Footer"
+                fileName = "\(pdfDocument.documentURL?.deletingPathExtension().lastPathComponent ?? NSLocalizedString("Untitled", comment: ""))_Header_Footer"
             }
             
             let savePanelAccessoryViewController = KMSavePanelAccessoryController()

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/Background/New/View/KMAddBackgroundView.swift

@@ -981,7 +981,7 @@ extension KMAddBackgroundView {
             }
             operateCallBack?(originalBackground, currentType)
         case .use:
-            let fileName = "\(pdfDocument.documentURL?.lastPathComponent ?? NSLocalizedString("Untitled", comment: ""))_Background"
+            let fileName = "\(pdfDocument.documentURL?.deletingPathExtension().lastPathComponent ?? NSLocalizedString("Untitled", comment: ""))_Background"
             let savePanelAccessoryViewController = KMSavePanelAccessoryController()
             let savePanel = NSSavePanel()
             savePanel.nameFieldStringValue = fileName

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/Watermark/New/View/KMWatermarkView.swift

@@ -850,7 +850,7 @@ extension KMWatermarkView {
             
             self.cancelAction?(self)
         } else if self.type == .use {
-            let fileName = "\(self.pdfDocument?.documentURL.lastPathComponent ?? "Untitled")_Watermark"
+            let fileName = "\(pdfDocument.documentURL?.deletingPathExtension().lastPathComponent ?? NSLocalizedString("Untitled", comment: ""))_Watermark"
             let savePanelAccessoryViewController = KMSavePanelAccessoryController()
             let savePanel = NSSavePanel()
             savePanel.nameFieldStringValue = fileName

+ 1 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFLinkAnnotation+PDFListView.swift

@@ -59,6 +59,7 @@ import Foundation
         if let destination = self.destination() {
 //            if let page = destination.page() {
 //                contentString = String(format: NSLocalizedString("Go to Page %ld", comment: ""), page.document.index(for: page)+1)
+//                contentString = String(format: "%@ %ld", NSLocalizedString("Go To Page", comment: ""), page.document.index(for: page)+1)
 //            }
         } else {
             let url = self.url()

+ 10 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m

@@ -387,7 +387,16 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
 }
 
 - (void)mouseExited:(NSEvent *)event {
-    [super mouseExited:event];
+    NSTrackingArea *eventArea = [event trackingArea];
+    CPDFAnnotation *annotation;
+    
+    if ([eventArea owner] == self && (annotation = [[eventArea userInfo] objectForKey:SKAnnotationKey])) {
+        if ([annotation isEqual:[[KMImageToolTipWindow shared] context]]){
+            [[KMImageToolTipWindow shared] fadeOut];
+        }
+    } else {
+        [super mouseExited:event];
+    }
     [[NSCursor arrowCursor] set];
 }
 

+ 3 - 2
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMImageToolTipWindow.swift

@@ -50,6 +50,7 @@ class KMImageToolTipWindow: KMAnimatedBorderlessWindow {
     }
     
     override func fadeOut() {
+        self.context = nil
         self.point = .zero
         super.fadeOut()
     }
@@ -81,8 +82,8 @@ extension KMImageToolTipWindow {
     @objc private func _showDelayed() {
         let thePoint = self.point == .zero ? NSEvent.mouseLocation : self.point
         var contentRect: NSRect = .zero
-        var screenRect = NSScreen.screen(for: thePoint)?.frame ?? .zero
-        var image = self.context?.toolTipImage()
+        let screenRect = NSScreen.screen(for: thePoint)?.frame ?? .zero
+        let image = self.context?.toolTipImage()
         if (image != nil) {
             self.backgroundImage = image
                 

+ 5 - 5
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/WindowController/KMAnnotationLineWindowController.swift

@@ -81,11 +81,11 @@ class KMAnnotationLineWindowController: NSWindowController, NSTextFieldDelegate
         
         self.window!.title = NSLocalizedString("Line", comment: "")
 
-        self.lineWidthLabel.stringValue = NSLocalizedString("Line Width:", tableName: "LineInspector", comment: "")
-        self.lineStypeLabel.stringValue = NSLocalizedString("Line Style:", tableName: "LineInspector", comment: "")
-        self.dottedLineLabel.stringValue = NSLocalizedString("Dash Pattern:", tableName: "LineInspector", comment: "")
-        self.startingPointLabel.stringValue = NSLocalizedString("Start:", tableName: "LineInspector", comment: "")
-        self.endPointLabel.stringValue = NSLocalizedString("End:", tableName: "LineInspector", comment: "")
+        self.lineWidthLabel.stringValue = NSLocalizedString("Line Width:", comment: "")
+        self.lineStypeLabel.stringValue = NSLocalizedString("Line Style:", comment: "")
+        self.dottedLineLabel.stringValue = NSLocalizedString("Dash Pattern:", comment: "")
+        self.startingPointLabel.stringValue = NSLocalizedString("Start:", comment: "")
+        self.endPointLabel.stringValue = NSLocalizedString("End:", comment: "")
         dottedLineTextField.placeholderString = "0 pt"
         dottedLineTextField.delegate = self
         lineWidthStepper.valueWraps = false

+ 7 - 0
PDF Office/PDF Master/Strings/de.lproj/Localizable.strings

@@ -2723,3 +2723,10 @@
 "Please Enter AI License"="Bitte geben Sie die AI -Lizenz ein";
 "For PDF Reader Pro Permanent/Premium License, please click PDF Reader Pro on the menubar, then tap \"Enter License\"."="Für die PDF Reader Pro Permanent/Premium -Lizenz klicken Sie auf PDF Reader Pro in der Menubar und tippen Sie auf \"Lizenz eingeben\".";
 
+"Line Width:" = "Liniendicke:";
+"Line Style:" = "Linienstil:";
+"Dash Pattern:" = "Strichelung:";
+"Start:" = "Start:";
+"End:" = "Ende:";
+"Line and Border Style" = "Linien- und Rahmenstil";
+"Line Ending Style" = "Stil für Linienende";

+ 7 - 1
PDF Office/PDF Master/Strings/es.lproj/Localizable.strings

@@ -2816,4 +2816,10 @@
 "Please Enter AI License"="Ingrese la licencia AI";
 "For PDF Reader Pro Permanent/Premium License, please click PDF Reader Pro on the menubar, then tap \"Enter License\"."="Para la licencia PDF Reader Pro Permanent/Premium, haga clic en PDF Reader Pro en el Menubar, luego toque \"Ingrese la licencia\".";
 
-
+"Line Width:" = "Ancho linea:";
+"Line Style:" = "Estilo linea:";
+"Dash Pattern:" = "Patrón linea:";
+"Start:" = "Inicio:";
+"End:" = "Fin:";
+"Line and Border Style" = "Estilo de linea y su borde";
+"Line Ending Style" = "Estilo del fin de linea";

+ 7 - 0
PDF Office/PDF Master/Strings/fr.lproj/Localizable.strings

@@ -2686,3 +2686,10 @@
 "Please Enter AI License"="Veuillez saisir la licence AI";
 "For PDF Reader Pro Permanent/Premium License, please click PDF Reader Pro on the menubar, then tap \"Enter License\"."="Pour PDF Reader Pro Licence Permanent / Premium, veuillez cliquer sur PDF Reader Pro sur le Menubar, puis appuyez sur \"Entrez la licence\".";
 
+"Line Width:" = "Largeur :";
+"Line Style:" = "Style de ligne :";
+"Dash Pattern:" = "Motif de pointillé :";
+"Start:" = "Début :";
+"End:" = "Fin :";
+"Line and Border Style" = "Style de ligne et bordure";
+"Line Ending Style" = "Style de fin de ligne";

+ 7 - 0
PDF Office/PDF Master/Strings/it.lproj/Localizable.strings

@@ -2612,3 +2612,10 @@
 "Please Enter AI License"="Inserisci la licenza AI";
 "For PDF Reader Pro Permanent/Premium License, please click PDF Reader Pro on the menubar, then tap \"Enter License\"."="Per la licenza permanente/premium PDF Reader Pro, fare clic su PDF Reader Pro sul Menubar, quindi tocca \"Invio la licenza\".";
 
+"Line Width:" = "Larghezza linea:";
+"Line Style:" = "Stile linea:";
+"Dash Pattern:" = "Modello di trattini:";
+"Start:" = "Inizio:";
+"End:" = "Fine:";
+"Line and Border Style" = "Stile linea e bordo";
+"Line Ending Style" = "Stile estremità linea";

+ 8 - 0
PDF Office/PDF Master/Strings/ja.lproj/Localizable.strings

@@ -2878,3 +2878,11 @@
 "Each use of the AI tools costs 1 or more credits."="AIツールを使用するたびに、1クレジット以上の価格がかかります。";
 "Please Enter AI License"="AIライセンスを入力してください";
 "For PDF Reader Pro Permanent/Premium License, please click PDF Reader Pro on the menubar, then tap \"Enter License\"."="PDF Reader Pro Permantion/Premiumライセンスについては、MenubarのPDF Reader Proをクリックしてから、「ライセンスを入力する」をタップしてください。";
+
+"Line Width:" = "線の幅:";
+"Line Style:" = "線のスタイル:";
+"Dash Pattern:" = "破線:";
+"Start:" = "始まり:";
+"End:" = "終わり:";
+"Line and Border Style" = "線と枠線のスタイル";
+"Line Ending Style" = "線の終端のスタイル";

+ 7 - 1
PDF Office/PDF Master/Strings/nl.lproj/Localizable.strings

@@ -2888,4 +2888,10 @@
 "Please Enter AI License"="Voer AI -licentie in";
 "For PDF Reader Pro Permanent/Premium License, please click PDF Reader Pro on the menubar, then tap \"Enter License\"."="Klik voor PDF Reader Pro Permanent/Premium -licentie op PDF Reader Pro op de Menubar en tik vervolgens op \"Licentie invoeren\".";
 
-
+"Line Width:" = "Lijnbreedte:";
+"Line Style:" = "Lijnstijl:";
+"Dash Pattern:" = "Streepjespatroon:";
+"Start:" = "Begin:";
+"End:" = "Einde:";
+"Line and Border Style" = "Lijn- en randstijl";
+"Line Ending Style" = "Lijnbeëindigingsstijl";

+ 7 - 0
PDF Office/PDF Master/Strings/pl.lproj/Localizable.strings

@@ -2828,3 +2828,10 @@
 "Please Enter AI License"="Wprowadź licencję AI";
 "For PDF Reader Pro Permanent/Premium License, please click PDF Reader Pro on the menubar, then tap \"Enter License\"."="W przypadku licencji PDF Reader Pro Permanent/Premium kliknij PDF Reader Pro na menu, a następnie dotknij „Wprowadź licencję”.";
 
+"Line Width:" = "Grubość linii:";
+"Line Style:" = "Styl linii:";
+"Dash Pattern:" = "Wzór kreskowania:";
+"Start:" = "Początek:";
+"End:" = "Koniec:";
+"Line and Border Style" = "Styl linii i krawędzi";
+"Line Ending Style" = "Styl zakończenia linii";

+ 7 - 0
PDF Office/PDF Master/Strings/ru.lproj/Localizable.strings

@@ -2753,3 +2753,10 @@
 "Please Enter AI License"="Пожалуйста, введите лицензию AI";
 "For PDF Reader Pro Permanent/Premium License, please click PDF Reader Pro on the menubar, then tap \"Enter License\"."="Для PDF Reader Pro Permanent/Premium License, пожалуйста, нажмите PDF Reader Pro на Menubar, затем нажмите «Введите лицензию».";
 
+"Line Width:" = "Толщина:";
+"Line Style:" = "Тип линии:";
+"Dash Pattern:" = "Штрихи:";
+"Start:" = "Начало:";
+"End:" = "Конец:";
+"Line and Border Style" = "Стиль линий и рамок";
+"Line Ending Style" = "Оформление линии";

+ 8 - 0
PDF Office/PDF Master/Strings/zh-Hans.lproj/Localizable.strings

@@ -3801,3 +3801,11 @@
 "Key" = "关键字";
 "New Paragraph" = "新增段落";
 "Paragraph" = "段落";
+
+"Line Width:" = "线段宽度:";
+"Line Style:" = "线段样式:";
+"Dash Pattern:" = "虚线:";
+"Start:" = "开始:";
+"End:" = "结束:";
+"Line and Border Style" = "线段和边框样式";
+"Line Ending Style" = "线段尾部样式";

+ 7 - 0
PDF Office/PDF Master/Strings/zh-Hant.lproj/Localizable.strings

@@ -3920,3 +3920,10 @@
 "New Paragraph" = "新增段落";
 "Paragraph" = "段落";
 
+"Line Width:" = "線寬度:";
+"Line Style:" = "線條樣式:";
+"Dash Pattern:" = "虛線:";
+"Start:" = "起始:";
+"End:" = "結尾:";
+"Line and Border Style" = "線條和邊框樣式";
+"Line Ending Style" = "線條結尾樣式";