1
0

wizard: "terms of use": add version number

follow-up https://github.com/spesmilo/electrum/pull/9794
This commit is contained in:
SomberNight
2025-05-07 13:59:00 +00:00
parent 5300088ef8
commit 151b64da84
5 changed files with 13 additions and 10 deletions

View File

@@ -74,6 +74,7 @@ from electrum.keystore import load_keystore
from electrum.bip32 import is_xprv
from electrum.gui.common_qt.i18n import ElectrumTranslator
from electrum.gui.messages import TERMS_OF_USE_LATEST_VERSION
from .util import read_QIcon, ColorScheme, custom_message_box, MessageBoxMixin, WWLabel
from .main_window import ElectrumWindow
@@ -504,7 +505,7 @@ class ElectrumGui(BaseElectrumGui, Logger):
"""Ask the user to accept the terms of use.
This is only shown if the user has not accepted them yet.
"""
if self.config.TERMS_OF_USE_ACCEPTED:
if self.config.TERMS_OF_USE_ACCEPTED >= TERMS_OF_USE_LATEST_VERSION:
return
from electrum.gui.qt.wizard.terms_of_use import QETermsOfUseWizard
dialog = QETermsOfUseWizard(self.config, self.app)

View File

@@ -6,7 +6,7 @@ from PyQt6.QtWidgets import QLabel, QHBoxLayout, QScrollArea
from electrum.i18n import _
from electrum.wizard import TermsOfUseWizard
from electrum.gui.qt.util import icon_path
from electrum.gui.qt.util import icon_path, WWLabel
from electrum.gui import messages
from .wizard import QEAbstractWizard, WizardComponent
@@ -48,9 +48,8 @@ class WCTermsOfUseScreen(WizardComponent):
self.layout().addLayout(hbox_img)
self.tos_label = QLabel()
self.tos_label = WWLabel()
self.tos_label.setText(messages.MSG_TERMS_OF_USE)
self.tos_label.setWordWrap(True)
self.layout().addWidget(self.tos_label)
self._valid = False