From ed0dd6eb228f5418bff6c10bc7d169ff33135030 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Fri, 5 Nov 2021 20:35:28 +0100 Subject: [PATCH] kivy: implement ElectrumGui.stop --- electrum/gui/kivy/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/electrum/gui/kivy/__init__.py b/electrum/gui/kivy/__init__.py index 3d4421e50..ab722d4c9 100644 --- a/electrum/gui/kivy/__init__.py +++ b/electrum/gui/kivy/__init__.py @@ -69,3 +69,11 @@ class ElectrumGui(BaseElectrumGui, Logger): gui_object=self, ) w.run() + + def stop(self) -> None: + from kivy.app import App + from kivy.clock import Clock + app = App.get_running_app() + if not app: + return + Clock.schedule_once(lambda dt: app.stop())