Improved ProgressIndicator

This commit is contained in:
Kilian Hofmann 2017-06-18 22:54:00 +02:00
parent 70867909eb
commit 1e56a6247b
4 changed files with 6 additions and 22 deletions

View File

@ -2,22 +2,4 @@
<Bucket
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Graphic Analysis 2/PDFTitle.swift"
timestampString = "519509055.029461"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "30"
endingLineNumber = "30"
landmarkName = "windowDidLoad()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

View File

@ -149,7 +149,7 @@ class Document: NSDocument {
window.days = self.days[i]
self.pdfWindows[i] = (window.window?.contentView?.dataWithPDF(inside: (window.window?.contentView?.bounds)!))!
DispatchQueue.main.async {
self.exportProgress.increment(by: 100/12)
self.exportProgress.increment(by: 100/13)
}
}
}
@ -163,8 +163,10 @@ class Document: NSDocument {
context.endPDFPage()
}
context.closePDF()
data.write(to: savePanel.url!, atomically: true)
DispatchQueue.main.async {
self.exportProgress.increment(by: 100/13)
}
pthread_mutex_lock(&(NSApp.delegate as! AppDelegate).lock)
self.pdfBegin = false
pthread_mutex_unlock(&(NSApp.delegate as! AppDelegate).lock)

View File

@ -44,7 +44,7 @@
<key>CFBundleShortVersionString</key>
<string>2.0</string>
<key>CFBundleVersion</key>
<string>411</string>
<string>414</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>

View File

@ -1,2 +1,2 @@
version 2.0
build 411
build 414