qt: quit on SIGINT
This commit is contained in:
parent
466f325b88
commit
44566054a2
|
@ -22,7 +22,7 @@ from electrum.util import print_error, print_msg
|
||||||
from electrum.plugins import run_hook
|
from electrum.plugins import run_hook
|
||||||
import os.path, json, ast, traceback
|
import os.path, json, ast, traceback
|
||||||
import shutil
|
import shutil
|
||||||
|
import signal
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import PyQt4
|
import PyQt4
|
||||||
|
@ -208,6 +208,7 @@ class ElectrumGui:
|
||||||
w.connect_slots(s)
|
w.connect_slots(s)
|
||||||
w.update_wallet()
|
w.update_wallet()
|
||||||
|
|
||||||
|
signal.signal(signal.SIGINT, lambda *args: self.app.quit())
|
||||||
self.app.exec_()
|
self.app.exec_()
|
||||||
if self.tray:
|
if self.tray:
|
||||||
self.tray.hide()
|
self.tray.hide()
|
||||||
|
|
Loading…
Reference in New Issue