nicer radio player
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 6 Jan 2006 15:24:27 +0000 (15:24 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 6 Jan 2006 15:24:27 +0000 (15:24 +0000)
data/skin.xml
lib/python/Screens/ChannelSelection.py

index 9ce0bb7c3e3eac985e5d85ac7bdf384b617ce0ba..aa8874e5faf916927c131bfc0ba9f29c548b311a 100644 (file)
                        <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" />
index cad9961624389e050ff34431969ecb464417425b..e958f797b40940b6f05cdd8210edb769ea7070ae 100644 (file)
@@ -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: