Browse Source

define special hooks for install wizard

283
ThomasV 10 years ago
parent
commit
94c9bf3655
  1. 3
      lib/plugins.py
  2. 2
      plugins/trustedcoin.py

3
lib/plugins.py

@ -40,12 +40,13 @@ def hook(func):
def run_hook(name, *args):
SPECIAL_HOOKS = ['add_wallet_types', 'get_wizard_action']
results = []
f_list = hooks.get(name,[])
for p, f in f_list:
if name == 'load_wallet':
p.wallet = args[0]
if p.is_enabled():
if name in SPECIAL_HOOKS or p.is_enabled():
try:
r = f(*args)
except Exception:

2
plugins/trustedcoin.py

@ -344,8 +344,6 @@ class Plugin(BasePlugin):
@hook
def load_wallet(self, wallet):
self.wallet = wallet
if self.is_enabled():
self.trustedcoin_button = StatusBarButton( QIcon(":icons/trustedcoin.png"), _("Network"), self.settings_dialog)
self.window.statusBar().addPermanentWidget(self.trustedcoin_button)
self.xpub = self.wallet.master_public_keys.get('x1/')

Loading…
Cancel
Save