mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-05 07:55:23 -04:00
Merge pull request #217 from effigies/ctrlq
Clean up and exit on Ctrl-Q
This commit is contained in:
commit
ecb8128f91
1 changed files with 8 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue