1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-26 01:18:28 +00:00

trezor.ui: send -> touch

This commit is contained in:
Jan Pochyla 2017-05-31 19:30:06 +02:00
parent dc87e14334
commit 3cb89f3ae7
2 changed files with 5 additions and 8 deletions

View File

@ -58,7 +58,7 @@ class HoldToConfirmDialog(Widget):
self.content.render()
self.button.render()
def send(self, event, pos):
def touch(self, event, pos):
button = self.button
was_started = button.state & BTN_STARTED
button.touch(event, pos)
@ -71,7 +71,7 @@ class HoldToConfirmDialog(Widget):
if self.loader.stop():
return CONFIRMED
if self.content is not None:
return self.content.send(event, pos)
return self.content.touch(event, pos)
async def __iter__(self):
return await loop.Wait((self._render_loop(), self._event_loop()))
@ -85,6 +85,6 @@ class HoldToConfirmDialog(Widget):
def _event_loop(self):
while True:
event, *pos = yield loop.Select(loop.TOUCH)
result = self.send(event, pos)
result = self.touch(event, pos)
if result is not None:
return result

View File

@ -29,6 +29,3 @@ class Text(ui.Widget):
style = item
else:
fg = item
def send(self, event, pos):
pass