From: Claudio Cambra Date: Tue, 30 Jul 2024 09:43:39 +0000 (+0800) Subject: Add close action to lock view controller X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~6^2~22^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1b2fc0e0340c0412dc75bc81648b29a0b8b7e8f5;p=nextcloud-desktop.git Add close action to lock view controller 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 03a7b184a..2d7b47357 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift @@ -21,6 +21,10 @@ class LockViewController: NSViewController { @IBOutlet weak var closeButton: NSButton! @IBOutlet weak var loadingIndicator: NSProgressIndicator! + var actionViewController: DocumentActionViewController! { + return parent as? DocumentActionViewController + } + init(_ itemIdentifiers: [NSFileProviderItemIdentifier], locking: Bool) { self.itemIdentifiers = itemIdentifiers self.locking = locking @@ -30,4 +34,8 @@ class LockViewController: NSViewController { 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 61843b01c..0a583a09c 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.xib +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.xib @@ -80,6 +80,9 @@ + + +