mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix canImport(Sparkle)
This commit is contained in:
parent
be40aab919
commit
c767a00ed9
@ -8,6 +8,7 @@ unreleased
|
||||
### Fixes
|
||||
|
||||
- Fix an issue where the sidebar inspector did close inward when the pane was switched after opening the sidebar outward.
|
||||
- [beta][non-AppStore ver.] Fix an issue where options for the application update check in General preferences pane disappeared.
|
||||
|
||||
|
||||
|
||||
|
@ -316,10 +316,10 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
@IBAction func showAboutPanel(_ sender: Any?) {
|
||||
|
||||
var options: [NSApplication.AboutPanelOptionKey: Any] = [:]
|
||||
#if canImport(Sparkle)
|
||||
#if !canImport(Sparkle)
|
||||
// Remove Sparkle from 3rd party code list
|
||||
if let creditsURL = Bundle.main.url(forResource: "Credits", withExtension: "html"),
|
||||
let attrString = try? NSMutableAttributedString(url: creditsURL, options: [:], documentAttributes: nil),
|
||||
let attrString = try? NSMutableAttributedString(url: creditsURL, documentAttributes: nil),
|
||||
let range = attrString.string.range(of: "Sparkle.*\\n", options: .regularExpression)
|
||||
{
|
||||
attrString.replaceCharacters(in: NSRange(range, in: attrString.string), with: "")
|
||||
|
@ -44,7 +44,7 @@ final class GeneralPaneController: NSViewController {
|
||||
super.viewDidLoad()
|
||||
|
||||
// remove updater options if no Sparkle provided
|
||||
#if canImport(Sparkle)
|
||||
#if !canImport(Sparkle)
|
||||
for subview in self.view.subviews where subview.tag < 0 {
|
||||
subview.removeFromSuperview()
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ extension WebDocumentViewController: WKNavigationDelegate {
|
||||
/// receive web content
|
||||
func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!) {
|
||||
|
||||
#if canImport(Sparkle)
|
||||
#if !canImport(Sparkle)
|
||||
webView.apply(styleSheet: ".Sparkle { display: none }")
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user