From 31b0f4e184fc7eb646649a41af22100a020c7611 Mon Sep 17 00:00:00 2001 From: woodser Date: Mon, 11 Jul 2022 11:02:09 -0400 Subject: [PATCH] remove popups todo: remove entries from displayStrings.properties --- .../java/bisq/desktop/main/MainViewModel.java | 16 ++-------------- .../bisq/desktop/main/account/AccountView.java | 8 -------- .../desktop/main/offer/MutableOfferView.java | 10 ---------- .../main/offer/MutableOfferViewModel.java | 1 - .../main/offer/takeoffer/TakeOfferView.java | 12 +----------- .../desktop/main/settings/SettingsView.java | 6 ------ .../main/java/bisq/desktop/util/GUIUtil.java | 18 ------------------ 7 files changed, 3 insertions(+), 68 deletions(-) diff --git a/desktop/src/main/java/bisq/desktop/main/MainViewModel.java b/desktop/src/main/java/bisq/desktop/main/MainViewModel.java index 3b4b742567..996f84ecd8 100644 --- a/desktop/src/main/java/bisq/desktop/main/MainViewModel.java +++ b/desktop/src/main/java/bisq/desktop/main/MainViewModel.java @@ -361,11 +361,7 @@ public class MainViewModel implements ViewModel, HavenoSetup.HavenoSetupListener .onClose(privateNotificationManager::removePrivateNotification) .useIUnderstandButton() .show()); - bisqSetup.setDisplaySecurityRecommendationHandler(key -> - new Popup().headLine(Res.get("popup.securityRecommendation.headline")) - .information(Res.get("popup.securityRecommendation.msg")) - .dontShowAgainId(key) - .show()); + bisqSetup.setDisplaySecurityRecommendationHandler(key -> {}); bisqSetup.setDisplayLocalhostHandler(key -> { if (!DevEnv.isDevMode()) { Popup popup = new Popup().backgroundInfo(Res.get("popup.bitcoinLocalhostNode.msg")) @@ -397,15 +393,7 @@ public class MainViewModel implements ViewModel, HavenoSetup.HavenoSetupListener // We copy the array as we will mutate it later showAmazonGiftCardAccountUpdateWindow(new ArrayList<>(amazonGiftCardAccountList)); }); - bisqSetup.setOsxKeyLoggerWarningHandler(() -> { - String key = "osxKeyLoggerWarning"; - if (preferences.showAgain(key)) { - new Popup().warning(Res.get("popup.warning.osxKeyLoggerWarning")) - .closeButtonText(Res.get("shared.iUnderstand")) - .dontShowAgainId(key) - .show(); - } - }); + bisqSetup.setOsxKeyLoggerWarningHandler(() -> { }); bisqSetup.setQubesOSInfoHandler(() -> { String key = "qubesOSSetupInfo"; if (preferences.showAgain(key)) { diff --git a/desktop/src/main/java/bisq/desktop/main/account/AccountView.java b/desktop/src/main/java/bisq/desktop/main/account/AccountView.java index 64c394f15e..040778261b 100644 --- a/desktop/src/main/java/bisq/desktop/main/account/AccountView.java +++ b/desktop/src/main/java/bisq/desktop/main/account/AccountView.java @@ -270,14 +270,6 @@ public class AccountView extends ActivatableView { else navigation.navigateTo(MainView.class, AccountView.class, FiatAccountsView.class); } - - String key = "accountPrivacyInfo"; - if (!DevEnv.isDevMode()) - new Popup() - .headLine(Res.get("account.info.headline")) - .backgroundInfo(Res.get("account.info.msg")) - .dontShowAgainId(key) - .show(); } @Override diff --git a/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferView.java b/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferView.java index b2164bf087..8c0e7ab657 100644 --- a/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferView.java +++ b/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferView.java @@ -419,16 +419,6 @@ public abstract class MutableOfferView> exten balanceTextField.setTargetAmount(model.getDataModel().totalToPayAsCoinProperty().get()); - if (!DevEnv.isDevMode()) { - String key = "securityDepositInfo"; - new Popup().backgroundInfo(Res.get("popup.info.securityDepositInfo")) - .actionButtonText(Res.get("shared.faq")) - .onAction(() -> GUIUtil.openWebPage("https://bisq.wiki/Frequently_asked_questions#Why_does_Bisq_require_a_security_deposit_in_BTC.3F")) - .useIUnderstandButton() - .dontShowAgainId(key) - .show(); - } - // temporarily disabled due to high CPU usage (per issue #4649) // waitingForFundsSpinner.play(); diff --git a/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java b/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java index 81b284a534..e31f460d38 100644 --- a/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java +++ b/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java @@ -1208,7 +1208,6 @@ public abstract class MutableOfferViewModel ext Coin checkAmount = dataModel.getMinAmount().get() == null ? dataModel.getAmount().get() : dataModel.getMinAmount().get(); if (checkAmount != null && !checkAmount.isGreaterThan(OfferRestrictions.TOLERATED_SMALL_TRADE_AMOUNT)) { makeOfferFromUnsignedAccountWarningDisplayed = true; - GUIUtil.showMakeOfferToUnsignedAccountWarning(); } } } diff --git a/desktop/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferView.java b/desktop/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferView.java index 7fa6830ff0..172348a1ec 100644 --- a/desktop/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferView.java +++ b/desktop/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferView.java @@ -450,15 +450,6 @@ public class TakeOfferView extends ActivatableViewAndModel GUIUtil.openWebPage("https://bisq.wiki/Frequently_asked_questions#Why_does_Bisq_require_a_security_deposit_in_BTC.3F")) - .useIUnderstandButton() - .dontShowAgainId(key) - .show(); - - String tradeAmountText = model.isSeller() ? Res.get("takeOffer.takeOfferFundWalletInfo.tradeAmount", model.getTradeAmount()) : ""; String message = Res.get("takeOffer.takeOfferFundWalletInfo.msg", model.getTotalToPayInfo(), @@ -467,7 +458,7 @@ public class TakeOfferView extends ActivatableViewAndModel GUIUtil.showTakeOfferFromUnsignedAccountWarning(), 500, TimeUnit.MILLISECONDS); } } diff --git a/desktop/src/main/java/bisq/desktop/main/settings/SettingsView.java b/desktop/src/main/java/bisq/desktop/main/settings/SettingsView.java index d6caaccc4e..6065c3bd7c 100644 --- a/desktop/src/main/java/bisq/desktop/main/settings/SettingsView.java +++ b/desktop/src/main/java/bisq/desktop/main/settings/SettingsView.java @@ -89,12 +89,6 @@ public class SettingsView extends ActivatableView { protected void activate() { // Hide new badge if user saw this section preferences.dontShowAgain(SettingsPresentation.SETTINGS_NEWS, true); - String key = "autoConfirmInfo"; - new Popup() - .headLine(Res.get("setting.info.headline")) - .backgroundInfo(Res.get("setting.info.msg")) - .dontShowAgainId(key) - .show(); root.getSelectionModel().selectedItemProperty().addListener(tabChangeListener); navigation.addListener(navigationListener); diff --git a/desktop/src/main/java/bisq/desktop/util/GUIUtil.java b/desktop/src/main/java/bisq/desktop/util/GUIUtil.java index e8a0838c21..10b1be3fce 100644 --- a/desktop/src/main/java/bisq/desktop/util/GUIUtil.java +++ b/desktop/src/main/java/bisq/desktop/util/GUIUtil.java @@ -699,24 +699,6 @@ public class GUIUtil { return t.cast(parent); } - public static void showTakeOfferFromUnsignedAccountWarning() { - String key = "confirmTakeOfferFromUnsignedAccount"; - new Popup().warning(Res.get("payment.takeOfferFromUnsignedAccount.warning")) - .width(900) - .closeButtonText(Res.get("shared.iConfirm")) - .dontShowAgainId(key) - .show(); - } - - public static void showMakeOfferToUnsignedAccountWarning() { - String key = "confirmMakeOfferToUnsignedAccount"; - new Popup().warning(Res.get("payment.makeOfferToUnsignedAccount.warning")) - .width(900) - .closeButtonText(Res.get("shared.iConfirm")) - .dontShowAgainId(key) - .show(); - } - public static void showClearXchangeWarning() { String key = "confirmClearXchangeRequirements"; final String currencyName = Config.baseCurrencyNetwork().getCurrencyName();