add message "Please press OK to continue." to DefaultSatLists wizard's
[enigma2.git] / lib / python / Screens / ScanSetup.py
index be0f87e431bc3b21fbd7322095850f5e9808866b..2a80fcbe58f80b8f1642b90907cec7dc142d4097 100644 (file)
@@ -1,4 +1,5 @@
 from Screen import Screen
+from Screens.DefaultWizard import DefaultWizard
 from ServiceScan import ServiceScan
 from Components.config import config, ConfigSubsection, ConfigSelection, \
        ConfigYesNo, ConfigInteger, getConfigListEntry, ConfigSlider, ConfigEnableDisable
@@ -6,6 +7,7 @@ from Components.ActionMap import NumberActionMap, ActionMap
 from Components.ConfigList import ConfigListScreen
 from Components.NimManager import nimmanager, getConfigSatlist
 from Components.Label import Label
+from Tools.Directories import resolveFilename, SCOPE_DEFAULTPARTITIONMOUNTDIR, SCOPE_DEFAULTDIR, SCOPE_DEFAULTPARTITION
 from Screens.MessageBox import MessageBox
 from enigma import eTimer, eDVBFrontendParametersSatellite, eComponentScan, \
        eDVBSatelliteEquipmentControl, eDVBFrontendParametersTerrestrial, \
@@ -277,6 +279,27 @@ class CableTransponderSearchSupport:
                tmpstr += "\n\n..."
                self.cable_search_session = self.session.openWithCallback(self.cableTransponderSearchSessionClosed, MessageBox, tmpstr, MessageBox.TYPE_INFO)
 
+class DefaultSatLists(DefaultWizard):
+       def __init__(self, session, silent = True, showSteps = False):
+               self.xmlfile = "defaultsatlists.xml"
+               DefaultWizard.__init__(self, session, silent, showSteps, neededTag = "services")
+               print "configuredSats:", nimmanager.getConfiguredSats()
+
+       def setDirectory(self):
+               self.directory = []
+               self.directory.append(resolveFilename(SCOPE_DEFAULTDIR))
+               import os
+               os.system("mount %s %s" % (resolveFilename(SCOPE_DEFAULTPARTITION), resolveFilename(SCOPE_DEFAULTPARTITIONMOUNTDIR)))
+               self.directory.append(resolveFilename(SCOPE_DEFAULTPARTITIONMOUNTDIR))
+                               
+       def statusCallback(self, status, progress):
+               print "statusCallback:", status, progress
+               from Components.DreamInfoHandler import DreamInfoHandler
+               if status == DreamInfoHandler.STATUS_DONE:
+                       self["text"].setText(_("The installation of the default services lists is finished.") + "\n\n" + _("Please press OK to continue."))
+                       self.markDone()
+                       self.disableKeys = False        
+
 class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport):
        def __init__(self, session):
                Screen.__init__(self, session)
@@ -494,7 +517,7 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport):
                                        if frontendData.get("system", "DVB-S") == "DVB-S2":
                                                defaultSat["fec_s2"] = {"FEC_1_2": "1_2", "FEC_2_3": "2_3", "FEC_3_4": "3_4", "FEC_4_5": "4_5", "FEC_5_6": "5_6", "FEC_7_8": "7_8", "FEC_8_9": "8_9", "FEC_9_10": "9_10"} \
                                                                                        [frontendData.get("fec_inner", "FEC_AUTO")]
-                                               defaultSat["rolloff"] = {"ROLLOFF_0_35" : "0_35", "ROLLOFF_0_25" : "0_25", "0_20" : "ROLLOFF_0_20"}[frontendData.get("rolloff", "ROLLOFF_0_35")]
+                                               defaultSat["rolloff"] = {"ROLLOFF_0_35" : "0_35", "ROLLOFF_0_25" : "0_25", "ROLLOFF_0_20" : "0_20"}[frontendData.get("rolloff", "ROLLOFF_0_35")]
                                                defaultSat["pilot"] = {"PILOT_ON" : "on", "PILOT_OFF" : "off", "PILOT_AUTO" : "auto"}[frontendData.get("pilot", "PILOT_AUTO")]
                                        else:
                                                defaultSat["fec"] = {"FEC_AUTO": "auto", "FEC_1_2": "1_2", "FEC_2_3": "2_3", "FEC_3_4": "3_4", "FEC_5_6": "5_6", "FEC_7_8": "7_8", "FEC_NONE": "none"} \