[ScanSetup] Fix error on complete scan with T2 tuners.
[vuplus_dvbapp] / skin.py
diff --git a/skin.py b/skin.py
index a20f3eb..a0190f1 100755 (executable)
--- a/skin.py
+++ b/skin.py
@@ -140,6 +140,17 @@ def applySingleAttribute(guiObject, desktop, attrib, value, scale = ((1,1),(1,1)
                        guiObject.move(parsePosition(value, scale, desktop, guiObject.csize()))
                elif attrib == 'size':
                        guiObject.resize(parseSize(value, scale))
+               elif attrib == 'animationPaused':
+                       pass
+               elif attrib == 'animationMode':
+                       guiObject.setAnimationMode(
+                               { "disable": 0x00,
+                                       "off": 0x00,
+                                       "offshow": 0x10,
+                                       "offhide": 0x01,
+                                       "onshow": 0x01,
+                                       "onhide": 0x10,
+                               }[value])
                elif attrib == 'title':
                        guiObject.setTitle(_(value))
                elif attrib == 'text':
@@ -284,8 +295,8 @@ def loadSingleSkinData(desktop, skin, path_prefix):
                                else:
                                        bpp = 32
                                #print "Resolution:", xres,yres,bpp
-                               from enigma import gFBDC
-                               gFBDC.getInstance().setResolution(xres, yres)
+                               from enigma import gMainDC
+                               gMainDC.getInstance().setResolution(xres, yres)
                                desktop.resize(eSize(xres, yres))
                                if bpp != 32:
                                        # load palette (not yet implemented)
@@ -402,10 +413,10 @@ def lookupScreen(name, style_id):
                # first, find the corresponding screen element
                for x in skin.findall("screen"):
                        if x.attrib.get('name', '') == name:
-                               screen_style_id = x.attrib.get('id', None)
-                               if screen_style_id is None and name.find('ummary') > 0:
-                                       screen_style_id = 1
-                               if screen_style_id is None or int(screen_style_id) == style_id:
+                               screen_style_id = x.attrib.get('id', '-1')
+                               if screen_style_id == '-1' and name.find('ummary') > 0:
+                                       screen_style_id = '1'
+                               if (style_id != 2 and int(screen_style_id) == -1) or int(screen_style_id) == style_id:
                                        return x, path
        return None, None
 
@@ -440,9 +451,10 @@ def readSkin(screen, skin, names, desktop):
                        skin_tuple = (skin_tuple,)
                for sskin in skin_tuple:
                        parsedSkin = xml.etree.cElementTree.fromstring(sskin)
-                       screen_style_id = parsedSkin.attrib.get('id', None)
-                       if style_id != 2 or screen_style_id is None or int(screen_style_id) == style_id:
+                       screen_style_id = parsedSkin.attrib.get('id', '-1')
+                       if (style_id != 2 and int(screen_style_id) == -1) or int(screen_style_id) == style_id:
                                myscreen = screen.parsedSkin = parsedSkin
+                               break
 
        #assert myscreen is not None, "no skin for screen '" + repr(names) + "' found!"
        if myscreen is None: