showing custom mountPath if selected

This commit is contained in:
Armin Schrenk
2019-10-16 16:58:50 +02:00
parent c1a5e187b6
commit 7a1e20d732
2 changed files with 12 additions and 1 deletions
@@ -3,6 +3,7 @@ package org.cryptomator.ui.vaultoptions;
import javafx.beans.binding.BooleanBinding;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.StringProperty;
import javafx.fxml.FXML;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ChoiceBox;
@@ -72,6 +73,8 @@ public class MountOptionsController implements FxController {
toggleGroup.getToggles().addAll(automaticDriveLetter, specificDriveLetter, specificDirectory);
initDriveLetterSelection();
//TODO: set the toggleGroup correctly at init
}
private void initDriveLetterSelection() {
@@ -217,4 +220,12 @@ public class MountOptionsController implements FxController {
return adapterIsDokan.get();
}
public StringProperty customMountPathProperty(){
return vault.getVaultSettings().individualMountPath();
}
public String getCustomMountPath(){
return vault.getVaultSettings().individualMountPath().get();
}
}
@@ -50,7 +50,7 @@
<Insets left="25"/>
</padding>
<children>
<TextField fx:id="mntDir" HBox.hgrow="ALWAYS" maxWidth="Infinity"/>
<TextField fx:id="mntDir" text="${controller.customMountPath}" HBox.hgrow="ALWAYS" maxWidth="Infinity" disable="true"/>
</children>
</HBox>
</children>