commit 7fcc881dd49e59b3b742f4f7f0a37c2a70368716
parent 25ff73eff397deb85245dfb2cbecf76d0522d75a
Author: ThomasV <thomasv@electrum.org>
Date: Wed, 10 Feb 2016 12:53:03 +0100
kivy: require two taps to exit. disable toggle_settings
Diffstat:
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py
@@ -173,7 +173,7 @@ class ElectrumWindow(App):
self.qrscanner = None
self.nfcscanner = None
self.tabs = None
-
+ self.is_exit = False
self.current_invoice = None
super(ElectrumWindow, self).__init__(**kwargs)
@@ -372,10 +372,15 @@ class ElectrumWindow(App):
#TODO: alt+tab_number to activate the particular tab
def on_keyboard(self, instance, key, keycode, codepoint, modifiers):
- # override settings button
- if key in (319, 282): #f1/settings button on android
- self.gui.main_gui.toggle_settings(self)
+ if key == 27 and self.is_exit is False:
+ self.is_exit = True
+ self.show_info(_('Press again to exit'))
return True
+ self.is_exit = False
+ # override settings button
+ #if key in (319, 282): #f1/settings button on android
+ # self.gui.main_gui.toggle_settings(self)
+ # return True
def popup_dialog(self, name):
if name == 'settings':