aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorthedoc <thedoc@atom.(none)>2009-12-15 15:38:30 +0100
committerthedoc <thedoc@atom.(none)>2009-12-23 14:36:17 +0100
commitdc5f101d2790968876caee8bba4ce8ab9210aa2e (patch)
tree6c9870e340714847cfdc6590170d54567d58fd9f /lib/python
parent2701861d66fd17ed825de7bbfdea8e000fdb30b4 (diff)
downloadenigma2-dc5f101d2790968876caee8bba4ce8ab9210aa2e.tar.gz
enigma2-dc5f101d2790968876caee8bba4ce8ab9210aa2e.zip
fixes bug #269
add "activate picture in picture" to ChannelSelection context menu to activate PiP for the currently selected service
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Screens/ChannelSelection.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py
index 0432823b..d4a098c3 100644
--- a/lib/python/Screens/ChannelSelection.py
+++ b/lib/python/Screens/ChannelSelection.py
@@ -25,6 +25,7 @@ from Screens.InputBox import InputBox, PinInput
from Screens.MessageBox import MessageBox
from Screens.ServiceInfo import ServiceInfo
profile("ChannelSelection.py 4")
+from Screens.PictureInPicture import PictureInPicture
from Screens.RdsDisplay import RassInteractive
from ServiceReference import ServiceReference
from Tools.BoundFunction import boundFunction
@@ -101,6 +102,7 @@ class ChannelContextMenu(Screen):
if not inBouquetRootList:
isPlayable = not (current_sel_flags & (eServiceReference.isMarker|eServiceReference.isDirectory))
if isPlayable:
+ append_when_current_valid(current, menu, (_("Activate Picture in Picture"), self.showServiceInPiP), level = 0)
if config.ParentalControl.configured.value:
if parentalControl.getProtectionLevel(csel.getCurrentSelection().toCompareString()) == -1:
append_when_current_valid(current, menu, (_("add to parental protection"), boundFunction(self.addParentalProtection, csel.getCurrentSelection())), level = 0)
@@ -189,6 +191,21 @@ class ChannelContextMenu(Screen):
self.close()
else:
self.session.openWithCallback(self.close, MessageBox, _("The pin code you entered is wrong."), MessageBox.TYPE_ERROR)
+
+ def showServiceInPiP(self):
+ if self.session.pipshown:
+ del self.session.pip
+ self.session.pip = self.session.instantiateDialog(PictureInPicture)
+ self.session.pip.show()
+ newservice = self.csel.servicelist.getCurrent()
+ if self.session.pip.playService(newservice):
+ self.session.pipshown = True
+ self.session.pip.servicePath = self.csel.getCurrentServicePath()
+ self.close()
+ else:
+ self.session.pipshown = False
+ del self.session.pip
+ self.session.openWithCallback(self.close, MessageBox, _("Could not open Picture in Picture"), MessageBox.TYPE_ERROR)
def addServiceToBouquetSelected(self):
bouquets = self.csel.getBouquetList()