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"/>
21 <widget name="arrowup" pixmap="/usr/share/enigma2/arrowup.png" position="-100,-100" zPosition="1" size="37,70" transparent="1" alphatest="on"/>
24 text = [_("Hello User.\n\nThis start-wizard will guide you through the basic setup of your Dreambox.\n\nPress the OK button on your remote control to move to the next step."),
25 _("You can use the Up and Down buttons on your remote control to select your choice.\n\nWhat do you want to do?"),
28 def __init__(self, session):
29 self.skin = WelcomeWizard.skin
33 Screen.__init__(self, session)
34 HelpableScreen.__init__(self)
37 self["text"] = Label()
39 self["arrowdown"] = MovingPixmap()
40 self["arrowdown"].moveTo(557, 232, 100)
41 self["arrowup"] = MovingPixmap()
44 self.onShown.append(self["arrowdown"].startMoving)
46 self["step"] = Label()
48 self["stepslider"] = Slider(1, self.numSteps)
52 self["actions"] = HelpableActionMap(self, "OkCancelActions",
54 "ok": (self.ok, _("Close this Screen...")),
57 def updateValues(self):
58 self["text"].setText(self.text[self.currStep - 1])
59 self["step"].setText(_("Step ") + str(self.currStep) + "/" + str(self.numSteps))
60 self["stepslider"].setValue(self.currStep)
63 if (self.currStep == self.numSteps): # wizard finished
64 config.misc.firstrun.value = 0;
65 config.misc.firstrun.save()
71 if (self.currStep == 2):
72 self["arrowdown"].moveTo(557, 200, 100)
73 self["arrowup"].moveTo(557, 355, 100)
74 self["arrowdown"].startMoving()
75 self["arrowup"].startMoving()
78 def listActiveWizards():
81 if config.misc.firstrun.value:
82 wizards.append(WelcomeWizard)