remove the timer for backspace. thx thomas ;)

git-svn-id: http://www.neo1973-germany.de/svn@139 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
fgau 2008-09-10 15:18:52 +00:00
parent c882ebc859
commit 387dafaf5d

View file

@ -16,7 +16,7 @@ FULLSCREEN = True
APP_TITLE = "epydial" APP_TITLE = "epydial"
WM_INFO = ("epydial", "epydial") WM_INFO = ("epydial", "epydial")
EDJE_FILE_PATH = "data/themes/blackwhite/" EDJE_FILE_PATH = "data/themes/default/"
MAIN_SCREEN_NAME = "pyneo/dialer/main" MAIN_SCREEN_NAME = "pyneo/dialer/main"
INCALL_SCREEN_NAME = "pyneo/dialer/incall" INCALL_SCREEN_NAME = "pyneo/dialer/incall"
@ -78,12 +78,10 @@ class InCallScreen(EdjeGroup):
class MainScreen(EdjeGroup): class MainScreen(EdjeGroup):
text = None text = None
TIMEOUT = 2.0
def __init__(self, screen_manager): def __init__(self, screen_manager):
EdjeGroup.__init__(self, screen_manager, MAIN_SCREEN_NAME) EdjeGroup.__init__(self, screen_manager, MAIN_SCREEN_NAME)
self.text = [] self.text = []
self.last = 0.0
ecore.timer_add(60.0, self.display_time) ecore.timer_add(60.0, self.display_time)
self.display_time() self.display_time()
@ -145,18 +143,16 @@ class MainScreen(EdjeGroup):
self.text.append(source) self.text.append(source)
print ''.join(self.text) print ''.join(self.text)
self.part_text_set("numberdisplay_text", "".join(self.text)) self.part_text_set("numberdisplay_text", "".join(self.text))
elif source == "backspace_down": elif source == "backspace":
time.time()
self.text = self.text[:-1] self.text = self.text[:-1]
print ''.join(self.text) print ''.join(self.text)
self.part_text_set("numberdisplay_text", "".join(self.text)) self.part_text_set("numberdisplay_text", "".join(self.text))
elif source == "backspace_up" and time.time()-self.last > self.TIMEOUT: elif source == "clear":
self.text = [] self.text = []
print ''.join(self.text) print ''.join(self.text)
self.part_text_set("numberdisplay_text", "".join(self.text)) self.part_text_set("numberdisplay_text", "".join(self.text))
elif source == "dial": elif source == "dial":
PyneoController.gsm_dial("".join(self.text)) PyneoController.gsm_dial("".join(self.text))
self.last = time.time()
class PyneoController(object): class PyneoController(object):