show ChannelSelection on first run (after the start wizard)
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Fri, 10 Mar 2006 17:07:28 +0000 (17:07 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Fri, 10 Mar 2006 17:07:28 +0000 (17:07 +0000)
lib/python/Screens/ChannelSelection.py
lib/python/Screens/InfoBarGenerics.py

index 7dd805cbbb020e51356296870d1ff9eb9a1cc9e5..f4f912725097cb20f506ced16d788f88e13306d3 100644 (file)
@@ -437,6 +437,8 @@ class ChannelSelectionBase(Screen):
                self.servicePathTV = [ ]
                self.servicePathRadio = [ ]
                self.servicePath = None
                self.servicePathTV = [ ]
                self.servicePathRadio = [ ]
                self.servicePath = None
+               
+               self.mode = MODE_TV
 
                self.pathChangedDisabled = False
 
 
                self.pathChangedDisabled = False
 
index 0531de95a1865c23bc0f1b746b231144bcedb7fc..7a7eb8ff78c3a9cf86cfe1de33d025980763c3c5 100644 (file)
@@ -4,7 +4,7 @@ from Components.ActionMap import NumberActionMap
 from Components.Label import *
 from Components.ProgressBar import *
 from Components.config import configfile, configsequencearg
 from Components.Label import *
 from Components.ProgressBar import *
 from Components.config import configfile, configsequencearg
-from Components.config import config, configElement, ConfigSubsection, configSequence
+from Components.config import config, configElement, ConfigSubsection, configSequence, configElementBoolean
 from ChannelSelection import ChannelSelection, BouquetSelector
 
 from Components.Pixmap import Pixmap, PixmapConditional
 from ChannelSelection import ChannelSelection, BouquetSelector
 
 from Components.Pixmap import Pixmap, PixmapConditional
@@ -269,12 +269,17 @@ class InfoBarNumberZap:
                        self.servicelist.setCurrentSelection(service) #select the service in servicelist
                        self.servicelist.zap()
 
                        self.servicelist.setCurrentSelection(service) #select the service in servicelist
                        self.servicelist.zap()
 
+config.misc.initialchannelselection = configElementBoolean("config.misc.initialchannelselection", 1);
+
 class InfoBarChannelSelection:
        """ ChannelSelection - handles the channelSelection dialog and the initial 
        channelChange actions which open the channelSelection dialog """
        def __init__(self):
                #instantiate forever
                self.servicelist = self.session.instantiateDialog(ChannelSelection)
 class InfoBarChannelSelection:
        """ ChannelSelection - handles the channelSelection dialog and the initial 
        channelChange actions which open the channelSelection dialog """
        def __init__(self):
                #instantiate forever
                self.servicelist = self.session.instantiateDialog(ChannelSelection)
+               
+               if config.misc.initialchannelselection.value == 1:
+                       self.onShown.append(self.firstRun)
 
                self["ChannelSelectActions"] = HelpableActionMap(self, "InfobarChannelSelection",
                        {
 
                self["ChannelSelectActions"] = HelpableActionMap(self, "InfobarChannelSelection",
                        {
@@ -286,6 +291,12 @@ class InfoBarChannelSelection:
                                "historyNext": (self.historyNext, _("next channel in history"))
                        })
 
                                "historyNext": (self.historyNext, _("next channel in history"))
                        })
 
+       def firstRun(self):
+               self.onShown.remove(self.firstRun)
+               config.misc.initialchannelselection.value = 0
+               config.misc.initialchannelselection.save()
+               self.switchChannelDown()
+               
        def historyBack(self):
                self.servicelist.historyBack()
 
        def historyBack(self):
                self.servicelist.historyBack()