Support turbo2.
[vuplus_dvbapp] / skin.py
diff --git a/skin.py b/skin.py
index f763dd0..5a776b0 100755 (executable)
--- a/skin.py
+++ b/skin.py
@@ -56,8 +56,11 @@ def loadSkin(name, scope = SCOPE_SKIN):
 # so the first screen found will be used.
 
 # example: loadSkin("nemesis_greenline/skin.xml")
+from Components.SystemInfo import SystemInfo
+DEFAULT_SKIN = SystemInfo.get("DefaultFullHDSkin", False) and "Vu_HD_1080P/skin.xml" or "Vu_HD/skin.xml"
+
 config.skin = ConfigSubsection()
-config.skin.primary_skin = ConfigText(default = "skin.xml")
+config.skin.primary_skin = ConfigText(default = DEFAULT_SKIN)
 
 profile("LoadSkin")
 try:
@@ -174,6 +177,11 @@ def collectAttributes(skinAttributes, node, context, skin_path_prefix=None, igno
        if size is not None:
                skinAttributes.append(('size', size))
 
+def morphRcImagePath(value):
+       if value.startswith('/usr/share/enigma2') and path.basename(value) in ('rc.png', 'rcold.png'):
+               value = resolveFilename(SCOPE_SKIN, 'rc/' + 'rc_%d.png' % config.misc.rcused.value)
+       return value
+
 def loadPixmap(path, desktop):
        cached = False
        option = path.find("#")
@@ -181,7 +189,7 @@ def loadPixmap(path, desktop):
                options = path[option+1:].split(',')
                path = path[:option]
                cached = "cached" in options
-       ptr = LoadPixmap(path, desktop, cached)
+       ptr = LoadPixmap(morphRcImagePath(path), desktop, cached)
        if ptr is None:
                raise SkinError("pixmap file %s not found!" % (path))
        return ptr