Set progress label to "Optimizing…" when optimising.
This commit is contained in:
6 files changed
+39
-11
No files matched your search
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14087.3" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14092" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14087.3"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14092"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -159,7 +159,10 @@ import IOKit.pwr_mgt
|
||||
}
|
||||
|
||||
if optimize {
|
||||
// TODO: Update progress string
|
||||
DispatchQueue.main.async {
|
||||
let docController = self.windowControllers.first as? DocumentWindowController
|
||||
docController?.setProgress(title: NSLocalizedString("Optimizing…", comment: "Document Optimize sheet."))
|
||||
}
|
||||
mp4.optimize()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,6 +244,13 @@ class DocumentWindowController: NSWindowController, TracksViewControllerDelegate
|
||||
}
|
||||
}
|
||||
|
||||
func setProgress(title: String) {
|
||||
if let progressController = self.progressController {
|
||||
progressController.progressString.stringValue = title
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func endProgressReporting() {
|
||||
if let progressController = self.progressController {
|
||||
contentViewController?.dismissViewController(progressController)
|
||||
|
||||
Reference in new issue
Block a user