Console: battery box improves

This commit is contained in:
Eduardo Silva 2007-03-10 19:37:44 -03:00
parent f8a3daa2b6
commit b5ced20ca4

View File

@ -80,9 +80,13 @@ class XO_Battery(gtk.Fixed):
def _update_battery_status(self):
self._battery_charge = self._get_battery_status()
self.label_charge_value.set_text(str(self._battery_charge) + '%')
self._battery_drw.queue_draw()
new_charge = self._get_battery_status()
if new_charge != self._battery_charge:
self._battery_charge = self._get_battery_status()
self.label_charge_value.set_text(str(self._battery_charge) + '%')
self._battery_drw.queue_draw()
return True
def do_expose(self, widget, event):