diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-09-08 13:26:27 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-09-08 13:26:27 (GMT) |
commit | 3e82db03c0471bed8fc2f6f426a4b66f54c2a0fb (patch) | |
tree | dea327c575e36f52d67b9de81254492601b2cc78 /tests | |
parent | 233051875b0eb7466612156fbe7c5d7b33e6ddc4 (diff) |
Show different icons
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test-icons.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/test-icons.py b/tests/test-icons.py index ff45356..2e362fb 100755 --- a/tests/test-icons.py +++ b/tests/test-icons.py @@ -1,4 +1,5 @@ #!/usr/bin/python +import random import pygtk pygtk.require('2.0') @@ -27,13 +28,17 @@ item = goocanvas.Rect(x=0, y=0, width=800, height=600, line_width=0.0, fill_color="#4f4f4f") root.add_child(item) +icon_names = [ 'stock-buddy', 'activity-groupchat', 'activity-web'] + k = 0 while k < 11: i = 0 - while i < 16: + while i < 15: color = IconColor.IconColor() - icon = IconItem(x=i * 50, y=k * 50, size=46, color=color, - icon_name='stock-buddy') + icon_name_n = int(random.random() * len(icon_names)) + icon = IconItem(x=i * 50 + 10, y=k * 50 + 10, + size=46, color=color, + icon_name=icon_names[icon_name_n]) root.add_child(icon) i += 1 k += 1 |