Changed forced lock description and clean up

This commit is contained in:
Armin Schrenk
2020-11-20 12:23:44 +01:00
parent afa0cfeafb
commit 51aac15622
2 changed files with 6 additions and 4 deletions
@@ -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);
@@ -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