remove debug code
[enigma2.git] / lib / python / Components / GUISkin.py
1 from GUIComponent import *
2 from skin import applyAllAttributes
3
4 class GUISkin:
5         __module__ = __name__
6
7         def __init__(self):
8                 self.onLayoutFinish = [ ]
9                 pass
10
11         def createGUIScreen(self, parent, desktop):
12                 for (name, val) in self.items():
13                         if isinstance(val, GUIComponent):
14                                 val.GUIcreate(parent)
15                                 val.applySkin(desktop)
16
17                 for w in self.additionalWidgets:
18                         w.instance = w.widget(parent)
19                         # w.instance.thisown = 0
20                         applyAllAttributes(w.instance, desktop, w.skinAttributes)
21                 
22                 for f in self.onLayoutFinish:
23                         if type(f) is not type(self.close): # is this the best way to do this?
24                                 exec(f) in globals(), locals()
25                         else:
26                                 f()
27
28
29
30         def deleteGUIScreen(self):
31                 for (name, val) in self.items():
32                         if isinstance(val, GUIComponent):
33                                 val.GUIdelete()
34
35         def close(self):
36                 self.deleteGUIScreen()