Use secondary action instead of close button, which fixes #2051.

This commit is contained in:
Christoph Atteneder 2018-12-06 11:47:03 +01:00
parent 26cdbbcb53
commit 3489b36194
No known key found for this signature in database
GPG key ID: CD5DC1C529CDFD3B

View file

@ -116,13 +116,14 @@ public class PasswordView extends ActivatableView<GridPane, Void> {
pwButton.setOnAction(e -> { pwButton.setOnAction(e -> {
if (!walletsManager.areWalletsEncrypted()) { if (!walletsManager.areWalletsEncrypted()) {
new Popup<>().backgroundInfo(Res.get("password.backupReminder")) new Popup<>().backgroundInfo(Res.get("password.backupReminder"))
.closeButtonText(Res.get("password.backupWasDone")) .secondaryActionButtonText(Res.get("password.backupWasDone"))
.onClose(() -> onApplyPassword(busyAnimation, deriveStatusLabel)) .onSecondaryAction(() -> onApplyPassword(busyAnimation, deriveStatusLabel))
.actionButtonTextWithGoTo("navigation.account.walletSeed") .actionButtonTextWithGoTo("navigation.account.walletSeed")
.onAction(() -> { .onAction(() -> {
navigation.setReturnPath(navigation.getCurrentPath()); navigation.setReturnPath(navigation.getCurrentPath());
navigation.navigateTo(MainView.class, AccountView.class, SeedWordsView.class); navigation.navigateTo(MainView.class, AccountView.class, SeedWordsView.class);
}) })
.width(800)
.show(); .show();
} else { } else {
onApplyPassword(busyAnimation, deriveStatusLabel); onApplyPassword(busyAnimation, deriveStatusLabel);