- add more python stuff
[enigma2.git] / skin.py
1 from enigma import *
2 import xml.dom.minidom
3
4 def dump(x, i=0):
5         print " " * i + str(x)
6         try:
7                 for n in x.childNodes:
8                         dump(n, i + 1)
9         except:
10                 None
11
12 dom = xml.dom.minidom.parseString(
13         "<screen name=\"clockDialog\"> \
14                 <widget name=\"okbutton\" position=\"10,10\" size=\"280,40\" /> \
15                 <widget name=\"theClock\" position=\"10,60\" size=\"280,50\" /> \
16                 <widget name=\"title\" position=\"10,120\" size=\"280,50\" /> \
17         </screen>")
18
19 def applyGUIskin(screen, skin, name):
20         dump(dom[screen])
21         screen.data["okbutton"]["instance"].move(ePoint(10, 10))
22         screen.data["okbutton"]["instance"].resize(eSize(280, 40))
23
24         screen.data["theClock"]["instance"].move(ePoint(10, 60))
25         screen.data["theClock"]["instance"].resize(eSize(280, 50))
26
27         screen.data["title"]["instance"].move(ePoint(10, 120))
28         screen.data["title"]["instance"].resize(eSize(280, 50))