2007-09-07 00:40:26 +02:00
|
|
|
import hippo
|
|
|
|
import gtk
|
|
|
|
import gobject
|
|
|
|
|
2011-10-29 10:44:18 +02:00
|
|
|
from sugar3.graphics.icon import CanvasIcon
|
|
|
|
from sugar3.graphics.roundbox import CanvasRoundBox
|
2007-09-07 00:40:26 +02:00
|
|
|
|
|
|
|
import common
|
|
|
|
|
|
|
|
test = common.Test()
|
|
|
|
|
|
|
|
canvas = hippo.Canvas()
|
|
|
|
test.pack_start(canvas)
|
|
|
|
canvas.show()
|
|
|
|
|
|
|
|
scrollbars = hippo.CanvasScrollbars()
|
|
|
|
canvas.set_root(scrollbars)
|
|
|
|
|
|
|
|
box = hippo.CanvasBox(padding=10, spacing=10)
|
|
|
|
scrollbars.set_root(box)
|
|
|
|
|
2010-10-15 19:53:25 +02:00
|
|
|
|
2007-09-07 00:40:26 +02:00
|
|
|
def idle_cb():
|
|
|
|
global countdown
|
|
|
|
|
|
|
|
for i in range(0, 100):
|
2007-09-12 21:52:04 +02:00
|
|
|
entry = hippo.CanvasBox(border=2, border_color=0x000000ff,
|
|
|
|
orientation=hippo.ORIENTATION_HORIZONTAL,
|
|
|
|
padding=10, spacing=10)
|
2007-09-07 00:40:26 +02:00
|
|
|
|
|
|
|
for j in range(0, 3):
|
|
|
|
icon = CanvasIcon(icon_name='go-left')
|
|
|
|
entry.append(icon)
|
|
|
|
|
|
|
|
for j in range(0, 2):
|
|
|
|
text = hippo.CanvasText(text='Text %s %s' % (countdown, j))
|
|
|
|
entry.append(text)
|
|
|
|
|
|
|
|
box.append(entry)
|
|
|
|
|
|
|
|
countdown -= 1
|
|
|
|
|
|
|
|
return countdown > 0
|
|
|
|
|
|
|
|
countdown = 1000
|
|
|
|
gobject.idle_add(idle_cb)
|
|
|
|
|
|
|
|
test.show()
|
|
|
|
|
2010-10-15 21:14:59 +02:00
|
|
|
if __name__ == '__main__':
|
2007-09-07 00:40:26 +02:00
|
|
|
common.main(test)
|