Browse Source

kivy: fix password dialog issue

283
ThomasV 9 years ago
parent
commit
5d7164f16f
  1. 9
      gui/kivy/uix/dialogs/password_dialog.py

9
gui/kivy/uix/dialogs/password_dialog.py

@ -68,7 +68,8 @@ Builder.load_string('''
size_hint: 0.5, None
height: '48dp'
text: _('Cancel')
on_release: popup.dismiss()
on_release:
popup.dismiss()
''')
@ -78,6 +79,7 @@ class PasswordDialog(Factory.Popup):
Factory.Popup.__init__(self)
self.message = message
self.callback = callback
self.pw = None
def update_password(self, c):
kb = self.ids.kb
@ -92,5 +94,8 @@ class PasswordDialog(Factory.Popup):
def on_password(self, pw):
if len(pw) == 6:
self.pw = pw
self.dismiss()
Clock.schedule_once(lambda dt: self.callback(pw), 0.1)
def on_dismiss(self):
Clock.schedule_once(lambda dt: self.callback(self.pw), 0.1)

Loading…
Cancel
Save