From 3e82db03c0471bed8fc2f6f426a4b66f54c2a0fb Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 8 Sep 2006 15:26:27 +0200 Subject: [PATCH] Show different icons --- tests/test-icons.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/test-icons.py b/tests/test-icons.py index ff453568..2e362fb3 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