kivy: fix password dialog issue
This commit is contained in:
parent
94664566e7
commit
5d7164f16f
|
@ -68,7 +68,8 @@ Builder.load_string('''
|
||||||
size_hint: 0.5, None
|
size_hint: 0.5, None
|
||||||
height: '48dp'
|
height: '48dp'
|
||||||
text: _('Cancel')
|
text: _('Cancel')
|
||||||
on_release: popup.dismiss()
|
on_release:
|
||||||
|
popup.dismiss()
|
||||||
''')
|
''')
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,6 +79,7 @@ class PasswordDialog(Factory.Popup):
|
||||||
Factory.Popup.__init__(self)
|
Factory.Popup.__init__(self)
|
||||||
self.message = message
|
self.message = message
|
||||||
self.callback = callback
|
self.callback = callback
|
||||||
|
self.pw = None
|
||||||
|
|
||||||
def update_password(self, c):
|
def update_password(self, c):
|
||||||
kb = self.ids.kb
|
kb = self.ids.kb
|
||||||
|
@ -92,5 +94,8 @@ class PasswordDialog(Factory.Popup):
|
||||||
|
|
||||||
def on_password(self, pw):
|
def on_password(self, pw):
|
||||||
if len(pw) == 6:
|
if len(pw) == 6:
|
||||||
|
self.pw = pw
|
||||||
self.dismiss()
|
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…
Reference in New Issue