aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-04-08 09:42:28 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-04-08 09:42:28 +0000
commit6ecc7dc132071039edf045ad55b3fb2773aed784 (patch)
tree2726b8a2861262b96085607c79f0ba2c181e103a /lib/python/Screens
parent9cb4795246ef286ea7eed349639b84d723147b2c (diff)
downloadenigma2-6ecc7dc132071039edf045ad55b3fb2773aed784.tar.gz
enigma2-6ecc7dc132071039edf045ad55b3fb2773aed784.zip
add support for picture in picture into the infobar (by pressing the blue button)
Diffstat (limited to 'lib/python/Screens')
-rw-r--r--lib/python/Screens/InfoBar.py6
-rw-r--r--lib/python/Screens/InfoBarGenerics.py33
-rw-r--r--lib/python/Screens/Makefile.am2
-rw-r--r--lib/python/Screens/PictureInPicture.py9
4 files changed, 44 insertions, 6 deletions
diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py
index 8bfef204..a35ff3a4 100644
--- a/lib/python/Screens/InfoBar.py
+++ b/lib/python/Screens/InfoBar.py
@@ -17,7 +17,7 @@ from Screens.InfoBarGenerics import InfoBarShowHide, \
InfoBarAudioSelection, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, \
InfoBarSubserviceSelection, InfoBarTuner, InfoBarShowMovies, InfoBarTimeshift, \
InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, \
- InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin
+ InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions
from Screens.HelpMenu import HelpableScreen, HelpMenu
@@ -30,7 +30,7 @@ class InfoBar(InfoBarShowHide,
InfoBarEvent, InfoBarServiceName, InfoBarInstantRecord, InfoBarAudioSelection,
HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish,
InfoBarSubserviceSelection, InfoBarTuner, InfoBarTimeshift, InfoBarSeek,
- InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, Screen):
+ InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, Screen):
def __init__(self, session):
Screen.__init__(self, session)
@@ -47,7 +47,7 @@ class InfoBar(InfoBarShowHide,
InfoBarEvent, InfoBarServiceName, InfoBarInstantRecord, InfoBarAudioSelection, \
InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, \
InfoBarTuner, InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, \
- InfoBarTeletextPlugin:
+ InfoBarTeletextPlugin, InfoBarExtensions:
x.__init__(self)
self.helpList.append((self["actions"], "InfobarActions", [("showMovies", "Watch a Movie...")]))
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
index d5275768..31dd3033 100644
--- a/lib/python/Screens/InfoBarGenerics.py
+++ b/lib/python/Screens/InfoBarGenerics.py
@@ -29,6 +29,7 @@ from Screens.InputBox import InputBox
from Screens.MessageBox import MessageBox
from Screens.MinuteInput import MinuteInput
from Screens.TimerSelection import TimerSelection
+from Screens.PictureInPicture import PictureInPicture
from ServiceReference import ServiceReference
from Tools import Notifications
@@ -957,6 +958,34 @@ class InfoBarTimeshift:
self.timeshift_enabled = False
self.__seekableStatusChanged()
+class InfoBarExtensions:
+ def __init__(self):
+ self.pipshown = False
+
+ self["InstantExtensionsActions"] = HelpableActionMap(self, "InfobarExtensions",
+ {
+ "extensions": (self.extensions, "Extensions..."),
+ })
+
+ def extensions(self):
+ list = []
+ if self.pipshown == False:
+ list.append((_("Activate Picture in Picture"), "pipon"))
+ elif self.pipshown == True:
+ list.append((_("Disable Picture in Picture"), "pipoff"))
+ self.session.openWithCallback(self.extensionCallback, ChoiceBox, title=_("Please choose an extension..."), list = list)
+
+ def extensionCallback(self, answer):
+ if answer[1] == "pipon":
+ self.pip = self.session.instantiateDialog(PictureInPicture)
+ self.pip.show()
+ self.pipshown = True
+ print "would show PiP now"
+ elif answer[1] == "pipoff":
+ self.pip.hide()
+ del self.pip
+ self.pipshown = False
+
from RecordTimer import parseEvent
class InfoBarInstantRecord:
@@ -1136,9 +1165,9 @@ class InfoBarAdditionalInfo:
self.onLayoutFinish.append(self["ButtonYellowText"].update)
self["ButtonBlue"] = PixmapConditional(withTimer = False)
- self["ButtonBlue"].setConnect(lambda: False)
+ self["ButtonBlue"].setConnect(lambda: True)
self["ButtonBlueText"] = LabelConditional(text = _("Extensions"), withTimer = False)
- self["ButtonBlueText"].setConnect(lambda: False)
+ self["ButtonBlueText"].setConnect(lambda: True)
self.onLayoutFinish.append(self["ButtonBlue"].update)
self.onLayoutFinish.append(self["ButtonBlueText"].update)
diff --git a/lib/python/Screens/Makefile.am b/lib/python/Screens/Makefile.am
index 031e6088..8ed08184 100644
--- a/lib/python/Screens/Makefile.am
+++ b/lib/python/Screens/Makefile.am
@@ -10,4 +10,4 @@ install_PYTHON = \
Dish.py SubserviceSelection.py LanguageSelection.py StartWizard.py \
TutorialWizard.py PluginBrowser.py MinuteInput.py Scart.py PVRState.py \
Console.py InputBox.py ChoiceBox.py SimpleSummary.py ImageWizard.py \
- MediaPlayer.py TimerSelection.py
+ MediaPlayer.py TimerSelection.py PictureInPicture.py
diff --git a/lib/python/Screens/PictureInPicture.py b/lib/python/Screens/PictureInPicture.py
new file mode 100644
index 00000000..7b94ce4b
--- /dev/null
+++ b/lib/python/Screens/PictureInPicture.py
@@ -0,0 +1,9 @@
+from Screens.Screen import Screen
+
+from Components.VideoWindow import VideoWindow
+
+class PictureInPicture(Screen):
+ def __init__(self, session):
+ Screen.__init__(self, session)
+
+ self["video"] = VideoWindow() \ No newline at end of file