diff --git a/src/main/java/org/cryptomator/ui/preferences/SupporterCertificateController.java b/src/main/java/org/cryptomator/ui/preferences/SupporterCertificateController.java index 77b614b1b..8d9cbe505 100644 --- a/src/main/java/org/cryptomator/ui/preferences/SupporterCertificateController.java +++ b/src/main/java/org/cryptomator/ui/preferences/SupporterCertificateController.java @@ -23,6 +23,7 @@ public class SupporterCertificateController implements FxController { private static final String SUPPORTER_URI = "https://store.cryptomator.org/desktop"; private final Application application; + private final Stage window; private final LicenseHolder licenseHolder; private final Settings settings; private final RemoveCertComponent.Builder removeCert; @@ -31,8 +32,9 @@ public class SupporterCertificateController implements FxController { private TextArea supporterCertificateField; @Inject - SupporterCertificateController(Application application, LicenseHolder licenseHolder, Settings settings, RemoveCertComponent.Builder removeCert) { + SupporterCertificateController(Application application, @PreferencesWindow Stage window, LicenseHolder licenseHolder, Settings settings, RemoveCertComponent.Builder removeCert) { this.application = application; + this.window = window; this.licenseHolder = licenseHolder; this.settings = settings; this.removeCert = removeCert; @@ -82,8 +84,7 @@ public class SupporterCertificateController implements FxController { @FXML void didClickRemoveCert() { - Stage pref = (Stage) supporterCertificateField.getScene().getWindow(); - removeCert.build().showRemoveCert(pref); + removeCert.build().showRemoveCert((Stage)window.getScene().getWindow()); } public LicenseHolder getLicenseHolder() { diff --git a/src/main/resources/i18n/strings.properties b/src/main/resources/i18n/strings.properties index c3756e20f..216ba55fe 100644 --- a/src/main/resources/i18n/strings.properties +++ b/src/main/resources/i18n/strings.properties @@ -341,10 +341,10 @@ preferences.contribute.donate=Donate preferences.contribute.sponsor=Sponsor ### Remove License Key Dialog -removeCert.title=Remove Cert +removeCert.title=Remove Certificate removeCert.message=Remove supporter certificate? removeCert.description=Even without a supporter certificate Cryptomator stays functional and neither restrict access to your vaults nor lowers its security. -removeCert.confirmBtn=Remove Cert +removeCert.confirmBtn=Remove #<-- Add entries for donations and code/translation/documentation contribution --> ## About