From 6199277002ec3afe9b317137983de0b939e8f974 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Thu, 29 Dec 2022 18:26:13 +0100 Subject: [PATCH] Add Button to open preferences --- .../ui/keyloading/hub/NoKeychainController.java | 10 +++++++++- src/main/resources/fxml/hub_no_keychain.fxml | 1 + src/main/resources/i18n/strings.properties | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/cryptomator/ui/keyloading/hub/NoKeychainController.java b/src/main/java/org/cryptomator/ui/keyloading/hub/NoKeychainController.java index 048200815..118152e1f 100644 --- a/src/main/java/org/cryptomator/ui/keyloading/hub/NoKeychainController.java +++ b/src/main/java/org/cryptomator/ui/keyloading/hub/NoKeychainController.java @@ -1,7 +1,9 @@ package org.cryptomator.ui.keyloading.hub; import org.cryptomator.ui.common.FxController; +import org.cryptomator.ui.fxapp.FxApplicationWindows; import org.cryptomator.ui.keyloading.KeyLoading; +import org.cryptomator.ui.preferences.SelectedPreferencesTab; import javax.inject.Inject; import javafx.stage.Stage; @@ -9,10 +11,12 @@ import javafx.stage.Stage; public class NoKeychainController implements FxController { private final Stage window; + private final FxApplicationWindows appWindows; @Inject - public NoKeychainController(@KeyLoading Stage window) { + public NoKeychainController(@KeyLoading Stage window, FxApplicationWindows appWindows) { this.window = window; + this.appWindows = appWindows; } @@ -20,4 +24,8 @@ public class NoKeychainController implements FxController { window.close(); } + public void openPreferences() { + appWindows.showPreferencesWindow(SelectedPreferencesTab.GENERAL); + window.close(); + } } diff --git a/src/main/resources/fxml/hub_no_keychain.fxml b/src/main/resources/fxml/hub_no_keychain.fxml index c3775af9f..5d8846e59 100644 --- a/src/main/resources/fxml/hub_no_keychain.fxml +++ b/src/main/resources/fxml/hub_no_keychain.fxml @@ -47,6 +47,7 @@