show capacity in dialer screen

git-svn-id: http://www.neo1973-germany.de/svn@244 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
fgau 2009-02-12 21:50:35 +00:00
parent 4022435bdd
commit b190d0a5dc

View file

@ -24,17 +24,16 @@ class DialerScreen(EdjeGroup):
PyneoController.register_callback("sim_ready", self.on_sim_ready) PyneoController.register_callback("sim_ready", self.on_sim_ready)
PyneoController.register_callback("gsm_registering", self.on_gsm_registering) PyneoController.register_callback("gsm_registering", self.on_gsm_registering)
PyneoController.register_callback("gsm_registered", self.on_gsm_registered) PyneoController.register_callback("gsm_registered", self.on_gsm_registered)
# PyneoController.register_callback("gsm_dialing", self.on_gsm_dialing)
PyneoController.register_callback("gsm_operator_change", self.on_gsm_operator_change) PyneoController.register_callback("gsm_operator_change", self.on_gsm_operator_change)
PyneoController.register_callback("gsm_signal_strength_change", self.on_gsm_signal_strength_change) PyneoController.register_callback("gsm_signal_strength_change", self.on_gsm_signal_strength_change)
PyneoController.register_callback("capacity_change", self.on_capacity_change) PyneoController.register_callback("capacity_change", self.on_capacity_change)
def on_capacity_change(self, status): def on_capacity_change(self, status):
# if chgmode == "play-only" or chgmode == "idle": if status['status'] != "Charging":
# EdjeGroup.color_class_set(self, "battvolt_active", 255, 255, 255, 64, 0, 0, 0, 0, 0, 0, 0, 0) EdjeGroup.color_class_set(self, "battvolt_active", 255, 255, 255, 64, 0, 0, 0, 0, 0, 0, 0, 0)
# else: else:
# EdjeGroup.color_class_set(self, "battvolt_active", 255, 255, 255, 128, 0, 0, 0, 0, 0, 0, 0, 0) EdjeGroup.color_class_set(self, "battvolt_active", 255, 255, 255, 128, 0, 0, 0, 0, 0, 0, 0, 0)
self.part_text_set("battvolt_text", "%s" % status['capacity']) self.part_text_set("battvolt_text", "%s%%" % status['capacity'])
def on_sim_key_required(self, key_type): def on_sim_key_required(self, key_type):
print '---', 'opening keyring' print '---', 'opening keyring'