add display_time

git-svn-id: http://www.neo1973-germany.de/svn@131 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
fgau 2008-09-06 17:27:28 +00:00
parent 0cdeb0797b
commit a8f9e5c2c8

View file

@ -79,6 +79,8 @@ class MainScreen(EdjeGroup):
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 = []
ecore.timer_add(60.0, self.display_time)
self.display_time()
def register_pyneo_callbacks(self): def register_pyneo_callbacks(self):
PyneoController.register_callback("sim_key_required", self.on_sim_key_required) PyneoController.register_callback("sim_key_required", self.on_sim_key_required)
@ -114,6 +116,10 @@ class MainScreen(EdjeGroup):
def on_gsm_signal_strength_change(self, rssi): def on_gsm_signal_strength_change(self, rssi):
self.part_text_set("signalq_text", "%s dBm"%str(rssi)) self.part_text_set("signalq_text", "%s dBm"%str(rssi))
def display_time(self):
self.part_text_set("time_text", time.strftime("%H:%M", time.localtime()));
return True;
@edje.decorators.signal_callback("dialer_send", "*") @edje.decorators.signal_callback("dialer_send", "*")
def on_edje_signal_numberkey_triggered(self, emission, source): def on_edje_signal_numberkey_triggered(self, emission, source):
if PyneoController.gsm_sim_locked(): if PyneoController.gsm_sim_locked():