|
@@ -2386,6 +2386,33 @@ extension KMMainViewController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ func pdfSaveAlertView(_ sender: NSNotification) {
|
|
|
+ if AutoSaveManager.manager.isSaving{
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var num = 0
|
|
|
+ if self.listView.document != nil{
|
|
|
+ num = Int(self.listView.document.pageCount)
|
|
|
+ }
|
|
|
+ if Thread.current.isMainThread {
|
|
|
+ self.beginProgressSheet(withMessage: NSLocalizedString("Saving PDF", comment: "") + "...", maxValue: UInt(num))
|
|
|
+ } else {
|
|
|
+ DispatchQueue.main.async {
|
|
|
+ self.beginProgressSheet(withMessage: NSLocalizedString("Saving PDF", comment: "") + "...", maxValue: UInt(num))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ func pdfSaveFinishAlertView(_ sender: NSNotification) {
|
|
|
+ if Thread.current.isMainThread {
|
|
|
+ self.dismissProgressSheet()
|
|
|
+ } else {
|
|
|
+ DispatchQueue.main.async {
|
|
|
+ self.dismissProgressSheet()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private func _renameForSavePanel(_ tabC: CTTabController?) {
|
|
|
let outputSavePanel = NSSavePanel()
|
|
|
outputSavePanel.title = NSLocalizedString("Rename", comment: "")
|
|
@@ -2978,6 +3005,7 @@ extension KMMainViewController {
|
|
|
if maxValue > 0 {
|
|
|
progressC?.indeterminate = false
|
|
|
progressC?.maxValue = Double(maxValue)
|
|
|
+ progressC?.progressBar.doubleValue = 0.3
|
|
|
} else {
|
|
|
progressC?.indeterminate = true
|
|
|
}
|