Fix some regressions from layout rework.
This commit is contained in:
parent
9390a97e9e
commit
fd66e15d3d
|
@ -175,9 +175,8 @@ class InstallWizard(WindowModalDialog, WizardBase):
|
||||||
return sanitized_seed()
|
return sanitized_seed()
|
||||||
|
|
||||||
def show_seed(self, seed):
|
def show_seed(self, seed):
|
||||||
title = _("Your wallet generation seed is:")
|
|
||||||
slayout = SeedWarningLayout(seed)
|
slayout = SeedWarningLayout(seed)
|
||||||
self.set_main_layout(slayout.layout(), title)
|
self.set_main_layout(slayout.layout())
|
||||||
|
|
||||||
def verify_seed(self, seed, is_valid=None):
|
def verify_seed(self, seed, is_valid=None):
|
||||||
while True:
|
while True:
|
||||||
|
|
|
@ -1830,7 +1830,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
self.set_send_button_text()
|
self.set_send_button_text()
|
||||||
|
|
||||||
def change_password_dialog(self):
|
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():
|
if self.wallet and self.wallet.is_watching_only():
|
||||||
self.show_error(_('This is a watching-only wallet'))
|
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. To disable wallet encryption, enter an empty new '
|
||||||
'password.') if self.wallet.use_encryption
|
'password.') if self.wallet.use_encryption
|
||||||
else _('Your wallet keys are not encrypted'))
|
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()
|
ok, password, new_password = d.run()
|
||||||
if not ok:
|
if not ok:
|
||||||
return
|
return
|
||||||
|
|
|
@ -34,7 +34,7 @@ class NetworkDialog(WindowModalDialog):
|
||||||
self.setMinimumSize(375, 20)
|
self.setMinimumSize(375, 20)
|
||||||
self.nlayout = NetworkChoiceLayout(network, config)
|
self.nlayout = NetworkChoiceLayout(network, config)
|
||||||
vbox = QVBoxLayout(self)
|
vbox = QVBoxLayout(self)
|
||||||
vbox.addLayout(nlayout.layout())
|
vbox.addLayout(self.nlayout.layout())
|
||||||
vbox.addLayout(Buttons(CancelButton(self), OkButton(self)))
|
vbox.addLayout(Buttons(CancelButton(self), OkButton(self)))
|
||||||
|
|
||||||
def do_exec(self):
|
def do_exec(self):
|
||||||
|
|
|
@ -93,7 +93,7 @@ class PasswordLayout(object):
|
||||||
lockfile = ":icons/lock.png"
|
lockfile = ":icons/lock.png"
|
||||||
else:
|
else:
|
||||||
lockfile = ":icons/unlock.png"
|
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(QLabel(msgs[0]), 1, 0)
|
||||||
grid.addWidget(self.new_pw, 1, 1)
|
grid.addWidget(self.new_pw, 1, 1)
|
||||||
|
@ -145,10 +145,10 @@ class PasswordLayout(object):
|
||||||
class PasswordDialog(WindowModalDialog):
|
class PasswordDialog(WindowModalDialog):
|
||||||
|
|
||||||
def __init__(self, parent, wallet, msg, kind):
|
def __init__(self, parent, wallet, msg, kind):
|
||||||
WindowModalDialog.__init__(self)
|
WindowModalDialog.__init__(self, parent)
|
||||||
OK_button = OkButton(self)
|
OK_button = OkButton(self)
|
||||||
self.playout = PasswordLayout(wallet, msg, kind, OK_button)
|
self.playout = PasswordLayout(wallet, msg, kind, OK_button)
|
||||||
self.setTitle(slef.playout.title())
|
self.setWindowTitle(self.playout.title())
|
||||||
vbox = QVBoxLayout(self)
|
vbox = QVBoxLayout(self)
|
||||||
vbox.addLayout(self.playout.layout())
|
vbox.addLayout(self.playout.layout())
|
||||||
vbox.addStretch(1)
|
vbox.addStretch(1)
|
||||||
|
|
|
@ -36,7 +36,7 @@ class SeedDialog(WindowModalDialog):
|
||||||
WindowModalDialog.__init__(self, parent, ('Electrum - ' + _('Seed')))
|
WindowModalDialog.__init__(self, parent, ('Electrum - ' + _('Seed')))
|
||||||
self.setMinimumWidth(400)
|
self.setMinimumWidth(400)
|
||||||
vbox = QVBoxLayout(self)
|
vbox = QVBoxLayout(self)
|
||||||
vbox.addLayout(SeedDisplayLayout(seed))
|
vbox.addLayout(SeedWarningLayout(seed).layout())
|
||||||
if imported_keys:
|
if imported_keys:
|
||||||
warning = ("<b>" + _("WARNING") + ":</b> " +
|
warning = ("<b>" + _("WARNING") + ":</b> " +
|
||||||
_("Your wallet contains imported keys. These keys "
|
_("Your wallet contains imported keys. These keys "
|
||||||
|
@ -86,6 +86,8 @@ class SeedDisplayLayout(SeedLayoutBase):
|
||||||
|
|
||||||
class SeedWarningLayout(SeedLayoutBase):
|
class SeedWarningLayout(SeedLayoutBase):
|
||||||
def __init__(self, seed, title=None):
|
def __init__(self, seed, title=None):
|
||||||
|
if title is None:
|
||||||
|
title = _("Your wallet generation seed is:")
|
||||||
msg = ''.join([
|
msg = ''.join([
|
||||||
"<p>",
|
"<p>",
|
||||||
_("Please save these %d words on paper (order is important). "),
|
_("Please save these %d words on paper (order is important). "),
|
||||||
|
|
Loading…
Reference in New Issue