add special backspace (only blackwhite theme)
git-svn-id: http://www.neo1973-germany.de/svn@136 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
parent
fd1f322c6d
commit
6c2757563f
3 changed files with 20 additions and 5 deletions
|
@ -5,7 +5,8 @@
|
|||
//
|
||||
// Signal1: "dialer_send"
|
||||
// Parameter1.1: $"keynumber"
|
||||
// Parameter1.2: "backspace"
|
||||
// Parameter1.2: "backspace_down"
|
||||
// Parameter1.2: "backspace_up"
|
||||
// Parameter1.2: "dial"
|
||||
|
||||
data {
|
||||
|
@ -336,10 +337,16 @@ collections {
|
|||
}
|
||||
}
|
||||
program {
|
||||
name: "numberdisplay_backspace_area_signal_emit";
|
||||
name: "numberdisplay_backspace_area_down_signal_emit";
|
||||
signal: "mouse,down,*";
|
||||
source: "numberdisplay_backspace_area";
|
||||
action: SIGNAL_EMIT "dialer_send" "backspace";
|
||||
action: SIGNAL_EMIT "dialer_send" "backspace_down";
|
||||
}
|
||||
program {
|
||||
name: "numberdisplay_backspace_area_up_signal_emit";
|
||||
signal: "mouse,up,*";
|
||||
source: "numberdisplay_backspace_area";
|
||||
action: SIGNAL_EMIT "dialer_send" "backspace_up";
|
||||
}
|
||||
program {
|
||||
name: "numberdisplay_backspace_area_animation_start";
|
||||
|
|
Binary file not shown.
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue