Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/test-ui.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-04-20 12:45:39 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-04-20 12:45:39 (GMT)
commitf6a93fd8e9f44acdcddf4a487f1483eca55ae805 (patch)
tree698b3b3b1201cb4343e134b49b688327eed9af27 /tests/test-ui.py
parentbf8dbeade5017140c7d95a2d9ca95ba5b30ea00c (diff)
Some initial work on graphics2
Diffstat (limited to 'tests/test-ui.py')
-rwxr-xr-xtests/test-ui.py34
1 files changed, 15 insertions, 19 deletions
diff --git a/tests/test-ui.py b/tests/test-ui.py
index ad324cc..e44828c 100755
--- a/tests/test-ui.py
+++ b/tests/test-ui.py
@@ -17,32 +17,28 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import gtk
+import hippo
+from sugar.graphics2.window import Window
-class Toolbar(gtk.Toolbar):
+class TextToolbar(gtk.Toolbar):
def __init__(self):
gtk.Toolbar.__init__(self)
-
- icon = gtk.ToolButton()
- icon.set_icon_name('text-format-bold')
- self.insert(icon, -1)
- icon.show()
-class Window(gtk.Window):
- def __init__(self):
- gtk.Window.__init__(self)
- self.set_default_size(800, 600)
-
- box = gtk.VBox()
- self.add(box)
- box.show()
-
- toolbar = Toolbar()
- box.pack_start(toolbar, False)
- toolbar.show()
-
+ button = gtk.ToolButton()
+ button.set_icon_name('text-format-bold')
+ self.insert(button, -1)
+ button.show()
+
window = Window()
window.connect("destroy", lambda w: gtk.main_quit())
+
+text_toolbar = TextToolbar()
+window.toolbox.add_toolbar('Text', text_toolbar)
+text_toolbar.show()
+
+window.canvas.set_root(hippo.CanvasBox(background_color=0))
+
window.show()
gtk.main()