add a dummy class to debug python refcounting (add entrys of TestObj to your tuple...
[enigma2.git] / lib / python / Screens / InfoBar.py
index 23754824ecc9df0cea1078081678eb6790b325b1..c2616dab0355e9507dc3b3b9212570b8add90a20 100644 (file)
@@ -1,7 +1,9 @@
 from Screen import Screen
 
 from Screens.MovieSelection import MovieSelection
+from Screens.ChannelSelection import ChannelSelectionRadio
 from Screens.MessageBox import MessageBox
+from ServiceReference import ServiceReference
 
 from Components.Clock import Clock
 from Components.ActionMap import ActionMap, HelpableActionMap
@@ -32,20 +34,26 @@ class InfoBar(Screen, InfoBarVolumeControl, InfoBarShowHide, InfoBarPowerKey,
 
                self["actions"] = HelpableActionMap(self, "InfobarActions",
                        {
-                               "showMovies": (self.showMovies, _("Play recorded movies..."))
+                               "showMovies": (self.showMovies, _("Play recorded movies...")),
+                               "showRadio": (self.showRadio, _("Show the radio player..."))
                        })
                
                for x in HelpableScreen, \
                                InfoBarVolumeControl, InfoBarShowHide, InfoBarPowerKey, \
                                InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, \
                                InfoBarEvent, InfoBarServiceName, InfoBarInstantRecord, InfoBarAudioSelection, \
-                               InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, InfoBarTuner:
+                               InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, \
+                               InfoBarTuner:
                        x.__init__(self)
 
                self.helpList.append((self["actions"], "InfobarActions", [("showMovies", "Watch a Movie...")]))
+               self.helpList.append((self["actions"], "InfobarActions", [("showRadio", "Hear Radio...")]))
 
                self["CurrentTime"] = Clock()
 
+       def showRadio(self):
+               self.session.open(ChannelSelectionRadio)
+
        def showMovies(self):
                self.session.openWithCallback(self.movieSelected, MovieSelection)
 
@@ -82,7 +90,8 @@ class MoviePlayer(Screen, InfoBarVolumeControl, InfoBarShowHide, InfoBarPowerKey
                        self.close()
                        
        def showMovies(self):
-               self.session.openWithCallback(self.movieSelected, MovieSelection)
+               ref = self.session.nav.getCurrentlyPlayingServiceReference()
+               self.session.openWithCallback(self.movieSelected, MovieSelection, ref)
 
        def movieSelected(self, service):
                if service is not None: