use the parent config instance when daemon starts a window
This commit is contained in:
parent
3e4d332a4c
commit
93c468504e
7
electrum
7
electrum
|
@ -296,13 +296,14 @@ class ClientThread(util.DaemonThread):
|
||||||
cmd = config.get('cmd')
|
cmd = config.get('cmd')
|
||||||
if cmd == 'gui':
|
if cmd == 'gui':
|
||||||
if self.server.gui:
|
if self.server.gui:
|
||||||
if hasattr(server.gui, 'new_window'):
|
if hasattr(server.gui, 'load_wallet_file'):
|
||||||
self.server.gui.new_window(config)
|
path = config.get_wallet_path()
|
||||||
|
self.server.gui.load_wallet_file(path)
|
||||||
response = "ok"
|
response = "ok"
|
||||||
else:
|
else:
|
||||||
response = "error: current GUI does not support multiple windows"
|
response = "error: current GUI does not support multiple windows"
|
||||||
else:
|
else:
|
||||||
response = "error: Electrum daemon is running"
|
response = "Error: Electrum is running in daemon mode. Please stop the daemon first."
|
||||||
elif cmd == 'daemon':
|
elif cmd == 'daemon':
|
||||||
sub = config.get('subcommand')
|
sub = config.get('subcommand')
|
||||||
assert sub in ['start', 'stop', 'status']
|
assert sub in ['start', 'stop', 'status']
|
||||||
|
|
|
@ -113,9 +113,6 @@ class ElectrumGui:
|
||||||
for window in self.windows:
|
for window in self.windows:
|
||||||
window.close()
|
window.close()
|
||||||
|
|
||||||
def new_window(self, config):
|
|
||||||
self.app.emit(SIGNAL('new_window'), config)
|
|
||||||
|
|
||||||
def load_wallet_file(self, path):
|
def load_wallet_file(self, path):
|
||||||
self.app.emit(SIGNAL('new_window'), self.config, path)
|
self.app.emit(SIGNAL('new_window'), self.config, path)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue