fix no more working service change after opening/closing audio selection with Exit...
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Mon, 12 Jun 2006 10:32:00 +0000 (10:32 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Mon, 12 Jun 2006 10:32:00 +0000 (10:32 +0000)
lib/python/Screens/InfoBarGenerics.py

index b7325c3..36f1d90 100644 (file)
@@ -1219,7 +1219,6 @@ class InfoBarAudioSelection:
                print "tlist:", tlist
                if n > 0:
                        self.audioChannel = service.audioChannel()
-#                      config.audio.audiochannel = configElement_nonSave("config.audio.audiochannel", configSelection, self.audioChannel.getCurrentChannel(), (("left", _("Left  >")), ("stereo", _("<  Stereo  >")), ("right", _("<  Right"))))
 
                        for x in range(n):
                                i = audio.getTrackInfo(x)
@@ -1240,8 +1239,6 @@ class InfoBarAudioSelection:
                        selectedAudio = tlist[0][1]
                        tlist.sort(lambda x,y : cmp(x[0], y[0]))
 
-#                      tlist.insert(0, getConfigListEntry(_("Audio Channel"), config.audio.audiochannel))
-
                        selection = 2
                        for x in tlist:
                                if x[1] != selectedAudio:
@@ -1263,15 +1260,18 @@ class InfoBarAudioSelection:
                                        tlist = [(_("left"), 0), (_("stereo"), 1), (_("right"), 2)]
                                        self.session.openWithCallback(self.modeSelected, ChoiceBox, title=_("Select audio mode"), list = tlist, selection = selection, keys = keys)
                        else:
+                               del self.audioChannel
                                if self.session.nav.getCurrentService().audioTracks().getNumberOfTracks() > audio[1]:
                                        self.audioTracks.selectTrack(audio[1])
+               else:
+                       del self.audioChannel
                del self.audioTracks
-#              del config.audio.audiochannel
 
        def modeSelected(self, mode):
                if mode is not None:
                        self.audioChannel.selectChannel(mode[1])
                del self.audioChannel
+
 class InfoBarSubserviceSelection:
        def __init__(self):
                self["SubserviceSelectionAction"] = HelpableActionMap(self, "InfobarSubserviceSelectionActions",