diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-01-06 15:24:27 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-01-06 15:24:27 +0000 |
| commit | a1067c78ff03cdc9854f34c5c513ed776d7a2834 (patch) | |
| tree | 21bf9df69e5688b5de18aa29c75e28019e655e3a | |
| parent | 465830af28a14427c286dc9e6d73d656e5867449 (diff) | |
| download | enigma2-a1067c78ff03cdc9854f34c5c513ed776d7a2834.tar.gz enigma2-a1067c78ff03cdc9854f34c5c513ed776d7a2834.zip | |
nicer radio player
| -rw-r--r-- | data/skin.xml | 12 | ||||
| -rw-r--r-- | lib/python/Screens/ChannelSelection.py | 17 |
2 files changed, 26 insertions, 3 deletions
diff --git a/data/skin.xml b/data/skin.xml index 9ce0bb7c..aa8874e5 100644 --- a/data/skin.xml +++ b/data/skin.xml @@ -234,12 +234,20 @@ <widget name="key_yellow" position="280,0" size="140,40" backgroundColor="yellow" font="Regular;21" /> <widget name="key_blue" position="420,0" size="140,40" backgroundColor="blue" font="Regular;21" /> </screen> - <screen name="ChannelSelectionRadio" position="90,98" size="560,417" title="Channel Selection"> - <widget name="list" position="00,45" size="560,304" scrollbarMode="showOnDemand" /> + <screen name="ChannelSelectionRadio" position="90,98" size="560,307" title="Channel Selection"> <widget name="key_red" position="0,0" size="140,40" backgroundColor="red" font="Regular;21" /> <widget name="key_green" position="140,0" size="140,40" backgroundColor="green" font="Regular;21" /> <widget name="key_yellow" position="280,0" size="140,40" backgroundColor="yellow" font="Regular;21" /> <widget name="key_blue" position="420,0" size="140,40" backgroundColor="blue" font="Regular;21" /> + <widget name="list" position="0,45" size="560,252" scrollbarMode="showOnDemand" /> + </screen> + <screen name="ServiceInfoWindow" position="90,420" size="560,65"> + <widget name="Event_Now_StartTime" position="0,0" size="60,22" font="Regular;20" backgroundColor="dark" /> + <widget name="Event_Next_StartTime" position="0,30" size="60,22" font="Regular;20" backgroundColor="dark" /> + <widget name="Event_Now" position="80,0" size="380,22" font="Regular;20" backgroundColor="dark" /> + <widget name="Event_Next" position="80,30" size="380,22" font="Regular;20" backgroundColor="dark" /> + <widget name="Event_Now_Duration" position="470,0" size="150,26" font="Regular;22" backgroundColor="dark" /> + <widget name="Event_Next_Duration" position="470,30" size="150,26" font="Regular;22" backgroundColor="dark" /> </screen> <screen name="SimpleChannelSelection" position="90,98" size="560,417" title="Channel Selection"> <widget name="list" position="00,45" size="560,364" scrollbarMode="showOnDemand" /> diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index cad99616..e958f797 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -8,6 +8,7 @@ from Components.config import config, configElement, ConfigSubsection, configTex from Screens.FixedMenu import FixedMenu from Tools.NumericalTextInput import NumericalTextInput from Components.NimManager import nimmanager +from Components.EventInfo import EventInfo import xml.dom.minidom @@ -233,7 +234,7 @@ class ChannelSelectionEdit: def doContext(self): self.session.open(ChannelContextMenu, self) -USE_MULTIBOUQUETS = False +USE_MULTIBOUQUETS = True MODE_TV = 0 MODE_RADIO = 1 @@ -542,6 +543,16 @@ class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit): if lastservice.valid() and self.getCurrentSelection() != lastservice: self.servicelist.setCurrent(lastservice) +class ServiceInfoWindow(Screen): + def __init__(self, session): + Screen.__init__(self, session) + self["Event_Now_StartTime"] = EventInfo(self.session.nav, EventInfo.Now_StartTime) + self["Event_Next_StartTime"] = EventInfo(self.session.nav, EventInfo.Next_StartTime) + self["Event_Now"] = EventInfo(self.session.nav, EventInfo.Now) + self["Event_Next"] = EventInfo(self.session.nav, EventInfo.Next) + self["Event_Now_Duration"] = EventInfo(self.session.nav, EventInfo.Now_Duration) + self["Event_Next_Duration"] = EventInfo(self.session.nav, EventInfo.Next_Duration) + class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit): def __init__(self, session): ChannelSelectionBase.__init__(self, session) @@ -552,6 +563,8 @@ class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit): config.radio.lastroot = configElement("config.radio.lastroot", configText, "", 0); self.onLayoutFinish.append(self.onCreate) + self.info = session.instantiateDialog(ServiceInfoWindow) + class ChannelActionMap(NumberActionMap): def action(self, contexts, action): if not self.csel.enterBouquet(action): @@ -593,6 +606,7 @@ class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit): self.servicelist.setCurrent(lastservice) self.session.nav.playService(lastservice) self.servicelist.setPlayableIgnoreService(lastservice) + self.info.instance.show() def channelSelected(self): # just return selected service ref = self.getCurrentSelection() @@ -612,6 +626,7 @@ class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit): self.setRootBase(root, justSet) def closeRadio(self): + self.info.instance.hide() lastroot=eServiceReference(config.radio.lastroot.value) lastservice=eServiceReference(config.radio.lastservice.value) if lastroot.valid() and self.getRoot() != lastroot: |
