summaryrefslogtreecommitdiff
path: root/src/YalpClients/EflClient/medialist.py
blob: c3a3e706bea08ddc4808f3e893d09bca31f9cf4e (plain)
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
#!/usr/bin/env python

import edje
import ecore.evas
import sys
import os
import ecore
import emotion
import evas
import elementary

class Medias(object):
	def __init__(self, win, c):
		self.win = win
		self.c = c
		self.add_button()
	
	def huhu(self, obj, str, x):
		print "guck guck"

	def fill_medialist(self, win, c):
		items = [("huhu", self.huhu),
						("haha", self.huhu),
						("hoho", self.huhu),
						("hehe", self.huhu),
						("hihi", self.huhu),
						("12345", self.huhu),
						("abcde", self.huhu),
						("fghij", self.huhu),
						("klmno", self.huhu),
						("pqrst", self.huhu),
						("uvwxyz", self.huhu)]

		medialist = elementary.List(win);
		medialist.size_hint_weight_set(1.0, 1.0)
		medialist.size_hint_align_set(-1.0, -1.0)
		c.part_swallow("medialist", medialist)

		for item in items:
			#print item[0]
			medialist.item_append(item[0], None, None, item[1])

		medialist.show()
		medialist.go()

	def add_button(self):
		addbutton = elementary.Button(self.win)
		addbutton.label_set("Add to Playlist")
		self.c.part_swallow("medialist_buttonframe", addbutton)
		addbutton.show()