commit cc17bb00908cbccfed2038e8519c1137507c6f9a
parent 7b27f01e07b6792d448a9680f413d1677c40ce55
Author: ThomasV <thomasv@gitorious>
Date: Wed, 20 May 2015 09:15:52 +0200
close: use signal to close from gui thread
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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)