From 323db55a9caeacba5c6698bda509f5ccc2e65e69 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 25 Jan 2015 21:46:48 +0100 Subject: [PATCH] Remove restore checkbox from fatal report dialog. --- qutebrowser/misc/crashdialog.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/qutebrowser/misc/crashdialog.py b/qutebrowser/misc/crashdialog.py index 586b6c704..1932c8a03 100644 --- a/qutebrowser/misc/crashdialog.py +++ b/qutebrowser/misc/crashdialog.py @@ -121,7 +121,6 @@ class _CrashDialog(QDialog): self._btn_box = None self._btn_report = None self._btn_cancel = None - self._chk_restore = None self._lbl = None self._paste_text = None self.setWindowTitle("Whoops!") @@ -189,9 +188,7 @@ class _CrashDialog(QDialog): def _init_checkboxes(self): """Initialize the checkboxes.""" - self._chk_restore = QCheckBox("Restore open pages") - self._chk_restore.setChecked(True) - self._vbox.addWidget(self._chk_restore) + pass def _init_buttons(self): """Initialize the buttons.""" @@ -333,6 +330,7 @@ class ExceptionCrashDialog(_CrashDialog): def __init__(self, debug, pages, cmdhist, exc, objects, parent=None): self._chk_log = None + self._chk_restore = None super().__init__(debug, parent) self._pages = pages self._cmdhist = cmdhist @@ -352,6 +350,9 @@ class ExceptionCrashDialog(_CrashDialog): def _init_checkboxes(self): """Add checkboxes to the dialog.""" super()._init_checkboxes() + self._chk_restore = QCheckBox("Restore open pages") + self._chk_restore.setChecked(True) + self._vbox.addWidget(self._chk_restore) self._chk_log = QCheckBox("Include a debug log in the report", checked=True) try: @@ -469,10 +470,6 @@ class ReportDialog(_CrashDialog): text = "Please describe the bug you encountered below." self._lbl.setText(text) - def _init_checkboxes(self): - """We don't want any checkboxes as the user wanted to report.""" - pass - def _init_info_text(self): """We don't want an info text as the user wanted to report.""" pass