From c126221a2a7228737fa268433cea2945630c568d Mon Sep 17 00:00:00 2001 From: fgau Date: Fri, 29 Aug 2008 20:15:30 +0000 Subject: [PATCH] 4 digits for sim pin. TODO: the first digit is not visible git-svn-id: http://www.neo1973-germany.de/svn@104 46df4e5c-bc4e-4628-a0fc-830ba316316d --- epydial/epydial.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/epydial/epydial.py b/epydial/epydial.py index c12f6c0..aca9eb0 100755 --- a/epydial/epydial.py +++ b/epydial/epydial.py @@ -50,6 +50,7 @@ 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) @@ -114,18 +115,20 @@ class MainScreen(EdjeGroup): @edje.decorators.signal_callback("dialer_send", "*") def on_edje_signal_numberkey_triggered(self, emission, source): if self.res['code'] != 'READY': - if source in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ): + if (len(self.text) < 4) and (source in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9")): self.text.append(source) + self.pin_count.append("*") print ''.join(self.text) - self.part_text_set("numberdisplay_text", "".join(self.text)) + self.part_text_set("numberdisplay_text", "".join(self.pin_count)) 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.text)) + self.part_text_set("numberdisplay_text", "".join(self.pin_count)) elif source == "dial": print '---', 'send pin' - self.keyring.Open(''.join(self.text), dbus_interface=DIN_KEYRING, ) 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", "#", "*", ):