remove unneeded code
[enigma2.git] / skin.py
diff --git a/skin.py b/skin.py
index 13d56cf1b4ac1c29d76fa5444dc2447085e48f08..d40c593b832017ecfdbd44951b2124a93c3f595c 100644 (file)
--- a/skin.py
+++ b/skin.py
@@ -6,6 +6,7 @@ from enigma import eSize, ePoint, gFont, eWindow, eLabel, ePixmap, eWindowStyleM
 
 from Components.config import ConfigSubsection, ConfigText, config
 from Components.Converter.Converter import Converter
+from Components.Sources.Source import Source
 from Tools.Directories import resolveFilename, SCOPE_SKIN, SCOPE_SKIN_IMAGE, SCOPE_FONTS
 from Tools.Import import my_import
 
@@ -13,6 +14,9 @@ from Tools.XMLTools import elementsWithTag, mergeText
 
 colorNames = dict()
 
+def queryColor(colorName):
+       return colorNames.get(colorName)
+
 def dump(x, i=0):
        print " " * i + str(x)
        try:
@@ -345,7 +349,13 @@ def readSkin(screen, skin, name, desktop):
                        # get corresponding source
                        source = screen.get(wsource)
                        if source is None:
-                               raise SkinError("source '" + wsource + "' was not found in screen '" + name + "'!")
+                               if wsource == "fake":
+                                       if screen.get("fake"):
+                                               raise SkinError("screen '" + name + "has a element named 'fake' but its not a Source!!")
+                                       source = Source()
+                                       screen["fake"] = source
+                               else:
+                                       raise SkinError("source '" + wsource + "' was not found in screen '" + name + "'!")
                        
                        wrender = widget.getAttribute('render')