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 *
9 from Components.MenuList import MenuList
11 config.misc.firstrun = configElementBoolean("config.misc.firstrun", 1);
13 class WelcomeWizard(Screen, HelpableScreen):
16 <screen position="0,0" size="720,560" title="Welcome..." flags="wfNoBorder" >
17 <widget name="text" position="50,100" size="440,200" font="Arial;23" />
18 <widget name="list" position="50,300" size="440,200" />
19 <widget name="step" position="50,50" size="440,25" font="Arial;23" />
20 <widget name="stepslider" position="50,500" zPosition="1" size="440,20" backgroundColor="dark" />
21 <widget name="rc" pixmap="/usr/share/enigma2/rc.png" position="500,50" size="154,475" transparent="1" alphatest="on"/>
22 <widget name="arrowdown" pixmap="/usr/share/enigma2/arrowdown.png" position="0,0" zPosition="1" size="37,70" transparent="1" alphatest="on"/>
23 <widget name="arrowup" pixmap="/usr/share/enigma2/arrowup.png" position="-100,-100" zPosition="1" size="37,70" transparent="1" alphatest="on"/>
26 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."),
27 _("You can use the Up and Down buttons on your remote control to select your choice.\n\nWhat do you want to do?"),
31 ["Use wizard to set up basic features", "Exit wizard"],
34 def __init__(self, session):
35 self.skin = WelcomeWizard.skin
39 Screen.__init__(self, session)
40 HelpableScreen.__init__(self)
43 self["text"] = Label()
45 self["arrowdown"] = MovingPixmap()
46 self["arrowdown"].moveTo(557, 232, 100)
47 self["arrowup"] = MovingPixmap()
49 self.onShown.append(self["arrowdown"].startMoving)
51 self["step"] = Label()
53 self["stepslider"] = Slider(1, self.numSteps)
56 #list.append(("Use wizard to set up basic features", None))
57 #list.append(("Exit wizard", None))
58 self["list"] = MenuList(self.list)
62 self["actions"] = HelpableActionMap(self, "OkCancelActions",
64 "ok": (self.ok, _("Close this Screen...")),
67 def updateValues(self):
68 self["text"].setText(self.text[self.currStep - 1])
69 self["step"].setText(_("Step ") + str(self.currStep) + "/" + str(self.numSteps))
70 self["stepslider"].setValue(self.currStep)
73 if (len(self.listEntries[self.currStep - 1]) > 0):
74 for x in self.listEntries[self.currStep - 1]:
75 self.list.append((x, None))
76 self["list"].l.setList(self.list)
79 if (self.currStep == self.numSteps): # wizard finished
80 config.misc.firstrun.value = 0;
81 config.misc.firstrun.save()
87 if (self.currStep == 2):
88 self["arrowdown"].moveTo(557, 200, 100)
89 self["arrowup"].moveTo(557, 355, 100)
90 self["arrowdown"].startMoving()
91 self["arrowup"].startMoving()
94 def listActiveWizards():
97 if config.misc.firstrun.value:
98 wizards.append(WelcomeWizard)