1 from Screen import Screen
3 from Screens.HelpMenu import HelpableScreen
4 from Components.Label import Label
5 from Components.Slider import Slider
6 from Components.ActionMap import HelpableActionMap
7 from Components.config import config, configElementBoolean
8 from Components.Pixmap import *
10 config.misc.firstrun = configElementBoolean("config.misc.firstrun", 1);
12 class WelcomeWizard(Screen, HelpableScreen):
15 <screen position="0,0" size="720,560" title="Welcome..." flags="wfNoBorder" >
16 <widget name="text" position="50,100" size="440,300" font="Arial;23" />
17 <widget name="step" position="50,50" size="440,25" font="Arial;23" />
18 <widget name="stepslider" position="50,500" zPosition="1" size="440,20" backgroundColor="dark" />
19 <widget name="rc" pixmap="/usr/share/enigma2/rc.png" position="500,50" size="154,475" transparent="1" alphatest="on"/>
20 <widget name="arrowdown" pixmap="/usr/share/enigma2/arrowdown.png" position="0,0" zPosition="1" size="37,70" transparent="1" alphatest="on"/>
23 text = [_("Hello User.\n\nThis start-wizard will guide you through the basic setup of your Dreambox."),
27 def __init__(self, session):
28 self.skin = WelcomeWizard.skin
32 Screen.__init__(self, session)
33 HelpableScreen.__init__(self)
36 self["text"] = Label()
38 self["arrowdown"] = MovingPixmap()
39 self["arrowdown"].moveTo(557, 232, 100)
41 self.onShown.append(self["arrowdown"].startMoving)
43 self["step"] = Label()
45 self["stepslider"] = Slider(1, self.numSteps)
49 self["actions"] = HelpableActionMap(self, "OkCancelActions",
51 "ok": (self.ok, _("Close this Screen...")),
54 def updateValues(self):
55 self["text"].setText(self.text[self.currStep - 1])
56 self["step"].setText(_("Step ") + str(self.currStep) + "/" + str(self.numSteps))
57 self["stepslider"].setValue(self.currStep)
60 if (self.currStep == self.numSteps): # wizard finished
61 config.misc.firstrun.value = 0;
62 config.misc.firstrun.save()
68 def listActiveWizards():
71 if config.misc.firstrun.value:
72 wizards.append(WelcomeWizard)