initialize config.av.pip only once..
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Wed, 8 Nov 2006 21:17:39 +0000 (21:17 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Wed, 8 Nov 2006 21:17:39 +0000 (21:17 +0000)
lib/python/Screens/PictureInPicture.py

index c89ca22..5c49683 100644 (file)
@@ -3,12 +3,17 @@ from enigma import ePoint, eSize, eServiceCenter
 from Components.VideoWindow import VideoWindow
 from Components.config import config, ConfigPosition
 
 from Components.VideoWindow import VideoWindow
 from Components.config import config, ConfigPosition
 
+pip_config_initialized = False
+
 class PictureInPicture(Screen):
        def __init__(self, session):
 class PictureInPicture(Screen):
        def __init__(self, session):
+               global pip_config_initialized
                Screen.__init__(self, session)
                self["video"] = VideoWindow()
                self.currentService = None
                Screen.__init__(self, session)
                self["video"] = VideoWindow()
                self.currentService = None
-               config.av.pip = ConfigPosition(default=[-1, -1, -1, -1], args = (719, 567, 720, 568))
+               if not pip_config_initialized:
+                       config.av.pip = ConfigPosition(default=[-1, -1, -1, -1], args = (719, 567, 720, 568))
+                       pip_config_initialized = True
                self.onLayoutFinish.append(self.LayoutFinished)
 
        def LayoutFinished(self):
                self.onLayoutFinish.append(self.LayoutFinished)
 
        def LayoutFinished(self):