Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/graphics
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-08-30 12:29:52 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-08-30 12:29:52 (GMT)
commit01d368a7a448a33777c7799751ad0ea90c945594 (patch)
treeeca8cce20552acff78981911d1a097e4fa1c763c /tests/graphics
parent17c48f2d25d1c62b89c3da058ba77315bcee95a1 (diff)
Implement VTray. A bit of refactoring to share more code.
Diffstat (limited to 'tests/graphics')
-rw-r--r--tests/graphics/tray.py34
1 files changed, 29 insertions, 5 deletions
diff --git a/tests/graphics/tray.py b/tests/graphics/tray.py
index 9bbf0b2..4de9b46 100644
--- a/tests/graphics/tray.py
+++ b/tests/graphics/tray.py
@@ -22,16 +22,17 @@ Test the sugar.graphics.icon.Icon widget.
import gtk
from sugar.graphics.tray import HTray
+from sugar.graphics.tray import VTray
from sugar.graphics.tray import TrayButton
import common
test = common.Test()
-box = gtk.VBox()
+vbox = gtk.VBox()
tray = HTray()
-box.pack_start(tray, False)
+vbox.pack_start(tray, False)
tray.show()
theme_icons = gtk.icon_theme_get_default().list_icons()
@@ -42,7 +43,7 @@ for i in range(0, 100):
button.show()
tray = HTray()
-box.pack_start(tray, False)
+vbox.pack_start(tray, False)
tray.show()
for i in range(0, 10):
@@ -50,8 +51,31 @@ for i in range(0, 10):
tray.add_item(button)
button.show()
-test.pack_start(box)
-box.show()
+hbox = gtk.HBox()
+
+tray = VTray()
+hbox.pack_start(tray, False)
+tray.show()
+
+for i in range(0, 100):
+ button = TrayButton(icon_name=theme_icons[i])
+ tray.add_item(button)
+ button.show()
+
+tray = VTray()
+hbox.pack_start(tray, False)
+tray.show()
+
+for i in range(0, 4):
+ button = TrayButton(icon_name=theme_icons[i])
+ tray.add_item(button)
+ button.show()
+
+vbox.pack_start(hbox)
+hbox.show()
+
+test.pack_start(vbox)
+vbox.show()
test.show()