From ffc1d8dc1e6ae0a696ec1dee0f975803d3e9ca34 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Fri, 22 Nov 2019 14:23:55 +0100 Subject: [PATCH] simplified --- .../recoverykey/RecoveryKeyDisplayController.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyDisplayController.java b/main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyDisplayController.java index 8272ffa23..2b61ddf85 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyDisplayController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyDisplayController.java @@ -1,9 +1,5 @@ package org.cryptomator.ui.recoverykey; -import javafx.beans.property.ReadOnlyBooleanProperty; -import javafx.beans.property.ReadOnlyStringProperty; -import javafx.beans.property.SimpleBooleanProperty; -import javafx.beans.property.StringProperty; import javafx.fxml.FXML; import javafx.print.PageLayout; import javafx.print.Printer; @@ -16,13 +12,10 @@ import javafx.scene.text.FontWeight; import javafx.scene.text.Text; import javafx.scene.text.TextFlow; import javafx.stage.Stage; -import org.cryptomator.common.vaults.Vault; import org.cryptomator.ui.common.FxController; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.inject.Inject; - public class RecoveryKeyDisplayController implements FxController { private static final Logger LOG = LoggerFactory.getLogger(RecoveryKeyDisplayController.class); @@ -30,13 +23,11 @@ public class RecoveryKeyDisplayController implements FxController { private final Stage window; private final String vaultName; private final String recoveryKey; - private final ReadOnlyBooleanProperty printerSupported; public RecoveryKeyDisplayController(Stage window, String vaultName, String recoveryKey) { this.window = window; this.vaultName = vaultName; this.recoveryKey = recoveryKey; - this.printerSupported = new SimpleBooleanProperty(Printer.getDefaultPrinter() != null); } @FXML @@ -86,12 +77,8 @@ public class RecoveryKeyDisplayController implements FxController { /* Getter/Setter */ - public ReadOnlyBooleanProperty printerSupportedProperty() { - return printerSupported; - } - public boolean isPrinterSupported() { - return printerSupported.get(); + return Printer.getDefaultPrinter() != null; } public String getRecoveryKey() {