honor horizontal alignment also when a mark is present
[enigma2.git] / lib / python / Screens / StartWizard.py
1 from Wizard import Wizard, wizardManager
2
3 from Components.Pixmap import *
4 from Components.config import configElementBoolean, config, configfile
5
6 from LanguageSelection import LanguageSelection
7
8 config.misc.firstrun = configElementBoolean("config.misc.firstrun", 1);
9 config.misc.languageselected = configElementBoolean("config.misc.languageselected", 1);
10
11 class StartWizard(Wizard):
12         skin = """
13                 <screen position="0,0" size="720,576" title="Welcome..." flags="wfNoBorder" >
14                         <widget name="text" position="153,50" size="340,270" font="Regular;23" />
15                         <widget name="list" position="50,300" zPosition="1" size="440,200" />
16                         <widget name="config" position="50,300" zPosition="1" size="440,200" transparent="1" scrollbarMode="showOnDemand" />                    
17                         <widget name="stepslider" position="50,500" zPosition="1" borderWidth="2" size="440,20" backgroundColor="dark" />
18                         <widget name="wizard" pixmap="wizard.png" position="40,50" zPosition="10" size="110,174" transparent="1" alphatest="on"/>
19                         <widget name="rc" pixmap="rc.png" position="500,600" zPosition="10" size="154,475" transparent="1" alphatest="on"/>
20                         <widget name="arrowdown" pixmap="arrowdown.png" position="0,0" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
21                         <widget name="arrowup" pixmap="arrowup.png" position="-100,-100" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
22                         <widget name="arrowup2" pixmap="arrowup.png" position="-100,-100" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
23                 </screen>"""
24         
25         def __init__(self, session):
26                 self.skin = StartWizard.skin
27                 self.xmlfile = "startwizard.xml"
28                 
29                 Wizard.__init__(self, session, showSteps = False)
30                 self["wizard"] = Pixmap()
31                 self["rc"] = MovingPixmap()
32                 self["arrowdown"] = MovingPixmap()
33                 self["arrowup"] = MovingPixmap()
34                 self["arrowup2"] = MovingPixmap()
35                 
36         def markDone(self):
37                 config.misc.firstrun.value = 0
38                 config.misc.firstrun.save()
39                 configfile.save()
40                 
41 wizardManager.registerWizard(LanguageSelection, config.misc.languageselected.value)
42 wizardManager.registerWizard(StartWizard, config.misc.firstrun.value)