diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2009-09-22 00:18:59 +0200 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2009-09-22 00:18:59 +0200 |
| commit | bf1f752e54c78b226ffb49493cd827d44154887a (patch) | |
| tree | c27b0cd8d0e7d006f6e912b7172c08f43f9a93c4 /lib/python | |
| parent | 151ace6626065824fb827310e82b49026d1e9ec9 (diff) | |
| download | enigma2-bf1f752e54c78b226ffb49493cd827d44154887a.tar.gz enigma2-bf1f752e54c78b226ffb49493cd827d44154887a.zip | |
allow disabling and resizing of picture in picture window in movie player
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Screens/InfoBar.py | 8 | ||||
| -rw-r--r-- | lib/python/Screens/InfoBarGenerics.py | 15 |
2 files changed, 17 insertions, 6 deletions
diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index 4d92bd39..d65eace8 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -47,6 +47,8 @@ class InfoBar(InfoBarBase, InfoBarShowHide, "showTv": (self.showTv, _("Show the tv player...")), }, prio=2) + self.allowPiP = True + for x in HelpableScreen, \ InfoBarBase, InfoBarShowHide, \ InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, InfoBarRdsDecoder, \ @@ -126,7 +128,7 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \ InfoBarSeek, InfoBarShowMovies, InfoBarAudioSelection, HelpableScreen, InfoBarNotifications, InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, InfoBarMoviePlayerSummarySupport, InfoBarSubtitleSupport, Screen, InfoBarTeletextPlugin, - InfoBarServiceErrorPopupSupport, InfoBarExtensions, InfoBarPlugins): + InfoBarServiceErrorPopupSupport, InfoBarExtensions, InfoBarPlugins, InfoBarPiP): ENABLE_RESUME_SUPPORT = True ALLOW_SUSPEND = True @@ -139,13 +141,15 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \ "leavePlayer": (self.leavePlayer, _("leave movie player...")) }) + self.allowPiP = False + for x in HelpableScreen, InfoBarShowHide, InfoBarMenu, \ InfoBarBase, InfoBarSeek, InfoBarShowMovies, \ InfoBarAudioSelection, InfoBarNotifications, InfoBarSimpleEventView, \ InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, \ InfoBarMoviePlayerSummarySupport, InfoBarSubtitleSupport, \ InfoBarTeletextPlugin, InfoBarServiceErrorPopupSupport, InfoBarExtensions, \ - InfoBarPlugins: + InfoBarPlugins, InfoBarPiP: x.__init__(self) self.lastservice = session.nav.getCurrentlyPlayingServiceReference() diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 20c069a2..2f830616 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -1370,11 +1370,18 @@ class InfoBarSleepTimer: # depends on InfoBarExtensions class InfoBarPiP: def __init__(self): - self.session.pipshown = False + try: + self.session.pipshown + except: + self.session.pipshown = False if SystemInfo.get("NumVideoDecoders", 1) > 1: - self.addExtension((self.getShowHideName, self.showPiP, lambda: True), "blue") - self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green") - self.addExtension((self.getSwapName, self.swapPiP, self.pipShown), "yellow") + if (self.allowPiP): + self.addExtension((self.getShowHideName, self.showPiP, lambda: True), "blue") + self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green") + self.addExtension((self.getSwapName, self.swapPiP, self.pipShown), "yellow") + else: + self.addExtension((self.getShowHideName, self.showPiP, self.pipShown), "blue") + self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green") def pipShown(self): return self.session.pipshown |
