From 19316f4d3a530d2a3f96afed25dae94cd13a077f Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 4 Mar 2024 21:35:25 +0800 Subject: [PATCH] Add convenience function to enable or disable all share option fields Signed-off-by: Claudio Cambra --- .../FileProviderUIExt/ShareOptionsView.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift index 6a3e63c31..5aebe0fb7 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift @@ -62,4 +62,18 @@ class ShareOptionsView: NSView { noteForRecipientCheckbox.state = .off noteTextField.isHidden = true } + + func setAllFields(enabled: Bool) { + labelTextField.isEnabled = enabled + uploadEditPermissionCheckbox.isEnabled = enabled + hideDownloadCheckbox.isEnabled = enabled + passwordProtectCheckbox.isEnabled = enabled + passwordSecureField.isEnabled = enabled + expirationDateCheckbox.isEnabled = enabled + expirationDatePicker.isEnabled = enabled + noteForRecipientCheckbox.isEnabled = enabled + noteTextField.isEnabled = enabled + saveButton.isEnabled = enabled + deleteButton.isEnabled = enabled + } }