浏览代码

showing custom mountPath if selected

Armin Schrenk 5 年之前
父节点
当前提交
7a1e20d732

+ 11 - 0
main/ui/src/main/java/org/cryptomator/ui/vaultoptions/MountOptionsController.java

@@ -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();
+	}
+
 }

+ 1 - 1
main/ui/src/main/resources/fxml/vault_options_mount.fxml

@@ -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>