commit e01e7d8562343e874141938a6f64ee2e8cf4f794
parent 6fe69de1b0e0d3f7fbe2f1b9d730f4091cb06c94
Author: ThomasV <thomasv@electrum.org>
Date: Wed, 12 Oct 2016 15:26:23 +0200
fix: remove TextInputLayout
Diffstat:
2 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/gui/qt/installwizard.py b/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)
diff --git a/gui/qt/seed_dialog.py b/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):