From 84702da5d3a6df33717b399b859008a3cf8a1522 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Thu, 4 May 2006 23:34:47 +0000 Subject: [PATCH] move/resize PiP window (requires new drivers) (and is not yet working properly) --- data/keymap.xml | 11 +++++++++++ data/skin_default.xml | 3 +++ lib/python/Screens/InfoBarGenerics.py | 7 ++++++- lib/python/Screens/Makefile.am | 2 +- lib/python/Screens/PictureInPicture.py | 15 +++++++++++++++ lib/python/Screens/__init__.py | 2 +- 6 files changed, 37 insertions(+), 3 deletions(-) diff --git a/data/keymap.xml b/data/keymap.xml index c313be3..a81d5ef 100644 --- a/data/keymap.xml +++ b/data/keymap.xml @@ -357,6 +357,17 @@ + + + + + + + + + + + diff --git a/data/skin_default.xml b/data/skin_default.xml index cddc18f..3ed48ea 100644 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -262,6 +262,9 @@ + + + diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index c18c698..7c335f1 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 06571d8..b848b97 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 391c042..8bf78cf 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 30f39b1..55830ea 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" ] -- 2.7.4