audio: add language display
[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                         exec(f) in globals(), locals()
24
25         def deleteGUIScreen(self):
26                 for (name, val) in self.items():
27                         if isinstance(val, GUIComponent):
28                                 val.GUIdelete()
29
30         def close(self):
31                 self.deleteGUIScreen()