diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-04-08 09:42:28 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-04-08 09:42:28 +0000 |
| commit | 6ecc7dc132071039edf045ad55b3fb2773aed784 (patch) | |
| tree | 2726b8a2861262b96085607c79f0ba2c181e103a | |
| parent | 9cb4795246ef286ea7eed349639b84d723147b2c (diff) | |
| download | enigma2-6ecc7dc132071039edf045ad55b3fb2773aed784.tar.gz enigma2-6ecc7dc132071039edf045ad55b3fb2773aed784.zip | |
add support for picture in picture into the infobar (by pressing the blue button)
| -rw-r--r-- | data/keymap.xml | 4 | ||||
| -rw-r--r-- | data/skin.xml | 2 | ||||
| -rw-r--r-- | data/skin_default.xml | 3 | ||||
| -rw-r--r-- | lib/python/Screens/InfoBar.py | 6 | ||||
| -rw-r--r-- | lib/python/Screens/InfoBarGenerics.py | 33 | ||||
| -rw-r--r-- | lib/python/Screens/Makefile.am | 2 | ||||
| -rw-r--r-- | lib/python/Screens/PictureInPicture.py | 9 |
7 files changed, 52 insertions, 7 deletions
diff --git a/data/keymap.xml b/data/keymap.xml index 2fa539b8..cc558b17 100644 --- a/data/keymap.xml +++ b/data/keymap.xml @@ -71,6 +71,10 @@ <key id="KEY_RED" mapto="instantRecord" flags="m" /> </map> + <map context="InfobarExtensions"> + <key id="KEY_BLUE" mapto="extensions" flags="m" /> + </map> + <map context="InfobarChannelSelection"> <key id="KEY_LEFT" mapto="zapUp" flags="mr" /> <key id="KEY_RIGHT" mapto="zapDown" flags="mr" /> diff --git a/data/skin.xml b/data/skin.xml index 502a3dd4..7f550747 100644 --- a/data/skin.xml +++ b/data/skin.xml @@ -72,7 +72,7 @@ <widget name="ButtonYellow" pixmap="button_yellow.png" position="430,132" size="27,12" /> <widget name="ButtonYellowText" position="460,130" size="85,22" font="Regular;14" backgroundColor="blue" transparent="1" /> <widget name="ButtonBlue" pixmap="button_blue.png" position="540,132" size="27,12" /> - <widget name="ButtonBlueText" position="570,130" size="85,22" font="Regular;14" backgroundColor="blue" transparent="1" /> + <widget name="ButtonBlueText" position="570,130" size="95,22" font="Regular;14" backgroundColor="blue" transparent="1" /> </screen> <screen name="MoviePlayer" flags="wfNoBorder" position="0,370" size="720,148" title="InfoBar"> diff --git a/data/skin_default.xml b/data/skin_default.xml index e829da56..6e666020 100644 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -239,6 +239,9 @@ <widget name="duration" position="140,345" size="100,30" font="Regular;22" /> <widget name="channel" position="240,345" size="270,30" font="Regular;22" /> </screen> + <screen name="PictureInPicture" position="500,100" size="180,140" zPosition="-1" flags="wfNoBorder" > + <widget name="video" position="0,0" size="160,120" /> + </screen> <screen name="MovieSelection" position="90,98" size="560,415" title="Select a movie"> <widget name="waitingtext" position="0,0" size="500,335" zPosition="2" font="Regular;22" /> <widget name="list" position="0,0" size="560,375" zPosition="1" scrollbarMode="showOnDemand" /> 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 |
