comparison browser_side/register.py @ 249:c24715dcd2f6

browser_side: set the "workaround" timers to 5 ms instead of 10: - for register and login dialog - for input history cursor position
author souliane <souliane@mailoo.org>
date Fri, 08 Nov 2013 20:50:11 +0100
parents 531b8809d1ab
children 2067d6241927
comparison
equal deleted inserted replaced
248:8fdd20399a06 249:c24715dcd2f6
158 # Browsers offer an auto-completion feature to any 158 # Browsers offer an auto-completion feature to any
159 # text box, but the selected value is not set when 159 # text box, but the selected value is not set when
160 # the widget looses the focus. Using a timer with 160 # the widget looses the focus. Using a timer with
161 # any delay value > 0 would do the trick. 161 # any delay value > 0 would do the trick.
162 if sender == self.login_box: 162 if sender == self.login_box:
163 Timer(10, lambda: self.login_pass_box.setFocus(True)) 163 Timer(5, lambda: self.login_pass_box.setFocus(True))
164 elif sender == self.login_pass_box: 164 elif sender == self.login_pass_box:
165 self.onLogin(None) 165 self.onLogin(None)
166 elif sender == self.register_login_box: 166 elif sender == self.register_login_box:
167 Timer(10, lambda: self.email_box.setFocus(True)) 167 Timer(5, lambda: self.email_box.setFocus(True))
168 elif sender == self.email_box: 168 elif sender == self.email_box:
169 Timer(10, lambda: self.register_pass_box.setFocus(True)) 169 Timer(5, lambda: self.register_pass_box.setFocus(True))
170 elif sender == self.register_pass_box: 170 elif sender == self.register_pass_box:
171 self.onRegister(None) 171 self.onRegister(None)
172 172
173 def onKeyUp(self, sender, keycode, modifiers): 173 def onKeyUp(self, sender, keycode, modifiers):
174 pass 174 pass