Browse Source

move plugin icons to plugins

master
ThomasV 1 year ago
parent
commit
eccc5900e0
  1. 9
      electrum/gui/qt/util.py
  2. 15
      electrum/plugin.py
  3. 0
      electrum/plugins/bitbox02/bitbox02.png
  4. 0
      electrum/plugins/bitbox02/bitbox02_unpaired.png
  5. 0
      electrum/plugins/coldcard/coldcard.png
  6. 0
      electrum/plugins/coldcard/coldcard.svg
  7. 0
      electrum/plugins/coldcard/coldcard_unpaired.png
  8. 0
      electrum/plugins/coldcard/coldcard_unpaired.svg
  9. 0
      electrum/plugins/digitalbitbox/digitalbitbox.png
  10. 0
      electrum/plugins/digitalbitbox/digitalbitbox_unpaired.png
  11. 13
      electrum/plugins/hw_wallet/qt.py
  12. 0
      electrum/plugins/jade/jade.png
  13. 0
      electrum/plugins/jade/jade_unpaired.png
  14. 0
      electrum/plugins/keepkey/keepkey.png
  15. 0
      electrum/plugins/keepkey/keepkey_unpaired.png
  16. 0
      electrum/plugins/ledger/ledger.png
  17. 0
      electrum/plugins/ledger/ledger_unpaired.png
  18. 18
      electrum/plugins/revealer/qt.py
  19. 0
      electrum/plugins/revealer/revealer.png
  20. 0
      electrum/plugins/safe_t/safe-t.png
  21. 0
      electrum/plugins/safe_t/safe-t_unpaired.png
  22. 0
      electrum/plugins/trezor/trezor.png
  23. 0
      electrum/plugins/trezor/trezor_unpaired.png
  24. 40
      electrum/plugins/trustedcoin/qt.py
  25. 0
      electrum/plugins/trustedcoin/trustedcoin-status-disabled.png
  26. 0
      electrum/plugins/trustedcoin/trustedcoin-status.png
  27. 0
      electrum/plugins/trustedcoin/trustedcoin-wizard.png

9
electrum/gui/qt/util.py

@ -1242,14 +1242,21 @@ def getSaveFileName(
def icon_path(icon_basename: str): def icon_path(icon_basename: str):
return resource_path('gui', 'icons', icon_basename) return resource_path('gui', 'icons', icon_basename)
def internal_plugin_icon_path(plugin_name, icon_basename: str):
return resource_path('plugins', plugin_name, icon_basename)
@lru_cache(maxsize=1000) @lru_cache(maxsize=1000)
def read_QIcon(icon_basename: str) -> QIcon: def read_QIcon(icon_basename: str) -> QIcon:
return QIcon(icon_path(icon_basename)) return QIcon(icon_path(icon_basename))
def read_QIcon_from_bytes(b: bytes) -> QIcon: def read_QPixmap_from_bytes(b: bytes) -> QPixmap:
qp = QPixmap() qp = QPixmap()
qp.loadFromData(b) qp.loadFromData(b)
return qp
def read_QIcon_from_bytes(b: bytes) -> QIcon:
qp = read_QPixmap_from_bytes(b)
return QIcon(qp) return QIcon(qp)
class IconLabel(QWidget): class IconLabel(QWidget):

15
electrum/plugin.py

@ -441,13 +441,16 @@ class BasePlugin(Logger):
raise NotImplementedError() raise NotImplementedError()
def read_file(self, filename: str) -> bytes: def read_file(self, filename: str) -> bytes:
""" note: only for external plugins """
import zipfile import zipfile
plugin_filename = self.parent.external_plugin_path(self.name) if self.name in self.parent.external_plugin_metadata:
with zipfile.ZipFile(plugin_filename) as myzip: plugin_filename = self.parent.external_plugin_path(self.name)
with myzip.open(os.path.join(self.name, filename)) as myfile: with zipfile.ZipFile(plugin_filename) as myzip:
s = myfile.read() with myzip.open(os.path.join(self.name, filename)) as myfile:
return s return myfile.read()
else:
path = os.path.join(os.path.dirname(__file__), 'plugins', self.name, filename)
with open(path, 'rb') as myfile:
return myfile.read()
class DeviceUnpairableError(UserFacingException): pass class DeviceUnpairableError(UserFacingException): pass

0
electrum/gui/icons/bitbox02.png → electrum/plugins/bitbox02/bitbox02.png

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

0
electrum/gui/icons/bitbox02_unpaired.png → electrum/plugins/bitbox02/bitbox02_unpaired.png

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

0
electrum/gui/icons/coldcard.png → electrum/plugins/coldcard/coldcard.png

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

0
electrum/gui/icons/coldcard.svg → electrum/plugins/coldcard/coldcard.svg

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

0
electrum/gui/icons/coldcard_unpaired.png → electrum/plugins/coldcard/coldcard_unpaired.png

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

0
electrum/gui/icons/coldcard_unpaired.svg → electrum/plugins/coldcard/coldcard_unpaired.svg

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

0
electrum/gui/icons/digitalbitbox.png → electrum/plugins/digitalbitbox/digitalbitbox.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
electrum/gui/icons/digitalbitbox_unpaired.png → electrum/plugins/digitalbitbox/digitalbitbox_unpaired.png

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

13
electrum/plugins/hw_wallet/qt.py

@ -36,6 +36,7 @@ from electrum.gui.qt.util import (read_QIcon, WWLabel, OkButton, WindowModalDial
Buttons, CancelButton, TaskThread, char_width_in_lineedit, Buttons, CancelButton, TaskThread, char_width_in_lineedit,
PasswordLineEdit) PasswordLineEdit)
from electrum.gui.qt.main_window import StatusBarButton from electrum.gui.qt.main_window import StatusBarButton
from electrum.gui.qt.util import read_QIcon_from_bytes
from electrum.i18n import _ from electrum.i18n import _
from electrum.logging import Logger from electrum.logging import Logger
@ -92,8 +93,9 @@ class QtHandlerBase(HardwareHandlerBase, QObject, Logger):
def _update_status(self, paired): def _update_status(self, paired):
if hasattr(self, 'button'): if hasattr(self, 'button'):
button = self.button button = self.button
icon_name = button.icon_paired if paired else button.icon_unpaired icon_bytes = button.icon_paired if paired else button.icon_unpaired
button.setIcon(read_QIcon(icon_name)) icon = read_QIcon_from_bytes(icon_bytes)
button.setIcon(icon)
def query_choice(self, msg: str, labels: Sequence[Tuple]): def query_choice(self, msg: str, labels: Sequence[Tuple]):
self.done.clear() self.done.clear()
@ -222,9 +224,10 @@ class QtPluginBase(object):
tooltip = self.device + '\n' + (keystore.label or 'unnamed') tooltip = self.device + '\n' + (keystore.label or 'unnamed')
cb = partial(self._on_status_bar_button_click, window=window, keystore=keystore) cb = partial(self._on_status_bar_button_click, window=window, keystore=keystore)
sb = window.statusBar() sb = window.statusBar()
button = StatusBarButton(read_QIcon(self.icon_unpaired), tooltip, cb, sb.height()) icon = read_QIcon_from_bytes(self.read_file(self.icon_unpaired))
button.icon_paired = self.icon_paired button = StatusBarButton(icon, tooltip, cb, sb.height())
button.icon_unpaired = self.icon_unpaired button.icon_paired = self.read_file(self.icon_paired)
button.icon_unpaired = self.read_file(self.icon_unpaired)
sb.addPermanentWidget(button) sb.addPermanentWidget(button)
handler = self.create_handler(window) handler = self.create_handler(window)
handler.button = button handler.button = button

0
electrum/gui/icons/jade.png → electrum/plugins/jade/jade.png

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

0
electrum/gui/icons/jade_unpaired.png → electrum/plugins/jade/jade_unpaired.png

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

0
electrum/gui/icons/keepkey.png → electrum/plugins/keepkey/keepkey.png

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

0
electrum/gui/icons/keepkey_unpaired.png → electrum/plugins/keepkey/keepkey_unpaired.png

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

0
electrum/gui/icons/ledger.png → electrum/plugins/ledger/ledger.png

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

0
electrum/gui/icons/ledger_unpaired.png → electrum/plugins/ledger/ledger_unpaired.png

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

18
electrum/plugins/revealer/qt.py

@ -32,10 +32,11 @@ from PyQt6.QtWidgets import (QGridLayout, QVBoxLayout, QHBoxLayout, QLabel,
from electrum.plugin import hook from electrum.plugin import hook
from electrum.i18n import _ from electrum.i18n import _
from electrum.util import make_dir, InvalidPassword, UserCancelled from electrum.util import make_dir, InvalidPassword, UserCancelled
from electrum.gui.qt.util import (read_QIcon, EnterButton, WWLabel, icon_path, from electrum.gui.qt.util import (read_QIcon, EnterButton, WWLabel, icon_path, internal_plugin_icon_path,
WindowModalDialog, Buttons, CloseButton, OkButton) WindowModalDialog, Buttons, CloseButton, OkButton)
from electrum.gui.qt.qrtextedit import ScanQRTextEdit from electrum.gui.qt.qrtextedit import ScanQRTextEdit
from electrum.gui.qt.main_window import StatusBarButton from electrum.gui.qt.main_window import StatusBarButton
from electrum.gui.qt.util import read_QIcon_from_bytes, read_QPixmap_from_bytes
from .revealer import RevealerPlugin from .revealer import RevealerPlugin
@ -69,6 +70,7 @@ class Plugin(RevealerPlugin):
self.extension = False self.extension = False
self._init_qt_received = False self._init_qt_received = False
self.icon_bytes = self.read_file("revealer.png")
@hook @hook
def init_qt(self, gui: 'ElectrumGui'): def init_qt(self, gui: 'ElectrumGui'):
@ -81,8 +83,10 @@ class Plugin(RevealerPlugin):
@hook @hook
def create_status_bar(self, sb): def create_status_bar(self, sb):
b = StatusBarButton(read_QIcon('revealer.png'), "Revealer "+_("Visual Cryptography Plugin"), b = StatusBarButton(
partial(self.setup_dialog, sb), sb.height()) read_QIcon_from_bytes(self.icon_bytes),
"Revealer "+_("Visual Cryptography Plugin"),
partial(self.setup_dialog, sb), sb.height())
sb.addPermanentWidget(b) sb.addPermanentWidget(b)
def requires_settings(self): def requires_settings(self):
@ -125,7 +129,7 @@ class Plugin(RevealerPlugin):
logo_label = QLabel() logo_label = QLabel()
# Set the logo label pixmap. # Set the logo label pixmap.
logo_label.setPixmap(QPixmap(icon_path('revealer.png'))) logo_label.setPixmap(read_QPixmap_from_bytes(self.icon_bytes))
# Align the logo label to the top left. # Align the logo label to the top left.
logo_label.setAlignment(Qt.AlignmentFlag.AlignLeft) logo_label.setAlignment(Qt.AlignmentFlag.AlignLeft)
@ -308,7 +312,7 @@ class Plugin(RevealerPlugin):
logo_label = QLabel() logo_label = QLabel()
# Set the logo label pixmap. # Set the logo label pixmap.
logo_label.setPixmap(QPixmap(icon_path('revealer.png'))) logo_label.setPixmap(read_QPixmap_from_bytes(self.icon_bytes))
# Align the logo label to the top left. # Align the logo label to the top left.
logo_label.setAlignment(Qt.AlignmentFlag.AlignLeft) logo_label.setAlignment(Qt.AlignmentFlag.AlignLeft)
@ -670,7 +674,7 @@ class Plugin(RevealerPlugin):
painter.drawLine(base_img.width()-(dist_h), 0, base_img.width()-(dist_h), base_img.height()) painter.drawLine(base_img.width()-(dist_h), 0, base_img.width()-(dist_h), base_img.height())
painter.drawImage(((total_distance_h))+11, ((total_distance_h))+11, painter.drawImage(((total_distance_h))+11, ((total_distance_h))+11,
QImage(icon_path('electrumb.png')).scaledToWidth(round(2.1*total_distance_h), Qt.TransformationMode.SmoothTransformation)) QImage(internal_icon_path('electrumb.png')).scaledToWidth(round(2.1*total_distance_h), Qt.TransformationMode.SmoothTransformation))
painter.setPen(QPen(Qt.GlobalColor.white, border_thick*8)) painter.setPen(QPen(Qt.GlobalColor.white, border_thick*8))
painter.drawLine(int(base_img.width()-total_distance_h-(border_thick*8)/2-(border_thick/2)-2), painter.drawLine(int(base_img.width()-total_distance_h-(border_thick*8)/2-(border_thick/2)-2),
@ -696,7 +700,7 @@ class Plugin(RevealerPlugin):
painter.drawLine(dist_h, 0, dist_h, base_img.height()) painter.drawLine(dist_h, 0, dist_h, base_img.height())
painter.drawLine(0, base_img.height()-dist_v, base_img.width(), base_img.height()-(dist_v)) painter.drawLine(0, base_img.height()-dist_v, base_img.width(), base_img.height()-(dist_v))
painter.drawLine(base_img.width()-(dist_h), 0, base_img.width()-(dist_h), base_img.height()) painter.drawLine(base_img.width()-(dist_h), 0, base_img.width()-(dist_h), base_img.height())
logo = QImage(icon_path('revealer_c.png')).scaledToWidth(round(1.3*(total_distance_h))) logo = QImage(internal_plugin_icon_path(self.name, 'revealer_c.png')).scaledToWidth(round(1.3*(total_distance_h)))
painter.drawImage(int(total_distance_h+border_thick), int(total_distance_h+border_thick), logo, Qt.TransformationMode.SmoothTransformation) painter.drawImage(int(total_distance_h+border_thick), int(total_distance_h+border_thick), logo, Qt.TransformationMode.SmoothTransformation)
#frame around logo #frame around logo

0
electrum/gui/icons/revealer.png → electrum/plugins/revealer/revealer.png

Before

Width:  |  Height:  |  Size: 272 B

After

Width:  |  Height:  |  Size: 272 B

0
electrum/gui/icons/safe-t.png → electrum/plugins/safe_t/safe-t.png

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

0
electrum/gui/icons/safe-t_unpaired.png → electrum/plugins/safe_t/safe-t_unpaired.png

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

0
electrum/gui/icons/trezor.png → electrum/plugins/trezor/trezor.png

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

0
electrum/gui/icons/trezor_unpaired.png → electrum/plugins/trezor/trezor_unpaired.png

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

40
electrum/plugins/trustedcoin/qt.py

@ -40,13 +40,14 @@ from electrum.logging import Logger, get_logger
from electrum import keystore from electrum import keystore
from electrum.gui.qt.util import (read_QIcon, WindowModalDialog, WaitingDialog, OkButton, from electrum.gui.qt.util import (read_QIcon, WindowModalDialog, WaitingDialog, OkButton,
CancelButton, Buttons, icon_path, WWLabel, CloseButton, ColorScheme, CancelButton, Buttons, icon_path, internal_plugin_icon_path, WWLabel, CloseButton, ColorScheme,
ChoiceWidget, PasswordLineEdit, char_width_in_lineedit) ChoiceWidget, PasswordLineEdit, char_width_in_lineedit)
from electrum.gui.qt.qrcodewidget import QRCodeWidget from electrum.gui.qt.qrcodewidget import QRCodeWidget
from electrum.gui.qt.amountedit import AmountEdit from electrum.gui.qt.amountedit import AmountEdit
from electrum.gui.qt.main_window import StatusBarButton from electrum.gui.qt.main_window import StatusBarButton
from electrum.gui.qt.wizard.wallet import WCCreateSeed, WCConfirmSeed, WCHaveSeed, WCEnterExt, WCConfirmExt from electrum.gui.qt.wizard.wallet import WCCreateSeed, WCConfirmSeed, WCHaveSeed, WCEnterExt, WCConfirmExt
from electrum.gui.qt.wizard.wizard import WizardComponent from electrum.gui.qt.wizard.wizard import WizardComponent
from electrum.gui.qt.util import read_QIcon_from_bytes
from .common_qt import TrustedcoinPluginQObject from .common_qt import TrustedcoinPluginQObject
from .trustedcoin import TrustedCoinPlugin, server, DISCLAIMER from .trustedcoin import TrustedCoinPlugin, server, DISCLAIMER
@ -103,10 +104,10 @@ class Plugin(TrustedCoinPlugin):
_('Therefore, two-factor authentication is disabled.') _('Therefore, two-factor authentication is disabled.')
]) ])
action = lambda: window.show_message(msg) action = lambda: window.show_message(msg)
icon = read_QIcon("trustedcoin-status-disabled.png") icon = read_QIcon_from_bytes(self.read_file("trustedcoin-status-disabled.png"))
else: else:
action = partial(self.settings_dialog, window) action = partial(self.settings_dialog, window)
icon = read_QIcon("trustedcoin-status.png") icon = read_QIcon_from_bytes(self.read_file("trustedcoin-status.png"))
sb = window.statusBar() sb = window.statusBar()
button = StatusBarButton(icon, _("TrustedCoin"), action, sb.height()) button = StatusBarButton(icon, _("TrustedCoin"), action, sb.height())
sb.addPermanentWidget(button) sb.addPermanentWidget(button)
@ -166,6 +167,9 @@ class Plugin(TrustedCoinPlugin):
self.waiting_dialog_for_billing_info(window, self.waiting_dialog_for_billing_info(window,
on_finished=partial(self.show_settings_dialog, window)) on_finished=partial(self.show_settings_dialog, window))
def icon_path(self, name):
return internal_plugin_icon_path(self.name, name)
def show_settings_dialog(self, window, success): def show_settings_dialog(self, window, success):
if not success: if not success:
window.show_message(_('Server not reachable.')) window.show_message(_('Server not reachable.'))
@ -178,7 +182,7 @@ class Plugin(TrustedCoinPlugin):
hbox = QHBoxLayout() hbox = QHBoxLayout()
logo = QLabel() logo = QLabel()
logo.setPixmap(QPixmap(icon_path("trustedcoin-status.png"))) logo.setPixmap(QPixmap(self.icon_path("trustedcoin-status.png")))
msg = _('This wallet is protected by TrustedCoin\'s two-factor authentication.') + '<br/>'\ msg = _('This wallet is protected by TrustedCoin\'s two-factor authentication.') + '<br/>'\
+ _("For more information, visit") + " <a href=\"https://api.trustedcoin.com/#/electrum-help\">https://api.trustedcoin.com/#/electrum-help</a>" + _("For more information, visit") + " <a href=\"https://api.trustedcoin.com/#/electrum-help\">https://api.trustedcoin.com/#/electrum-help</a>"
label = QLabel(msg) label = QLabel(msg)
@ -228,46 +232,46 @@ class Plugin(TrustedCoinPlugin):
wizard.trustedcoin_qhelper = TrustedcoinPluginQObject(self, wizard, None) wizard.trustedcoin_qhelper = TrustedcoinPluginQObject(self, wizard, None)
self.extend_wizard(wizard) self.extend_wizard(wizard)
if wizard.start_viewstate and wizard.start_viewstate.view.startswith('trustedcoin_'): if wizard.start_viewstate and wizard.start_viewstate.view.startswith('trustedcoin_'):
wizard.start_viewstate.params.update({'icon': icon_path('trustedcoin-wizard.png')}) wizard.start_viewstate.params.update({'icon': self.icon_path('trustedcoin-wizard.png')})
def extend_wizard(self, wizard: 'QENewWalletWizard'): def extend_wizard(self, wizard: 'QENewWalletWizard'):
super().extend_wizard(wizard) super().extend_wizard(wizard)
views = { views = {
'trustedcoin_start': { 'trustedcoin_start': {
'gui': WCDisclaimer, 'gui': WCDisclaimer,
'params': {'icon': icon_path('trustedcoin-wizard.png')}, 'params': {'icon': self.icon_path('trustedcoin-wizard.png')},
}, },
'trustedcoin_choose_seed': { 'trustedcoin_choose_seed': {
'gui': WCChooseSeed, 'gui': WCChooseSeed,
'params': {'icon': icon_path('trustedcoin-wizard.png')}, 'params': {'icon': self.icon_path('trustedcoin-wizard.png')},
}, },
'trustedcoin_create_seed': { 'trustedcoin_create_seed': {
'gui': WCCreateSeed, 'gui': WCCreateSeed,
'params': {'icon': icon_path('trustedcoin-wizard.png')}, 'params': {'icon': self.icon_path('trustedcoin-wizard.png')},
}, },
'trustedcoin_confirm_seed': { 'trustedcoin_confirm_seed': {
'gui': WCConfirmSeed, 'gui': WCConfirmSeed,
'params': {'icon': icon_path('trustedcoin-wizard.png')}, 'params': {'icon': self.icon_path('trustedcoin-wizard.png')},
}, },
'trustedcoin_have_seed': { 'trustedcoin_have_seed': {
'gui': WCHaveSeed, 'gui': WCHaveSeed,
'params': {'icon': icon_path('trustedcoin-wizard.png')}, 'params': {'icon': self.icon_path('trustedcoin-wizard.png')},
}, },
'trustedcoin_keep_disable': { 'trustedcoin_keep_disable': {
'gui': WCKeepDisable, 'gui': WCKeepDisable,
'params': {'icon': icon_path('trustedcoin-wizard.png')}, 'params': {'icon': self.icon_path('trustedcoin-wizard.png')},
}, },
'trustedcoin_tos': { 'trustedcoin_tos': {
'gui': WCTerms, 'gui': WCTerms,
'params': {'icon': icon_path('trustedcoin-wizard.png')}, 'params': {'icon': self.icon_path('trustedcoin-wizard.png')},
}, },
'trustedcoin_keystore_unlock': { 'trustedcoin_keystore_unlock': {
'gui': WCKeystorePassword, 'gui': WCKeystorePassword,
'params': {'icon': icon_path('trustedcoin-wizard.png')}, 'params': {'icon': self.icon_path('trustedcoin-wizard.png')},
}, },
'trustedcoin_show_confirm_otp': { 'trustedcoin_show_confirm_otp': {
'gui': WCShowConfirmOTP, 'gui': WCShowConfirmOTP,
'params': {'icon': icon_path('trustedcoin-wizard.png')}, 'params': {'icon': self.icon_path('trustedcoin-wizard.png')},
} }
} }
wizard.navmap_merge(views) wizard.navmap_merge(views)
@ -279,7 +283,7 @@ class Plugin(TrustedCoinPlugin):
}, },
'trustedcoin_create_ext': { 'trustedcoin_create_ext': {
'gui': WCEnterExt, 'gui': WCEnterExt,
'params': {'icon': icon_path('trustedcoin-wizard.png')}, 'params': {'icon': self.icon_path('trustedcoin-wizard.png')},
'next': 'trustedcoin_confirm_seed', 'next': 'trustedcoin_confirm_seed',
}, },
'trustedcoin_confirm_seed': { 'trustedcoin_confirm_seed': {
@ -287,7 +291,7 @@ class Plugin(TrustedCoinPlugin):
}, },
'trustedcoin_confirm_ext': { 'trustedcoin_confirm_ext': {
'gui': WCConfirmExt, 'gui': WCConfirmExt,
'params': {'icon': icon_path('trustedcoin-wizard.png')}, 'params': {'icon': self.icon_path('trustedcoin-wizard.png')},
'next': 'trustedcoin_tos', 'next': 'trustedcoin_tos',
}, },
'trustedcoin_have_seed': { 'trustedcoin_have_seed': {
@ -295,7 +299,7 @@ class Plugin(TrustedCoinPlugin):
}, },
'trustedcoin_have_ext': { 'trustedcoin_have_ext': {
'gui': WCEnterExt, 'gui': WCEnterExt,
'params': {'icon': icon_path('trustedcoin-wizard.png')}, 'params': {'icon': self.icon_path('trustedcoin-wizard.png')},
'next': 'trustedcoin_keep_disable', 'next': 'trustedcoin_keep_disable',
}, },
} }
@ -305,7 +309,7 @@ class Plugin(TrustedCoinPlugin):
ext_online = { ext_online = {
'trustedcoin_continue_online': { 'trustedcoin_continue_online': {
'gui': WCContinueOnline, 'gui': WCContinueOnline,
'params': {'icon': icon_path('trustedcoin-wizard.png')}, 'params': {'icon': self.icon_path('trustedcoin-wizard.png')},
'next': lambda d: 'trustedcoin_tos' if d['trustedcoin_go_online'] else 'wallet_password', 'next': lambda d: 'trustedcoin_tos' if d['trustedcoin_go_online'] else 'wallet_password',
'accept': self.on_continue_online, 'accept': self.on_continue_online,
'last': lambda d: not d['trustedcoin_go_online'] and wizard.is_single_password() 'last': lambda d: not d['trustedcoin_go_online'] and wizard.is_single_password()

0
electrum/gui/icons/trustedcoin-status-disabled.png → electrum/plugins/trustedcoin/trustedcoin-status-disabled.png

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

0
electrum/gui/icons/trustedcoin-status.png → electrum/plugins/trustedcoin/trustedcoin-status.png

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

0
electrum/gui/icons/trustedcoin-wizard.png → electrum/plugins/trustedcoin/trustedcoin-wizard.png

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Loading…
Cancel
Save