diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-05-04 23:34:47 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-05-04 23:34:47 +0000 |
| commit | 84702da5d3a6df33717b399b859008a3cf8a1522 (patch) | |
| tree | 03495da465a37db044f69bee8a3f06945947b33d | |
| parent | fd002c45932aa88271af9be88f2d585199ac5a1e (diff) | |
| download | enigma2-84702da5d3a6df33717b399b859008a3cf8a1522.tar.gz enigma2-84702da5d3a6df33717b399b859008a3cf8a1522.zip | |
move/resize PiP window (requires new drivers) (and is not yet working properly)
| -rw-r--r-- | data/keymap.xml | 11 | ||||
| -rw-r--r-- | data/skin_default.xml | 3 | ||||
| -rw-r--r-- | lib/python/Screens/InfoBarGenerics.py | 7 | ||||
| -rw-r--r-- | lib/python/Screens/Makefile.am | 2 | ||||
| -rw-r--r-- | lib/python/Screens/PictureInPicture.py | 15 | ||||
| -rw-r--r-- | lib/python/Screens/__init__.py | 2 |
6 files changed, 37 insertions, 3 deletions
diff --git a/data/keymap.xml b/data/keymap.xml index c313be39..a81d5efd 100644 --- a/data/keymap.xml +++ b/data/keymap.xml @@ -357,6 +357,17 @@ <key id="KEY_OK" mapto="showMenu" flags="m" /> </map> + <map context="PiPSetupActions"> + <key id="KEY_UP" mapto="up" flags="mr" /> + <key id="KEY_DOWN" mapto="down" flags="mr" /> + <key id="KEY_LEFT" mapto="left" flags="mr" /> + <key id="KEY_RIGHT" mapto="right" flags="mr" /> + <key id="KEY_EXIT" mapto="cancel" flags="m" /> + <key id="KEY_OK" mapto="ok" flags="m" /> + <key id="KEY_CHANNELUP" mapto="size+" flags="mr" /> + <key id="KEY_CHANNELDOWN" mapto="size-" flags="mr" /> + </map> + <map context="MediaPlayerSeekActions"> <key id="KEY_YELLOW" mapto="pause" flags="m" /> <key id="KEY_GREEN" mapto="play" flags="m" /> diff --git a/data/skin_default.xml b/data/skin_default.xml index cddc18f4..3ed48eab 100644 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -262,6 +262,9 @@ <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="PiPSetup" backgroundColor="transparent" position="70,400" size="600,150" title="PiPSetup" flags="wfNoBorder"> + <widget name="text" position="0,0" size="600,150" font="Regular;23" /> + </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/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index c18c698f..7c335f1d 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -1005,6 +1005,8 @@ class InfoBarTimeshift: self.timeshift_enabled = False self.__seekableStatusChanged() +from Screens.PiPSetup import PiPSetup + class InfoBarExtensions: def __init__(self): self.pipshown = False @@ -1020,6 +1022,7 @@ class InfoBarExtensions: list.append((_("Activate Picture in Picture"), "pipon")) elif self.pipshown == True: list.append((_("Disable Picture in Picture"), "pipoff")) + list.append((_("Move Picture in Picture"), "movepip")) self.session.openWithCallback(self.extensionCallback, ChoiceBox, title=_("Please choose an extension..."), list = list) def extensionCallback(self, answer): @@ -1037,12 +1040,14 @@ class InfoBarExtensions: else: self.pipservice = None del self.pip - + self.session.nav.playService(newservice) elif answer[1] == "pipoff": #self.pip.hide() self.pipservice = None del self.pip self.pipshown = False + elif answer[1] == "movepip": + self.session.open(PiPSetup, pip = self.pip) from RecordTimer import parseEvent diff --git a/lib/python/Screens/Makefile.am b/lib/python/Screens/Makefile.am index 06571d81..b848b976 100644 --- a/lib/python/Screens/Makefile.am +++ b/lib/python/Screens/Makefile.am @@ -7,7 +7,7 @@ install_PYTHON = \ Satconfig.py ScanSetup.py NetworkSetup.py Ci.py TimerEntry.py Volume.py \ EpgSelection.py EventView.py Mute.py Standby.py ServiceInfo.py \ InfoBarGenerics.py HelpMenu.py Wizard.py __init__.py \ - Dish.py LanguageSelection.py StartWizard.py \ + Dish.py LanguageSelection.py StartWizard.py PiPSetup.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 PictureInPicture.py TimeDateInput.py diff --git a/lib/python/Screens/PictureInPicture.py b/lib/python/Screens/PictureInPicture.py index 391c042f..8bf78cfb 100644 --- a/lib/python/Screens/PictureInPicture.py +++ b/lib/python/Screens/PictureInPicture.py @@ -1,4 +1,5 @@ from Screens.Screen import Screen +from enigma import ePoint, eSize from Components.VideoWindow import VideoWindow @@ -7,3 +8,17 @@ class PictureInPicture(Screen): Screen.__init__(self, session) self["video"] = VideoWindow() + + def move(self, x, y): + print "moving pip to", str(x) + ":" + str(y) + self.instance.move(ePoint(x, y)) + + def resize(self, w, h): + print "resizing pip to", str(w) + "x" + str(h) + self.instance.resize(eSize(*(w, h))) + + def getPosition(self): + return ((self.instance.position().x(), self.instance.position().y())) + + def getSize(self): + return (self.instance.size().width(), self.instance.size().height())
\ No newline at end of file diff --git a/lib/python/Screens/__init__.py b/lib/python/Screens/__init__.py index 30f39b1c..55830ea6 100644 --- a/lib/python/Screens/__init__.py +++ b/lib/python/Screens/__init__.py @@ -4,6 +4,6 @@ __all__ = ["ChannelSelection", "ClockDisplay", "ConfigMenu", "TimerEdit", "Setup", "HarddiskSetup", "FixedMenu", "Satconfig", "Scanconfig", "Ci.py", "Volume.py", "Mute.py", "EpgSelection", "EventView", "Standby", "ServiceInfo", - "InfoBarGenerics", "HelpMenu", "Wizard", + "InfoBarGenerics", "HelpMenu", "Wizard", "PiPSetup", "PVRState", "Console", "InputBox", "ChoiceBox", "SimpleSummary", "TimerSelection" ] |
