Browse Source

Changed forced lock description and clean up

Armin Schrenk 4 years ago
parent
commit
51aac15622

+ 5 - 3
main/ui/src/main/java/org/cryptomator/ui/lock/LockForcedController.java

@@ -7,7 +7,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.inject.Inject;
-import javafx.event.ActionEvent;
+import javafx.fxml.FXML;
 import javafx.stage.Stage;
 import javafx.stage.WindowEvent;
 
@@ -28,18 +28,20 @@ public class LockForcedController implements FxController {
 		this.window.setOnHiding(this::windowClosed);
 	}
 
+	@FXML
 	public void cancel() {
 		forceLockDecisionLock.interacted(LockModule.ForceLockDecision.CANCEL);
 		window.close();
 	}
 
-	public void confirmForcedLock(ActionEvent actionEvent) {
+	@FXML
+	public void confirmForcedLock() {
 		forceLockDecisionLock.interacted(LockModule.ForceLockDecision.FORCE);
 		window.close();
 	}
 
 	private void windowClosed(WindowEvent windowEvent) {
-		// if not already interacted, mark this workflow as cancelled:
+		// if not already interacted, set the decision to CANCEL
 		if (forceLockDecisionLock.awaitingInteraction().get()) {
 			LOG.debug("Lock canceled in force-lock-phase by user.");
 			forceLockDecisionLock.interacted(LockModule.ForceLockDecision.CANCEL);

+ 1 - 1
main/ui/src/main/resources/i18n/strings.properties

@@ -111,7 +111,7 @@ unlock.error.invalidMountPoint.existing=Mount point "%s" already exists or paren
 # Lock
 ## Force
 lock.forced.heading=Forcefully Lock Vault?
-lock.forced.message=The vault "%s" cannot be locked due to open files or pending operations. Close those files and wait until I/O operations are finished and try again.\n Alternatively, you can enforce locking risking to loose unsaved data.
+lock.forced.message=The vault "%s" cannot be locked due to open files or pending operations. You can enforce locking, but unsaved data will be lost and pending read/write operations aborted.
 lock.forced.confirmBtn=Force Locking
 ## Failure
 lock.fail.heading=Locking Vault failed