commit d33b53f850d1195b7393392ddd032a44f55c7281
parent 7e8644ef151c78dad9a45099d590a010904edcf1
Author: ThomasV <thomasv@gitorious>
Date: Thu, 31 Jul 2014 07:47:59 +0200
close GUI if the network daemon is killed
Diffstat:
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
@@ -181,6 +181,7 @@ class ElectrumWindow(QMainWindow):
self.network.register_callback('banner', lambda: self.emit(QtCore.SIGNAL('banner_signal')))
self.network.register_callback('status', lambda: self.emit(QtCore.SIGNAL('update_status')))
self.network.register_callback('new_transaction', lambda: self.emit(QtCore.SIGNAL('transaction_signal')))
+ self.network.register_callback('stop', self.close)
# set initial message
self.console.showMessage(self.network.banner)
diff --git a/lib/network_proxy.py b/lib/network_proxy.py
@@ -86,6 +86,7 @@ class NetworkProxy(threading.Thread):
break
self.process(response)
+ self.trigger_callback('stop')
if self.network:
self.network.stop()
print_error("NetworkProxy: terminating")