Browse Source

fix: remove TextInputLayout

master
ThomasV 9 years ago
parent
commit
e01e7d8562
  1. 6
      gui/qt/installwizard.py
  2. 16
      gui/qt/seed_dialog.py

6
gui/qt/installwizard.py

@ -11,7 +11,7 @@ from electrum.util import UserCancelled
from electrum.base_wizard import BaseWizard
from electrum.i18n import _
from seed_dialog import SeedLayout, TextInputLayout
from seed_dialog import SeedLayout
from network_dialog import NetworkChoiceLayout
from util import *
from password_dialog import PasswordLayout, PW_NEW
@ -244,9 +244,9 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
self.config.remove_from_recently_open(filename)
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)
return slayout.get_text()
return slayout.get_seed()
def seed_input(self, title, message, is_seed, options):
slayout = SeedLayout(title=message, is_seed=is_seed, options=options, parent=self)

16
gui/qt/seed_dialog.py

@ -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):
def __init__(self, parent, seed, passphrase):

Loading…
Cancel
Save