From 708b5938ac41557f36a7c172466f8baaa34ca6d4 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 23 Jan 2023 13:11:01 +0100 Subject: [PATCH] Add info about the dependency of volume type and mountOptions --- .../ui/vaultoptions/MountOptionsController.java | 11 ++++++++++- src/main/resources/fxml/vault_options_mount.fxml | 9 ++++++++- src/main/resources/i18n/strings.properties | 2 ++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/vaultoptions/MountOptionsController.java b/src/main/java/org/cryptomator/ui/vaultoptions/MountOptionsController.java index de5cbd1a7..79999a922 100644 --- a/src/main/java/org/cryptomator/ui/vaultoptions/MountOptionsController.java +++ b/src/main/java/org/cryptomator/ui/vaultoptions/MountOptionsController.java @@ -7,6 +7,8 @@ import org.cryptomator.common.settings.VaultSettings; import org.cryptomator.common.vaults.Vault; import org.cryptomator.integrations.mount.MountCapability; import org.cryptomator.ui.common.FxController; +import org.cryptomator.ui.fxapp.FxApplicationWindows; +import org.cryptomator.ui.preferences.SelectedPreferencesTab; import javax.inject.Inject; import javafx.beans.value.ObservableValue; @@ -41,6 +43,7 @@ public class MountOptionsController implements FxController { private final ObservableValue readOnlySupported; private final ObservableValue mountFlagsSupported; private final ObservableValue directoryPath; + private final FxApplicationWindows applicationWindows; //-- FXML objects -- @@ -55,7 +58,7 @@ public class MountOptionsController implements FxController { public ChoiceBox driveLetterSelection; @Inject - MountOptionsController(@VaultOptionsWindow Stage window, @VaultOptionsWindow Vault vault, ObservableValue mountService, WindowsDriveLetters windowsDriveLetters, ResourceBundle resourceBundle) { + MountOptionsController(@VaultOptionsWindow Stage window, @VaultOptionsWindow Vault vault, ObservableValue mountService, WindowsDriveLetters windowsDriveLetters, ResourceBundle resourceBundle, FxApplicationWindows applicationWindows) { this.window = window; this.vaultSettings = vault.getVaultSettings(); this.windowsDriveLetters = windowsDriveLetters; @@ -72,6 +75,7 @@ public class MountOptionsController implements FxController { this.mountFlagsSupported = mountService.map(as -> as.service().hasCapability(MountCapability.MOUNT_FLAGS)); this.readOnlySupported = mountService.map(as -> as.service().hasCapability(MountCapability.READ_ONLY)); this.directoryPath = vault.getVaultSettings().mountPoint().map(p -> isDriveLetter(p) ? null : p.toString()); + this.applicationWindows = applicationWindows; } @FXML @@ -104,6 +108,11 @@ public class MountOptionsController implements FxController { mountPointToggleGroup.selectedToggleProperty().addListener(this::selectedToggleChanged); } + @FXML + public void openVolumePreferences() { + applicationWindows.showPreferencesWindow(SelectedPreferencesTab.VOLUME); + } + @FXML public void toggleUseCustomMountFlags() { if (customMountFlagsCheckbox.isSelected()) { diff --git a/src/main/resources/fxml/vault_options_mount.fxml b/src/main/resources/fxml/vault_options_mount.fxml index ce616c8b8..0c493fe90 100644 --- a/src/main/resources/fxml/vault_options_mount.fxml +++ b/src/main/resources/fxml/vault_options_mount.fxml @@ -5,12 +5,15 @@ + + + -