Fix Sparkle availability

This commit is contained in:
1024jp 2018-05-15 10:13:26 +09:00
parent 08c972839d
commit 9b84348d81
4 changed files with 12 additions and 3 deletions

View File

@ -2,6 +2,15 @@
Change Log
==========================
unreleased
--------------------------
### Fixes
- [AppStore ver.] Fix an issue where the options for the software updator for the non AppStore were wrongly displayed in General preferences pane.
3.4.0 (251)
--------------------------

View File

@ -322,7 +322,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
@IBAction func showAboutPanel(_ sender: Any?) {
var options: [NSApplication.AboutPanelOptionKey: Any] = [:]
#if !canImport(Sparkle)
#if APPSTORE
// Remove Sparkle from 3rd party code list
if let creditsURL = Bundle.main.url(forResource: "Credits", withExtension: "html"),
let attrString = try? NSMutableAttributedString(url: creditsURL, documentAttributes: nil),

View File

@ -44,7 +44,7 @@ final class GeneralPaneController: NSViewController {
super.viewDidLoad()
// remove updater options if no Sparkle provided
#if !canImport(Sparkle)
#if APPSTORE
for subview in self.view.subviews where subview.tag < 0 {
subview.removeFromSuperview()
}

View File

@ -95,7 +95,7 @@ extension WebDocumentViewController: WKNavigationDelegate {
/// receive web content
func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!) {
#if !canImport(Sparkle)
#if APPSTORE
webView.apply(styleSheet: ".Sparkle { display: none }")
#endif
}