diff options
author | Simon Schampijer <simon@schampijer.de> | 2007-07-11 17:07:15 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2007-07-11 17:07:15 (GMT) |
commit | d267599aaa92372d0d9a868f1662f3aec60d722d (patch) | |
tree | 27fe5c0c65a78d01b6d91e36eea711288d77e16b /infopanel.py | |
parent | 4f1c45f839898bd012e5ae1427c840c88044c38c (diff) | |
parent | 25c7815ffa8c93508d95314beab1f93dcd8f7b75 (diff) |
Merge branch 'tubes'
Conflicts:
NEWS
Diffstat (limited to 'infopanel.py')
-rw-r--r-- | infopanel.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/infopanel.py b/infopanel.py new file mode 100644 index 0000000..95defa6 --- /dev/null +++ b/infopanel.py @@ -0,0 +1,20 @@ +import hippo +import pango +from sugar.graphics import color + +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=color.WHITE.get_int(), + xalign=hippo.ALIGNMENT_CENTER) + self.status_box.remove_all() + self.status_box.append(textwidget) + |