fix: remove TextInputLayout
This commit is contained in:
parent
6fe69de1b0
commit
e01e7d8562
|
@ -11,7 +11,7 @@ from electrum.util import UserCancelled
|
||||||
from electrum.base_wizard import BaseWizard
|
from electrum.base_wizard import BaseWizard
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
|
|
||||||
from seed_dialog import SeedLayout, TextInputLayout
|
from seed_dialog import SeedLayout
|
||||||
from network_dialog import NetworkChoiceLayout
|
from network_dialog import NetworkChoiceLayout
|
||||||
from util import *
|
from util import *
|
||||||
from password_dialog import PasswordLayout, PW_NEW
|
from password_dialog import PasswordLayout, PW_NEW
|
||||||
|
@ -244,9 +244,9 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
||||||
self.config.remove_from_recently_open(filename)
|
self.config.remove_from_recently_open(filename)
|
||||||
|
|
||||||
def text_input(self, title, message, is_valid):
|
def text_input(self, title, message, is_valid):
|
||||||
slayout = TextInputLayout(self, message, is_valid)
|
slayout = SeedLayout(parent=self, title=message, is_seed=is_valid, icon=False)
|
||||||
self.set_main_layout(slayout.layout(), title, next_enabled=False)
|
self.set_main_layout(slayout.layout(), title, next_enabled=False)
|
||||||
return slayout.get_text()
|
return slayout.get_seed()
|
||||||
|
|
||||||
def seed_input(self, title, message, is_seed, options):
|
def seed_input(self, title, message, is_seed, options):
|
||||||
slayout = SeedLayout(title=message, is_seed=is_seed, options=options, parent=self)
|
slayout = SeedLayout(title=message, is_seed=is_seed, options=options, parent=self)
|
||||||
|
|
|
@ -146,22 +146,6 @@ class SeedLayout(QVBoxLayout):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class TextInputLayout(SeedLayout):
|
|
||||||
|
|
||||||
def __init__(self, parent, title, is_valid):
|
|
||||||
self.is_valid = is_valid
|
|
||||||
self.parent = parent
|
|
||||||
self.layout_ = self._seed_layout(title=title, icon=False)
|
|
||||||
self.seed_e.textChanged.connect(self.on_edit)
|
|
||||||
|
|
||||||
def get_text(self):
|
|
||||||
return clean_text(self.seed_edit())
|
|
||||||
|
|
||||||
def on_edit(self):
|
|
||||||
self.parent.next_button.setEnabled(self.is_valid(self.get_text()))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SeedDialog(WindowModalDialog):
|
class SeedDialog(WindowModalDialog):
|
||||||
|
|
||||||
def __init__(self, parent, seed, passphrase):
|
def __init__(self, parent, seed, passphrase):
|
||||||
|
|
Loading…
Reference in New Issue