tkivy: add on_dismiss method to crash reporter dialog - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 07bc4c40ef5ae56fee1b34b7f07e650f983f511e DIR parent 9ddb6755504830402447599b9010a54e4b3fc287 HTML Author: ThomasV <thomasv@electrum.org> Date: Wed, 9 Dec 2020 10:22:42 +0100 kivy: add on_dismiss method to crash reporter dialog Diffstat: M electrum/gui/kivy/main_window.py | 2 +- M electrum/gui/kivy/uix/dialogs/cras… | 3 +++ M electrum/gui/kivy/uix/dialogs/inst… | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) --- DIR diff --git a/electrum/gui/kivy/main_window.py b/electrum/gui/kivy/main_window.py t@@ -626,7 +626,7 @@ class ElectrumWindow(App, Logger): self.daemon.add_wallet(wallet) self.load_wallet(wallet) - def on_wizard_aborted(self, wizard): + def on_wizard_aborted(self): # wizard did not return a wallet; and there is no wallet open atm if not self.wallet: self.stop() DIR diff --git a/electrum/gui/kivy/uix/dialogs/crash_reporter.py b/electrum/gui/kivy/uix/dialogs/crash_reporter.py t@@ -131,6 +131,9 @@ class CrashReporter(BaseCrashReporter, Factory.Popup): self.open_url(response["location"]) self.dismiss() + def on_dismiss(self): + self.main_window.on_wizard_aborted() + def open_url(self, url): if platform != 'android': return DIR diff --git a/electrum/gui/kivy/uix/dialogs/installwizard.py b/electrum/gui/kivy/uix/dialogs/installwizard.py t@@ -1071,7 +1071,7 @@ class InstallWizard(BaseWizard, Widget): try: os.unlink(self.path) except FileNotFoundError: pass self.reset_stack() - self.confirm_dialog(message=_('Wallet creation failed'), run_next=self.app.on_wizard_aborted) + self.confirm_dialog(message=_('Wallet creation failed'), run_next=lambda x: self.app.on_wizard_aborted()) def choice_dialog(self, **kwargs): choices = kwargs['choices']