|
|
|
|
@ -33,6 +33,18 @@ from .payserver import PayServerPlugin
|
|
|
|
|
|
|
|
|
|
class Plugin(PayServerPlugin): |
|
|
|
|
|
|
|
|
|
_init_qt_received = False |
|
|
|
|
|
|
|
|
|
@hook |
|
|
|
|
def init_qt(self, gui: 'ElectrumGui'): |
|
|
|
|
if self._init_qt_received: # only need/want the first signal |
|
|
|
|
return |
|
|
|
|
self._init_qt_received = True |
|
|
|
|
# If the user just enabled the plugin, the 'load_wallet' hook would not |
|
|
|
|
# get called for already loaded wallets, hence we call it manually for those: |
|
|
|
|
for window in gui.windows: |
|
|
|
|
self.daemon_wallet_loaded(gui.daemon, window.wallet) |
|
|
|
|
|
|
|
|
|
def requires_settings(self): |
|
|
|
|
return True |
|
|
|
|
|
|
|
|
|
@ -68,6 +80,8 @@ class Plugin(PayServerPlugin):
|
|
|
|
|
self.config.set_key('payserver_address', str(address_e.text())) |
|
|
|
|
self.config.set_key('ssl_keyfile', str(keyfile_e.text())) |
|
|
|
|
self.config.set_key('ssl_certfile', str(certfile_e.text())) |
|
|
|
|
# fixme: restart the server |
|
|
|
|
window.show_message('Please restart Electrum to enable those changes') |
|
|
|
|
|
|
|
|
|
@hook |
|
|
|
|
def receive_list_menu(self, parent, menu, key): |
|
|
|
|
|