PEP8: Fix whitespace
[openblackhole/openblackhole-enigma2.git] / lib / python / Components / Renderer / Pig.py
index 493391d..d0c0294 100644 (file)
@@ -9,6 +9,7 @@ class Pig(Renderer):
        def __init__(self):
                Renderer.__init__(self)
                self.Position = self.Size = None
+               self.hidePip = True
 
        GUI_WIDGET = eVideoWidget
 
@@ -18,6 +19,13 @@ class Pig(Renderer):
                instance.setFBSize(desk.size())
 
        def applySkin(self, desktop, parent):
+               attribs = self.skinAttributes[:]
+               for (attrib, value) in self.skinAttributes:
+                       if attrib == "hidePip":
+                               self.hidePip = value == 1
+                               attribs.remove((attrib,value))
+                               break
+               self.skinAttributes = attribs
                ret = Renderer.applySkin(self, desktop, parent)
                if ret:
                        self.Position = self.instance.position()
@@ -30,9 +38,9 @@ class Pig(Renderer):
                                self.instance.resize(self.Size)
                        if self.Position:
                                self.instance.move(self.Position)
-                       PipPigMode(True)
+                       self.hidePip and PipPigMode(True)
 
        def onHide(self):
                if self.instance:
                        self.preWidgetRemove(self.instance)
-                       PipPigMode(False)
+                       self.hidePip and PipPigMode(False)