add python foo with help from the master. autoscale for display is ... TODO: scrolling to left

git-svn-id: http://www.neo1973-germany.de/svn@105 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
fgau 2008-08-29 21:29:30 +00:00
parent c126221a2a
commit 97b8bdf84e

View file

@ -50,7 +50,6 @@ class MainScreen(EdjeGroup):
def __init__(self, main):
EdjeGroup.__init__(self, main, EDJE_GROUP_NAME)
self.text = []
self.pin_count = []
dbus_ml = e_dbus.DBusEcoreMainLoop()
self.system_bus = SystemBus(mainloop=dbus_ml)
@ -115,23 +114,21 @@ class MainScreen(EdjeGroup):
@edje.decorators.signal_callback("dialer_send", "*")
def on_edje_signal_numberkey_triggered(self, emission, source):
if self.res['code'] != 'READY':
if (len(self.text) < 4) and (source in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9")):
if len(self.text) < 4 and '0'.isdigit():
self.text.append(source)
self.pin_count.append("*")
print ''.join(self.text)
self.part_text_set("numberdisplay_text", "".join(self.pin_count))
self.part_text_set("numberdisplay_text", '*' * len(self.text))
elif source == "backspace":
self.text = self.text[:-1]
self.pin_count = self.pin_count[:-1]
print ''.join(self.text)
self.part_text_set("numberdisplay_text", "".join(self.pin_count))
self.part_text_set("numberdisplay_text", '*' * len(self.text))
elif source == "dial":
print '---', 'send pin'
self.part_text_set("numberdisplay_text", "register ...")
self.keyring.Open(''.join(self.text), dbus_interface=DIN_KEYRING, )
self.nw_register()
else:
if source in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "#", "*", ):
if source in '0'.isdigit():
self.text.append(source)
print ''.join(self.text)
self.part_text_set("numberdisplay_text", "".join(self.text))