From 528510eb53be6ffd7989fe67f0b6f5cc56ffa904 Mon Sep 17 00:00:00 2001
From: JaniruTEC <52893617+JaniruTEC@users.noreply.github.com>
Date: Mon, 7 Sep 2020 21:48:13 +0200
Subject: [PATCH] Renamed binding fuseAndWindows to
restrictToStableFuseOnWindows
Renamed binding fuseAndWindows to restrictToStableFuseOnWindows in MountOptionsController
See: https://github.com/cryptomator/cryptomator/pull/1307#discussion_r477135521
---
.../ui/vaultoptions/MountOptionsController.java | 15 ++++++++-------
.../main/resources/fxml/vault_options_mount.fxml | 2 +-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/main/ui/src/main/java/org/cryptomator/ui/vaultoptions/MountOptionsController.java b/main/ui/src/main/java/org/cryptomator/ui/vaultoptions/MountOptionsController.java
index df3cf7039..ff0f178dc 100644
--- a/main/ui/src/main/java/org/cryptomator/ui/vaultoptions/MountOptionsController.java
+++ b/main/ui/src/main/java/org/cryptomator/ui/vaultoptions/MountOptionsController.java
@@ -54,7 +54,7 @@ public class MountOptionsController implements FxController {
//FUSE + Windows -> Disable some (experimental) features for the user because they are unstable
//Use argument Dfuse.experimental="true" to override
- private final BooleanBinding fuseAndWindows;
+ private final BooleanBinding restrictToStableFuseOnWindows;
@Inject
MountOptionsController(@VaultOptionsWindow Stage window, @VaultOptionsWindow Vault vault, Settings settings, WindowsDriveLetters windowsDriveLetters, ResourceBundle resourceBundle, Environment environment) {
@@ -64,7 +64,8 @@ public class MountOptionsController implements FxController {
this.windowsDriveLetters = windowsDriveLetters;
this.resourceBundle = resourceBundle;
- this.fuseAndWindows = settings.preferredVolumeImpl().isEqualTo(VolumeImpl.FUSE).and(osIsWindows).and(new SimpleBooleanProperty(!environment.useExperimentalFuse()));
+ BooleanBinding isFuseOnWindows = settings.preferredVolumeImpl().isEqualTo(VolumeImpl.FUSE).and(osIsWindows);
+ this.restrictToStableFuseOnWindows = isFuseOnWindows.and(new SimpleBooleanProperty(!environment.useExperimentalFuse())); //Is FUSE on Win and is NOT experimental fuse enabled
}
@FXML
@@ -72,10 +73,10 @@ public class MountOptionsController implements FxController {
// readonly:
readOnlyCheckbox.selectedProperty().bindBidirectional(vault.getVaultSettings().usesReadOnlyMode());
- if(isFuseAndWindows()) {
+ if(getRestrictToStableFuseOnWindows()) {
readOnlyCheckbox.setSelected(false); // to prevent invalid states
}
- readOnlyCheckbox.disableProperty().bind(customMountFlagsCheckbox.selectedProperty().or(fuseAndWindows));
+ readOnlyCheckbox.disableProperty().bind(customMountFlagsCheckbox.selectedProperty().or(restrictToStableFuseOnWindows));
// custom mount flags:
mountFlags.disableProperty().bind(customMountFlagsCheckbox.selectedProperty().not());
@@ -93,7 +94,7 @@ public class MountOptionsController implements FxController {
driveLetterSelection.setConverter(new WinDriveLetterLabelConverter(windowsDriveLetters, resourceBundle));
driveLetterSelection.setValue(vault.getVaultSettings().winDriveLetter().get());
- if (vault.getVaultSettings().useCustomMountPath().get() && !isFuseAndWindows() /* to prevent invalid states */) {
+ if (vault.getVaultSettings().useCustomMountPath().get() && !getRestrictToStableFuseOnWindows() /* to prevent invalid states */) {
mountPoint.selectToggle(mountPointCustomDir);
} else if (!Strings.isNullOrEmpty(vault.getVaultSettings().winDriveLetter().get())) {
mountPoint.selectToggle(mountPointWinDriveLetter);
@@ -201,8 +202,8 @@ public class MountOptionsController implements FxController {
return vault.getVaultSettings().customMountPath().get();
}
- public Boolean isFuseAndWindows() {
- return fuseAndWindows.get();
+ public Boolean getRestrictToStableFuseOnWindows() {
+ return restrictToStableFuseOnWindows.get();
}
}
diff --git a/main/ui/src/main/resources/fxml/vault_options_mount.fxml b/main/ui/src/main/resources/fxml/vault_options_mount.fxml
index bf65249a5..3fa3abaa5 100644
--- a/main/ui/src/main/resources/fxml/vault_options_mount.fxml
+++ b/main/ui/src/main/resources/fxml/vault_options_mount.fxml
@@ -44,7 +44,7 @@
-
+