diff --git a/main/ui/src/main/java/org/cryptomator/ui/controllers/SettingsController.java b/main/ui/src/main/java/org/cryptomator/ui/controllers/SettingsController.java index a3924d59d..8c1454404 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/controllers/SettingsController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/controllers/SettingsController.java @@ -10,6 +10,7 @@ package org.cryptomator.ui.controllers; import com.google.common.base.CharMatcher; import com.google.common.base.Strings; +import javafx.beans.Observable; import javafx.beans.binding.Bindings; import javafx.event.ActionEvent; import javafx.fxml.FXML; @@ -93,6 +94,7 @@ public class SettingsController implements ViewController { volume.getItems().addAll(Volume.getCurrentSupportedAdapters()); volume.setValue(settings.preferredVolumeImpl().get()); volume.setConverter(new NioAdapterImplStringConverter()); + volume.valueProperty().addListener(this::setVisibilityGvfsElements); //WEBDAV webdavSettings.visibleProperty().bind(volume.valueProperty().isEqualTo(VolumeImpl.WEBDAV)); @@ -157,6 +159,11 @@ public class SettingsController implements ViewController { } } + private void setVisibilityGvfsElements(Observable obs, Object oldValue, Object newValue) { + prefGvfsSchemeLabel.setVisible(SystemUtils.IS_OS_LINUX && ((VolumeImpl) newValue).getDisplayName().equals("WebDAV")); + prefGvfsScheme.setVisible(SystemUtils.IS_OS_LINUX && ((VolumeImpl) newValue).getDisplayName().equals("WebDAV")); + } + private boolean areUpdatesManagedExternally() { return Boolean.parseBoolean(System.getProperty("cryptomator.updatesManagedExternally", "false")); } diff --git a/main/ui/src/main/resources/fxml/settings.fxml b/main/ui/src/main/resources/fxml/settings.fxml index 009cb8b6b..5748a0668 100644 --- a/main/ui/src/main/resources/fxml/settings.fxml +++ b/main/ui/src/main/resources/fxml/settings.fxml @@ -7,7 +7,6 @@ Contributors: Sebastian Stenzel - initial API and implementation --> - @@ -19,7 +18,6 @@ -