From 7c866f5014401b95a31fd7313e8cff0ea47455fd Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 16 Jan 2014 17:45:12 +0100 Subject: [PATCH] Add quit command --- qutebrowser/app.py | 1 + qutebrowser/commands.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 4bd81ca02..c4c03177c 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -11,6 +11,7 @@ def main(): mw.status.cmd.returnPressed.connect(lambda: cp.parse(mw.status.cmd.text())) cmds.cmd_dict['openurl'].connect(mw.tabs.openurl) cmds.cmd_dict['tabopen'].connect(mw.tabs.tabopen) + cmds.cmd_dict['quit'].connect(QApplication.closeAllWindows) # FIXME mw.show() sys.exit(app.exec_()) diff --git a/qutebrowser/commands.py b/qutebrowser/commands.py index d394c56c1..a4a338304 100644 --- a/qutebrowser/commands.py +++ b/qutebrowser/commands.py @@ -55,4 +55,9 @@ class TabOpenCmd(Command): name = 'tabopen' signal = pyqtSignal(str) +class QuitCmd(Command): + nargs = 0 + name = 'quit' + signal = pyqtSignal() + register_all()