فهرست منبع

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

tangchao 10 ماه پیش
والد
کامیت
4646775f80

+ 2 - 5
PDF Office/PDF Master/Base.lproj/Main.storyboard

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -436,9 +436,6 @@
                                                     </menuItem>
                                                 </items>
                                             </menu>
-                                            <connections>
-                                                <action selector="menuItemAction_print:" target="Ady-hI-5gd" id="qYQ-dN-1l9"/>
-                                            </connections>
                                         </menuItem>
                                     </items>
                                 </menu>

+ 1 - 1
PDF Office/PDF Master/Class/Home/View/HomeContentView/KMHomeContentView.swift

@@ -133,7 +133,7 @@ class KMHomeContentView: KMBaseXibView {
     }
     
     func updatePageLabel() {
-        self.pageLabel.stringValue = "\(qucikToolsView.currentPage()) / \(qucikToolsView.pageCount())"
+        self.pageLabel.stringValue = "\(qucikToolsView.currentPage()) / \(max(qucikToolsView.pageCount(), 1))"
     }
     
     func updateRecentlyListState() {

+ 1 - 1
PDF Office/PDF Master/Class/Home/View/HomeContentView/QucikTools/Model/KMQucikToolsModel.swift

@@ -30,7 +30,7 @@ class KMQucikToolsModel: NSObject {
                 }
                 return types
             } else {
-                return self.allType()
+                return []
             }
         } else {
             return self.allType()

+ 1 - 0
PDF Office/PDF Master/Class/KMFileManager/KMFile/KMFile.swift

@@ -85,6 +85,7 @@ class KMFile: NSObject {
                 info.size = CGFloat(sizeFloat)
                 info.fileName = filePath.lastPathComponent
                 info.modificationTime = fileTime
+                info.sizeString = fileSize
                 
                 self.image = image
                 self.info = info

+ 5 - 1
PDF Office/PDF Master/Class/PDFTools/Merge/MergeNew/KMMergeWindowController.swift

@@ -189,7 +189,11 @@ extension KMMergeWindowController {
             
             allPage = file.bAllPage
             
-            let tDocument = PDFDocument(url: NSURL(fileURLWithPath: file.filePath) as URL)!
+            /*防止文件被地址变换后crash*/
+            guard let tDocument = PDFDocument(url: NSURL(fileURLWithPath: file.filePath) as URL) else {
+                print("文件不存在")
+                return
+            }
             
             var outlineArray: [PDFOutline] = []
             

+ 8 - 0
PDF Office/PDF Master/Class/PDFTools/Print/KMPrintWindowController.swift

@@ -186,6 +186,14 @@ class KMPrintWindowController: KMBaseWindowController, NetServiceBrowserDelegate
         }
         
         if inputDocument != nil {
+            if !inputDocument!.allowsCopying || !inputDocument!.allowsPrinting {
+                let alert = NSAlert()
+                alert.alertStyle = .critical
+                alert.messageText = NSLocalizedString("This is a secured document. Editing is not permitted.", comment: "")
+                alert.runModal()
+                return
+            }
+            
             guard let  pdfDocument = PDFDocument(url: inputDocument!.documentURL) else { return }
         }
         

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/KMFillSignTextPanel.swift

@@ -357,7 +357,7 @@ class KMFillSignTextPanel: KMPropertiesPanelSubViewController {
         fontLabel.stringValue = NSLocalizedString("Font", comment: "")
         fillLabel.stringValue = NSLocalizedString("Fill Color", comment: "")
         dateTypeLabel.stringValue = NSLocalizedString("Date", comment: "")
-        showTimeVC.stringValue = NSLocalizedString("Show Time", comment: "")
+        showTimeVC.stringValue = NSLocalizedString("Time", comment: "")
         showTimeVC.updateUI()
     }
     

+ 2 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/KMOpacityPanel.swift

@@ -35,9 +35,10 @@ class KMOpacityPanel: KMPropertiesPanelSubViewController {
         // Do view setup here.
         
         self.view.wantsLayer = true
-        self.view.layer?.backgroundColor = NSColor.km_init(hex: "#FFFFFF").cgColor
+        self.view.layer?.backgroundColor = KMAppearance.Layout.bgColor().cgColor
         
         opacityVC = KMDesignSelect.init(withType: .PopButton)
+        opacityVC.view.layer?.backgroundColor = KMAppearance.Layout.bgColor().cgColor
         
         opacityBox.fillColor = .clear
         opacityBox.contentView = opacityVC.view

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/KMPropertiesPanelReadOnlySubVC.swift

@@ -101,7 +101,7 @@ class KMPropertiesPanelReadOnlySubVC: KMPropertiesPanelSubViewController {
             checkButton.title = NSLocalizedString("允许用户输入自定义文本", comment: "")
             break
         case .DateShowTime:
-            checkButton.title = NSLocalizedString("Show Time", comment: "")
+            checkButton.title = NSLocalizedString("Time", comment: "")
             break
         default:
             break

+ 7 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+MenuAction.swift

@@ -1446,6 +1446,13 @@ extension KMMainViewController: NSMenuItemValidation, NSMenuDelegate {
             }
             return true
         }
+        
+        if menuItem.action == #selector(menuItemAction_print) {
+            if self.listView.document.permissionsStatus == .user && !self.listView.document.allowsPrinting {
+                return false
+            }
+        }
+        
         guard let action = menuItem.action else {
             return false
         }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 2977 - 909
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/lizhe.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist