Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/services/console/interface/xo/xo.py
diff options
context:
space:
mode:
Diffstat (limited to 'services/console/interface/xo/xo.py')
-rw-r--r--services/console/interface/xo/xo.py25
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
+