From cc17bb00908cbccfed2038e8519c1137507c6f9a Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 20 May 2015 09:15:52 +0200 Subject: [PATCH] close: use signal to close from gui thread --- gui/qt/main_window.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index bc633db94..46c0f6a50 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -159,6 +159,7 @@ class ElectrumWindow(QMainWindow): for i in range(tabs.count()): QShortcut(QKeySequence("Alt+" + str(i + 1)), self, lambda i=i: tabs.setCurrentIndex(i)) + self.connect(self, QtCore.SIGNAL('stop'), self.close) self.connect(self, QtCore.SIGNAL('update_status'), self.update_status) self.connect(self, QtCore.SIGNAL('banner_signal'), lambda: self.console.showMessage(self.network.banner) ) self.connect(self, QtCore.SIGNAL('transaction_signal'), lambda: self.notify_transactions() ) @@ -174,7 +175,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) + self.network.register_callback('stop', lambda: self.emit(QtCore.SIGNAL('stop'))) # set initial message self.console.showMessage(self.network.banner)