|
|
|
@ -78,10 +78,12 @@ class InCallScreen(EdjeGroup):
|
|
|
|
|
|
|
|
|
|
class MainScreen(EdjeGroup):
|
|
|
|
|
text = None
|
|
|
|
|
TIMEOUT = 2.0
|
|
|
|
|
|
|
|
|
|
def __init__(self, screen_manager):
|
|
|
|
|
EdjeGroup.__init__(self, screen_manager, MAIN_SCREEN_NAME)
|
|
|
|
|
self.text = []
|
|
|
|
|
self.last = 0.0
|
|
|
|
|
ecore.timer_add(60.0, self.display_time)
|
|
|
|
|
self.display_time()
|
|
|
|
|
|
|
|
|
@ -130,7 +132,7 @@ class MainScreen(EdjeGroup):
|
|
|
|
|
self.text.append(source)
|
|
|
|
|
print ''.join(self.text)
|
|
|
|
|
self.part_text_set("numberdisplay_text", '*' * len(self.text))
|
|
|
|
|
elif source == "backspace":
|
|
|
|
|
elif source == "backspace_down":
|
|
|
|
|
self.text = self.text[:-1]
|
|
|
|
|
print ''.join(self.text)
|
|
|
|
|
self.part_text_set("numberdisplay_text", '*' * len(self.text))
|
|
|
|
@ -143,12 +145,18 @@ class MainScreen(EdjeGroup):
|
|
|
|
|
self.text.append(source)
|
|
|
|
|
print ''.join(self.text)
|
|
|
|
|
self.part_text_set("numberdisplay_text", "".join(self.text))
|
|
|
|
|
elif source == "backspace":
|
|
|
|
|
elif source == "backspace_down":
|
|
|
|
|
time.time()-self.last < self.TIMEOUT
|
|
|
|
|
self.text = self.text[:-1]
|
|
|
|
|
print ''.join(self.text)
|
|
|
|
|
self.part_text_set("numberdisplay_text", "".join(self.text))
|
|
|
|
|
elif source == "backspace_up" and time.time()-self.last > self.TIMEOUT:
|
|
|
|
|
self.text = []
|
|
|
|
|
print ''.join(self.text)
|
|
|
|
|
self.part_text_set("numberdisplay_text", "".join(self.text))
|
|
|
|
|
elif source == "dial":
|
|
|
|
|
PyneoController.gsm_dial("".join(self.text))
|
|
|
|
|
self.last = time.time()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PyneoController(object):
|
|
|
|
|