From cea9055a6561fce07fe2c086efed196c9dd1ba5d Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Thu, 16 May 2024 00:08:07 +0200 Subject: [PATCH] wizard: fix wrong icon and icon disappearing when resuming unfinished wallet --- electrum/gui/qt/wizard/wizard.py | 5 +++-- electrum/plugins/trustedcoin/qt.py | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/electrum/gui/qt/wizard/wizard.py b/electrum/gui/qt/wizard/wizard.py index b0ca3fe6c..a1146f552 100644 --- a/electrum/gui/qt/wizard/wizard.py +++ b/electrum/gui/qt/wizard/wizard.py @@ -187,8 +187,9 @@ class QEAbstractWizard(QDialog, MessageBoxMixin): self.error_msg.setText(str(page.error)) self.error.setVisible(not page.busy and bool(page.error)) icon = page.params.get('icon', icon_path('electrum.png')) - if icon and icon != self.icon_filename: - self.set_icon(icon) + if icon: + if icon != self.icon_filename: + self.set_icon(icon) self.logo.setVisible(True) else: self.logo.setVisible(False) diff --git a/electrum/plugins/trustedcoin/qt.py b/electrum/plugins/trustedcoin/qt.py index 031d83f9e..5233ea386 100644 --- a/electrum/plugins/trustedcoin/qt.py +++ b/electrum/plugins/trustedcoin/qt.py @@ -227,6 +227,8 @@ class Plugin(TrustedCoinPlugin): def init_wallet_wizard(self, wizard: 'QENewWalletWizard'): wizard.trustedcoin_qhelper = TrustedcoinPluginQObject(self, wizard, None) self.extend_wizard(wizard) + if wizard.start_viewstate and wizard.start_viewstate.view.startswith('trustedcoin_'): + wizard.start_viewstate.params.update({'icon': icon_path('trustedcoin-wizard.png')}) def extend_wizard(self, wizard: 'QENewWalletWizard'): super().extend_wizard(wizard)