commit 2e0d55e25e5dbea31c77c6e912dfb359f54b3b66
parent 68ed60ca87691d3802741da08642d94d15855d1a
Author: ThomasV <thomasv@electrum.org>
Date: Wed, 28 Sep 2016 21:31:47 +0200
remove xpub icon
Diffstat:
5 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py
@@ -412,7 +412,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
_("Please share it with your cosigners.")
])
vbox = QVBoxLayout()
- layout = SeedDisplayLayout(xpub, title=msg, xpub=True)
+ layout = SeedDisplayLayout(xpub, title=msg, icon=False)
vbox.addLayout(layout.layout())
self.set_main_layout(vbox, _('Master Public Key'))
return None
diff --git a/gui/qt/seed_dialog.py b/gui/qt/seed_dialog.py
@@ -33,11 +33,7 @@ from qrtextedit import ShowQRTextEdit, ScanQRTextEdit
class SeedLayoutBase(object):
- def _seed_layout(self, seed=None, title=None, xpub=False):
- icon = ":icons/xpub.png" if xpub else ":icons/seed.png"
- logo = QLabel()
- logo.setPixmap(QPixmap(icon).scaledToWidth(64))
- logo.setMaximumWidth(60)
+ def _seed_layout(self, seed=None, title=None, icon=True):
if seed:
self.seed_e = ShowQRTextEdit()
self.seed_e.setText(seed)
@@ -46,7 +42,11 @@ class SeedLayoutBase(object):
self.seed_e.setTabChangesFocus(True)
self.seed_e.setMaximumHeight(75)
hbox = QHBoxLayout()
- hbox.addWidget(logo)
+ if icon:
+ logo = QLabel()
+ logo.setPixmap(QPixmap(":icons/seed.png").scaledToWidth(64))
+ logo.setMaximumWidth(60)
+ hbox.addWidget(logo)
hbox.addWidget(self.seed_e)
if not title:
return hbox
@@ -64,8 +64,8 @@ class SeedLayoutBase(object):
class SeedDisplayLayout(SeedLayoutBase):
- def __init__(self, seed, title=None, xpub=False):
- self.layout_ = self._seed_layout(seed=seed, title=title, xpub=xpub)
+ def __init__(self, seed, title=None, icon=True):
+ self.layout_ = self._seed_layout(seed=seed, title=title, icon=icon)
@@ -101,7 +101,7 @@ class TextInputLayout(SeedLayoutBase):
def __init__(self, parent, title, is_valid):
self.is_valid = is_valid
self.parent = parent
- self.layout_ = self._seed_layout(title=title, xpub=True)
+ self.layout_ = self._seed_layout(title=title, icon=False)
self.seed_e.textChanged.connect(self.on_edit)
def get_text(self):
diff --git a/icons.qrc b/icons.qrc
@@ -37,6 +37,5 @@
<file>icons/unlock.png</file>
<file>icons/warning.png</file>
<file>icons/zoom.png</file>
- <file>icons/xpub.png</file>
</qresource>
</RCC>
diff --git a/icons/xpub.png b/icons/xpub.png
Binary files differ.
diff --git a/lib/base_wizard.py b/lib/base_wizard.py
@@ -140,7 +140,7 @@ class BaseWizard(object):
v = keystore.is_address_list
title = _("Import Bitcoin Addresses")
message = _("Enter a list of Bitcoin addresses. This will create a watching-only wallet.")
- self.restore_keys_dialog(title=title, message=message, run_next=self.on_import_addresses, is_valid=v)
+ self.add_xpub_dialog(title=title, message=message, run_next=self.on_import_addresses, is_valid=v)
def on_import_addresses(self, text):
assert keystore.is_address_list(text)