Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/infopanel.py
diff options
context:
space:
mode:
authorGerard J. Cerchio <gjpc@circlesoft.com>2007-11-28 00:54:37 (GMT)
committer Gerard J. Cerchio <gjpc@circlesoft.com>2007-11-28 00:54:37 (GMT)
commit958f0fcb437be76c2b420e84b138c944ae47847a (patch)
tree16fc6c92f2c139974bb0c83b59ae3044e0087d46 /infopanel.py
Initial import
Diffstat (limited to 'infopanel.py')
-rwxr-xr-xinfopanel.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/infopanel.py b/infopanel.py
new file mode 100755
index 0000000..e608889
--- /dev/null
+++ b/infopanel.py
@@ -0,0 +1,20 @@
+import hippo
+import pango
+from sugar.graphics import style
+
+class InfoPanel(hippo.CanvasBox):
+ def __init__(self):
+ hippo.CanvasBox.__init__(self, spacing=4, padding=5,
+ orientation=hippo.ORIENTATION_VERTICAL)
+ self.status_box = hippo.CanvasBox(spacing=4, padding=5,
+ orientation=hippo.ORIENTATION_VERTICAL)
+ self.append(self.status_box)
+
+ def show(self, text):
+ textwidget = hippo.CanvasText(text=text,
+ font_desc=pango.FontDescription('Sans 16'),
+ color=style.COLOR_WHITE.get_int(),
+ xalign=hippo.ALIGNMENT_CENTER)
+ self.status_box.remove_all()
+ self.status_box.append(textwidget)
+