From 180d6e45ef28c327b5632d19b06e91844afaada3 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 5 Oct 2014 23:09:04 +0200 Subject: [PATCH] Fix closeEvent of MainWindow. --- qutebrowser/widgets/mainwindow.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qutebrowser/widgets/mainwindow.py b/qutebrowser/widgets/mainwindow.py index 0a0bb6081..c216828e9 100644 --- a/qutebrowser/widgets/mainwindow.py +++ b/qutebrowser/widgets/mainwindow.py @@ -319,18 +319,18 @@ class MainWindow(QWidget): confirm_quit = config.get('ui', 'confirm-quit') count = self._tabbed_browser.count() if confirm_quit == 'never': - e.accept() + pass elif confirm_quit == 'multiple-tabs' and count <= 1: - e.accept() + pass else: text = "Close {} {}?".format( count, "tab" if count == 1 else "tabs") confirmed = message.ask(self.win_id, text, usertypes.PromptMode.yesno, default=True) - if confirmed: - e.accept() - else: + if not confirmed: e.ignore() + return + e.accept() mode_manager = objreg.get('mode-manager', scope='window', window=self.win_id) log.destroy.debug("Removing eventfilter...")