From: Claudio Cambra Date: Wed, 31 Jul 2024 10:17:54 +0000 (+0800) Subject: Fix XIB initialisation in LockViewController X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~6^2~22^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=51fba996cb726ef5d60c1ca74d7403c6c273e4c9;p=nextcloud-desktop.git Fix XIB initialisation in LockViewController Signed-off-by: Claudio Cambra --- diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift index af24b5ea5..4e033740a 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift @@ -22,6 +22,10 @@ class LockViewController: NSViewController { @IBOutlet weak var closeButton: NSButton! @IBOutlet weak var loadingIndicator: NSProgressIndicator! + public override var nibName: NSNib.Name? { + return NSNib.Name(self.className) + } + var actionViewController: DocumentActionViewController! { return parent as? DocumentActionViewController } @@ -30,22 +34,31 @@ class LockViewController: NSViewController { self.itemIdentifiers = itemIdentifiers self.locking = locking super.init(nibName: nil, bundle: nil) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + override func viewDidLoad() { guard let firstItem = itemIdentifiers.first else { Logger.shareViewController.error("called without items") closeAction(self) return } + Logger.lockViewController.info( + """ + Locking \(self.locking ? "enabled" : "disabled", privacy: .public) for items: + \(firstItem.rawValue, privacy: .public) + """ + ) + Task { await processItemIdentifier(firstItem) } } - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - @IBAction func closeAction(_ sender: Any) { actionViewController.extensionContext.completeRequest() } diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.xib b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.xib index 0a583a09c..33c88d33e 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.xib +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.xib @@ -14,6 +14,7 @@ +