[Pkg-privacy-commits] [onionshare] 14/53: Clean up and exit on Ctrl-Q
Ulrike Uhlig
u-guest at moszumanska.debian.org
Wed Dec 30 00:20:11 UTC 2015
This is an automated email from the git hooks/post-receive script.
u-guest pushed a commit to branch debian
in repository onionshare.
commit 89c363d247e50b4f4338980f91e4213e1f378206
Author: Christopher J. Markiewicz <effigies at gmail.com>
Date: Fri Nov 6 20:43:37 2015 -0500
Clean up and exit on Ctrl-Q
---
onionshare_gui/onionshare_gui.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py
index b2642db..1794b94 100644
--- a/onionshare_gui/onionshare_gui.py
+++ b/onionshare_gui/onionshare_gui.py
@@ -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):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git
More information about the Pkg-privacy-commits
mailing list