Преглед на файлове

removed checkbox in quit prompt

Jan-Peter Klein преди 3 години
родител
ревизия
6f33cf8df7
променени са 3 файла, в които са добавени 3 реда и са изтрити 16 реда
  1. 1 9
      src/main/java/org/cryptomator/ui/quit/QuitController.java
  2. 1 5
      src/main/resources/fxml/quit.fxml
  3. 1 2
      src/main/resources/i18n/strings.properties

+ 1 - 9
src/main/java/org/cryptomator/ui/quit/QuitController.java

@@ -12,7 +12,6 @@ import javafx.collections.ObservableList;
 import javafx.concurrent.Task;
 import javafx.fxml.FXML;
 import javafx.scene.control.Button;
-import javafx.scene.control.CheckBox;
 import javafx.scene.control.ContentDisplay;
 import javafx.stage.Stage;
 import java.awt.desktop.QuitResponse;
@@ -32,10 +31,9 @@ public class QuitController implements FxController {
 	private final ExecutorService executorService;
 	private final VaultService vaultService;
 	private final AtomicReference<QuitResponse> quitResponse = new AtomicReference<>();
-	private final Settings settings;
+
 	/* FXML */
 	public Button lockAndQuitButton;
-	public CheckBox rememberAlwaysLockAndQuitCheckbox;
 
 	@Inject
 	QuitController(@QuitWindow Stage window, ObservableList<Vault> vaults, ExecutorService executorService, VaultService vaultService, Settings settings) {
@@ -43,15 +41,9 @@ public class QuitController implements FxController {
 		this.unlockedVaults = vaults.filtered(Vault::isUnlocked);
 		this.executorService = executorService;
 		this.vaultService = vaultService;
-		this.settings = settings;
 		window.setOnCloseRequest(windowEvent -> cancel());
 	}
 
-	@FXML
-	public void initialize() {
-		rememberAlwaysLockAndQuitCheckbox.selectedProperty().bindBidirectional(settings.autoCloseVaults());
-	}
-
 	public void updateQuitRequest(QuitResponse newResponse) {
 		var oldResponse = quitResponse.getAndSet(newResponse);
 		if (oldResponse != null) {

+ 1 - 5
src/main/resources/fxml/quit.fxml

@@ -10,7 +10,6 @@
 <?import javafx.scene.layout.StackPane?>
 <?import javafx.scene.layout.VBox?>
 <?import javafx.scene.shape.Circle?>
-<?import javafx.scene.control.CheckBox?>
 <VBox xmlns:fx="http://javafx.com/fxml"
 	  xmlns="http://javafx.com/javafx"
 	  fx:controller="org.cryptomator.ui.quit.QuitController"
@@ -27,10 +26,7 @@
 				<Circle styleClass="glyph-icon-primary" radius="24"/>
 				<FontAwesome5IconView styleClass="glyph-icon-white" glyph="QUESTION" glyphSize="24"/>
 			</StackPane>
-			<VBox alignment="CENTER_LEFT" VBox.vgrow="ALWAYS">
-				<Label text="%quit.prompt" wrapText="true" textAlignment="LEFT" HBox.hgrow="ALWAYS"/>
-				<CheckBox text="%quit.prompt.rememberAlwaysLockAndQuitCheckbox" fx:id="rememberAlwaysLockAndQuitCheckbox"/>
-			</VBox>
+			<Label text="%quit.prompt" wrapText="true" textAlignment="LEFT" HBox.hgrow="ALWAYS"/>
 		</HBox>
 
 		<VBox alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS">

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

@@ -382,5 +382,4 @@ passwordStrength.messageLabel.4=Very strong
 
 # Quit
 quit.prompt=Quit application? There are unlocked vaults.
-quit.lockAndQuit=Lock and Quit
-quit.prompt.rememberAlwaysLockAndQuitCheckbox=Always lock all vaults and quit application
+quit.lockAndQuit=Lock and Quit