diff options
author | Eduardo Silva <edsiper@monotop.(none)> | 2007-06-12 18:32:48 (GMT) |
---|---|---|
committer | Eduardo Silva <edsiper@monotop.(none)> | 2007-06-12 18:32:48 (GMT) |
commit | cc604e0815d77a5417fa5af50eeb5bdb4ffe32f6 (patch) | |
tree | 82278f57e3019a039415c3accec1dc3c917b0aa2 /services/console/interface/xo/xo.py | |
parent | 7e8160871accd725c3be4f58dddc82bdbc9d3e93 (diff) |
Console: new nandflash status viewer
Diffstat (limited to 'services/console/interface/xo/xo.py')
-rw-r--r-- | services/console/interface/xo/xo.py | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/services/console/interface/xo/xo.py b/services/console/interface/xo/xo.py index 525ff71..487b965 100644 --- a/services/console/interface/xo/xo.py +++ b/services/console/interface/xo/xo.py @@ -26,13 +26,13 @@ import string from cpu import XO_CPU from system import XO_System from battery import XO_Battery +from nandflash import XO_NandFlash class Interface: def __init__(self): - self.widget = self.vbox = gtk.VBox(False, 3) - + # System information xo_system = XO_System() self.vbox.pack_start(xo_system, False, False, 0) @@ -41,8 +41,23 @@ class Interface: xo_cpu = XO_CPU() self.vbox.pack_start(xo_cpu, False, False, 0) - # Battery Status / Graph - xo_battery = XO_Battery() - self.vbox.pack_start(xo_battery, False, False, 0) + # Graphics: Battery Status, NandFlash + self._xo_battery = XO_Battery() + self._xo_nandflash = XO_NandFlash() + + hbox = gtk.HBox(False, 2) + hbox.pack_start(self._xo_battery, False, False, 0) + hbox.pack_start(self._xo_nandflash, False, False, 0) + self.vbox.pack_start(hbox, False, False, 0) self.vbox.show_all() + + # Update every 5 seconds + gobject.timeout_add(5000, self._update_components) + + def _update_components(self): + self._xo_battery.update_status() + self._xo_nandflash.update_status() + + return True + |