Allow external plugins
- borrows code brom ElectronCash - external plugins are imported as zip files - check hash from plugins.json file
This commit is contained in:
@@ -150,7 +150,7 @@ class ElectrumGui(BaseElectrumGui, Logger):
|
||||
self.reload_app_stylesheet()
|
||||
|
||||
# always load 2fa
|
||||
self.plugins.load_plugin('trustedcoin')
|
||||
self.plugins.load_internal_plugin('trustedcoin')
|
||||
|
||||
run_hook('init_qt', self)
|
||||
|
||||
|
||||
@@ -63,15 +63,15 @@ class PluginsDialog(WindowModalDialog):
|
||||
run_hook('init_qt', self.window.gui_object)
|
||||
|
||||
def show_list(self):
|
||||
descriptions = self.plugins.descriptions.values()
|
||||
for i, descr in enumerate(descriptions):
|
||||
full_name = descr['__name__']
|
||||
prefix, _separator, name = full_name.rpartition('.')
|
||||
descriptions = sorted(self.plugins.descriptions.items())
|
||||
i = 0
|
||||
for name, descr in descriptions:
|
||||
i += 1
|
||||
p = self.plugins.get(name)
|
||||
if descr.get('registers_keystore'):
|
||||
continue
|
||||
try:
|
||||
cb = QCheckBox(descr['fullname'])
|
||||
cb = QCheckBox(descr['display_name'])
|
||||
plugin_is_loaded = p is not None
|
||||
cb_enabled = (not plugin_is_loaded and self.plugins.is_available(name, self.wallet)
|
||||
or plugin_is_loaded and p.can_user_disable())
|
||||
|
||||
Reference in New Issue
Block a user