1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#!/usr/bin/env python
import edje
import ecore.evas
import sys
import os
import ecore
import emotion
import evas
import elementary
#from omniORB import CORBA, PortableServer
#import CosNaming, YalpInterfaces, YalpInterfaces__POA
def huhu(obj, it, xyz):
print "guck guck"
def gui():
elementary.init()
win = elementary.Window("test", elementary.ELM_WIN_BASIC)
edje_file = os.path.join(os.path.dirname(sys.argv[0]), "list_test.edj")
c = edje.Edje(win.canvas, file = edje_file, group = "huhu")
items = [("huhu", huhu),
("haha", huhu),
("hoho", huhu),
("hehe", huhu),
("hihi", huhu)]
medialist = elementary.List(win);
medialist.size_hint_weight_set(1.0, 1.0)
medialist.size_hint_align_set(-1.0, -1.0)
box0 = elementary.Box(win)
win.resize_object_add(box0)
c.part_swallow("list", medialist)
box0.pack_end(medialist)
medialist.show()
for item in items:
print item[0]
medialist.item_append(item[0], None, None, item[1])
medialist.go()
c.show()
win.resize(800, 600)
box0.show()
win.show()
elementary.run()
gui()
|