mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Merge pull request #217 from effigies/ctrlq
Clean up and exit on Ctrl-Q
This commit is contained in:
commit
ecb8128f91
@ -42,6 +42,14 @@ class Application(QtGui.QApplication):
|
||||
if platform == 'Tails' or platform == 'Linux':
|
||||
self.setAttribute(QtCore.Qt.AA_X11InitThreads, True)
|
||||
QtGui.QApplication.__init__(self, sys.argv)
|
||||
self.installEventFilter(self)
|
||||
|
||||
def eventFilter(self, obj, event):
|
||||
if (event.type() == QtCore.QEvent.KeyPress and
|
||||
event.key() == QtCore.Qt.Key_Q and
|
||||
event.modifiers() == QtCore.Qt.ControlModifier):
|
||||
self.quit()
|
||||
return False
|
||||
|
||||
|
||||
class OnionShareGui(QtGui.QWidget):
|
||||
|
Loading…
Reference in New Issue
Block a user