diff --git a/gui/qt/exception_window.py b/gui/qt/exception_window.py
index 38cfccdd..0525df8f 100644
--- a/gui/qt/exception_window.py
+++ b/gui/qt/exception_window.py
@@ -136,7 +136,8 @@ class Exception_Window(QWidget, MessageBoxMixin):
self.close()
def show_never(self):
- self.main_window.config.set_key("show_crash_reporter", False)
+ self.main_window._auto_crash_reports.setChecked(False)
+ self.main_window.auto_crash_reports(False)
self.close()
def closeEvent(self, event):
@@ -201,9 +202,12 @@ class Exception_Hook(QObject):
def __init__(self, main_window, *args, **kwargs):
super(Exception_Hook, self).__init__(*args, **kwargs)
- if not main_window.config.get("show_crash_reporter", default=True):
+ if not main_window.config.get("show_crash_reporter", default=False):
+ if main_window._old_excepthook:
+ sys.excepthook = main_window._old_excepthook
return
self.main_window = main_window
+ main_window._old_excepthook = sys.excepthook
sys.excepthook = self.handler
self._report_exception.connect(_show_window)
diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
index 2d472dab..5e19c1df 100644
--- a/gui/qt/main_window.py
+++ b/gui/qt/main_window.py
@@ -101,6 +101,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
self.gui_object = gui_object
self.config = config = gui_object.config
+ self._old_excepthook = None
self.setup_exception_hook()
self.network = gui_object.daemon.network
@@ -540,15 +541,23 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
help_menu = menubar.addMenu(_("&Help"))
help_menu.addAction(_("&About"), self.show_about)
- help_menu.addAction(_("&Official website"), lambda: webbrowser.open("https://github.com/zebra-lucky/electrum-zcash"))
+ #help_menu.addAction(_("&Official website"), lambda: webbrowser.open("https://github.com/zebra-lucky/electrum-zcash"))
help_menu.addSeparator()
- help_menu.addAction(_("&Documentation"), lambda: webbrowser.open("http://github.com/zebra-lucky/electrum-zcash")).setShortcut(QKeySequence.HelpContents)
+ #help_menu.addAction(_("&Documentation"), lambda: webbrowser.open("http://github.com/zebra-lucky/electrum-zcash")).setShortcut(QKeySequence.HelpContents)
+ #self._auto_crash_reports = QAction(_("&Automated Crash Reports"), self, checkable=True)
+ #self._auto_crash_reports.setChecked(self.config.get("show_crash_reporter", default=False))
+ #self._auto_crash_reports.triggered.connect(self.auto_crash_reports)
+ #help_menu.addAction(self._auto_crash_reports)
help_menu.addAction(_("&Report Bug"), self.show_report_bug)
help_menu.addSeparator()
help_menu.addAction(_("&Donate to server"), self.donate_to_server)
self.setMenuBar(menubar)
+ def auto_crash_reports(self, state):
+ self.config.set_key("show_crash_reporter", state)
+ self.setup_exception_hook()
+
def donate_to_server(self):
d = self.network.get_donation_address()
if d:
@@ -566,7 +575,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
def show_report_bug(self):
msg = ' '.join([
_("Please report any bugs as issues on github:
"),
- "https://github.com/spesmilo/electrum/issues
",
+ "https://github.com/zebra-lucky/electrum-zcash/issues
",
_("Before reporting a bug, upgrade to the most recent version of Electrum-Zcash (latest release or git HEAD), and include the version number in your report."),
_("Try to explain not only what the bug is, but how it occurs.")
])