png cleanup by nemesis, source changes.
[enigma2.git] / lib / python / Screens / StartWizard.py
1 from Wizard import wizardManager
2 from Screens.WizardLanguage import WizardLanguage
3
4 from Components.Pixmap import Pixmap, MovingPixmap
5 from Components.config import config, ConfigBoolean, configfile
6
7 from LanguageSelection import LanguageSelection
8 #from DefaultWizard import DefaultWizard
9
10 config.misc.firstrun = ConfigBoolean(default = True)
11 config.misc.languageselected = ConfigBoolean(default = True)
12
13 class StartWizard(WizardLanguage):
14         skin = """
15                 <screen position="0,0" size="720,576" title="Welcome..." flags="wfNoBorder" >
16                         <widget name="text" position="153,50" size="340,270" font="Regular;23" />
17                         <widget source="list" render="Listbox" position="50,300" size="440,200" scrollbarMode="showOnDemand" >
18                                 <convert type="StringList" />
19                         </widget>
20                         <widget name="config" position="50,300" zPosition="1" size="440,200" transparent="1" scrollbarMode="showOnDemand" />
21                         <ePixmap pixmap="skin_default/buttons/button_red.png" position="40,225" zPosition="0" size="15,16" transparent="1" alphatest="on" />
22                         <widget name="languagetext" position="55,225" size="95,30" font="Regular;18" />                 
23                         <widget name="stepslider" position="50,500" zPosition="1" borderWidth="2" size="440,20" backgroundColor="dark" />
24                         <widget name="wizard" pixmap="skin_default/wizard.png" position="40,50" zPosition="10" size="110,174" transparent="1" alphatest="on"/>
25                         <widget name="rc" pixmap="skin_default/rc.png" position="500,600" zPosition="10" size="154,475" transparent="1" alphatest="on"/>
26                         <widget name="arrowdown" pixmap="skin_default/arrowdown.png" position="0,0" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
27                         <widget name="arrowup" pixmap="skin_default/arrowup.png" position="-100,-100" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
28                         <widget name="arrowup2" pixmap="skin_default/arrowup.png" position="-100,-100" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
29                 </screen>"""
30         
31         def __init__(self, session):
32                 self.skin = StartWizard.skin
33                 self.xmlfile = "startwizard.xml"
34                 
35                 WizardLanguage.__init__(self, session, showSteps = False)
36                 self["wizard"] = Pixmap()
37                 self["rc"] = MovingPixmap()
38                 self["arrowdown"] = MovingPixmap()
39                 self["arrowup"] = MovingPixmap()
40                 self["arrowup2"] = MovingPixmap()
41                 
42         def markDone(self):
43                 config.misc.firstrun.value = 0
44                 config.misc.firstrun.save()
45                 configfile.save()
46                 
47 wizardManager.registerWizard(LanguageSelection, config.misc.languageselected.value, priority = 5)
48 #wizardManager.registerWizard(DefaultWizard, config.misc.defaultchosen.value)
49 wizardManager.registerWizard(StartWizard, config.misc.firstrun.value, priority = 20)