commit fd66e15d3d67463153ec9b9e343f22dc19217328
parent 9390a97e9ee272c21c1f04bdda26625db1beb7ba
Author: Neil Booth <kyuupichan@gmail.com>
Date: Wed, 13 Jan 2016 21:25:48 +0900
Fix some regressions from layout rework.
Diffstat:
5 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py
@@ -175,9 +175,8 @@ class InstallWizard(WindowModalDialog, WizardBase):
return sanitized_seed()
def show_seed(self, seed):
- title = _("Your wallet generation seed is:")
slayout = SeedWarningLayout(seed)
- self.set_main_layout(slayout.layout(), title)
+ self.set_main_layout(slayout.layout())
def verify_seed(self, seed, is_valid=None):
while True:
diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
@@ -1830,7 +1830,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
self.set_send_button_text()
def change_password_dialog(self):
- from password_dialog import PasswordDialog
+ from password_dialog import PasswordDialog, PW_CHANGE
if self.wallet and self.wallet.is_watching_only():
self.show_error(_('This is a watching-only wallet'))
@@ -1840,7 +1840,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
'password. To disable wallet encryption, enter an empty new '
'password.') if self.wallet.use_encryption
else _('Your wallet keys are not encrypted'))
- d = PasswordDialog(self, self.wallet, msg, PasswordDialog.PW_CHANGE)
+ d = PasswordDialog(self, self.wallet, msg, PW_CHANGE)
ok, password, new_password = d.run()
if not ok:
return
diff --git a/gui/qt/network_dialog.py b/gui/qt/network_dialog.py
@@ -34,7 +34,7 @@ class NetworkDialog(WindowModalDialog):
self.setMinimumSize(375, 20)
self.nlayout = NetworkChoiceLayout(network, config)
vbox = QVBoxLayout(self)
- vbox.addLayout(nlayout.layout())
+ vbox.addLayout(self.nlayout.layout())
vbox.addLayout(Buttons(CancelButton(self), OkButton(self)))
def do_exec(self):
diff --git a/gui/qt/password_dialog.py b/gui/qt/password_dialog.py
@@ -93,7 +93,7 @@ class PasswordLayout(object):
lockfile = ":icons/lock.png"
else:
lockfile = ":icons/unlock.png"
- logo.setPixmap(QPixmap(lockfile).scaledToWidth(36))
+ logo.setPixmap(QPixmap(lockfile).scaledToWidth(36))
grid.addWidget(QLabel(msgs[0]), 1, 0)
grid.addWidget(self.new_pw, 1, 1)
@@ -145,10 +145,10 @@ class PasswordLayout(object):
class PasswordDialog(WindowModalDialog):
def __init__(self, parent, wallet, msg, kind):
- WindowModalDialog.__init__(self)
+ WindowModalDialog.__init__(self, parent)
OK_button = OkButton(self)
self.playout = PasswordLayout(wallet, msg, kind, OK_button)
- self.setTitle(slef.playout.title())
+ self.setWindowTitle(self.playout.title())
vbox = QVBoxLayout(self)
vbox.addLayout(self.playout.layout())
vbox.addStretch(1)
diff --git a/gui/qt/seed_dialog.py b/gui/qt/seed_dialog.py
@@ -36,7 +36,7 @@ class SeedDialog(WindowModalDialog):
WindowModalDialog.__init__(self, parent, ('Electrum - ' + _('Seed')))
self.setMinimumWidth(400)
vbox = QVBoxLayout(self)
- vbox.addLayout(SeedDisplayLayout(seed))
+ vbox.addLayout(SeedWarningLayout(seed).layout())
if imported_keys:
warning = ("<b>" + _("WARNING") + ":</b> " +
_("Your wallet contains imported keys. These keys "
@@ -86,6 +86,8 @@ class SeedDisplayLayout(SeedLayoutBase):
class SeedWarningLayout(SeedLayoutBase):
def __init__(self, seed, title=None):
+ if title is None:
+ title = _("Your wallet generation seed is:")
msg = ''.join([
"<p>",
_("Please save these %d words on paper (order is important). "),