Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-04-20 13:38:34 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-04-20 13:38:34 (GMT)
commit76e375749addc130252116ea677250c38b117549 (patch)
treed428b746910bf2fd828586075aa8d7a65c3d9d40 /sugar
parentf6a93fd8e9f44acdcddf4a487f1483eca55ae805 (diff)
Add more toolbars and a text area
Diffstat (limited to 'sugar')
-rw-r--r--sugar/graphics2/toolbox.py1
-rw-r--r--sugar/graphics2/window.py13
2 files changed, 13 insertions, 1 deletions
diff --git a/sugar/graphics2/toolbox.py b/sugar/graphics2/toolbox.py
index c3148b7..be7e5e0 100644
--- a/sugar/graphics2/toolbox.py
+++ b/sugar/graphics2/toolbox.py
@@ -24,6 +24,7 @@ class Toolbox(gtk.VBox):
self._notebook = gtk.Notebook()
self._notebook.set_tab_pos(gtk.POS_BOTTOM)
+ self._notebook.set_show_border(False)
self.pack_start(self._notebook)
self._notebook.show()
diff --git a/sugar/graphics2/window.py b/sugar/graphics2/window.py
index 068d177..d03788b 100644
--- a/sugar/graphics2/window.py
+++ b/sugar/graphics2/window.py
@@ -31,8 +31,19 @@ class Window(gtk.Window):
vbox.pack_start(self.toolbox, False)
self.toolbox.show()
+ self._canvas_box = gtk.VBox()
+ vbox.pack_start(self._canvas_box)
+ self._canvas_box.show()
+
self.canvas = hippo.Canvas()
- vbox.pack_start(self.canvas)
+ self._canvas_box.pack_start(self.canvas)
self.canvas.show()
vbox.show()
+
+ def set_canvas(self, canvas):
+ if self.canvas:
+ self._canvas_box.remove(self.canvas)
+
+ self._canvas_box.add(canvas)
+ self.canvas = canvas