--- /dev/null
+from Wizard import Wizard, wizardManager
+
+from Components.config import configElementBoolean, config
+from Components.Pixmap import *
+
+from LanguageSelection import LanguageSelection
+
+
+config.misc.firstruntutorial = configElementBoolean("config.misc.firstruntutorial", 1);
+
+class TutorialWizard(Wizard):
+ skin = """
+ <screen position="0,0" size="720,560" title="Welcome..." flags="wfNoBorder" >
+ <widget name="text" position="50,100" size="440,200" font="Arial;23" />
+ <widget name="list" position="50,300" zPosition="1" size="440,200" />
+ <widget name="config" position="50,300" zPosition="1" size="440,200" transparent="1" />
+ <widget name="rc" pixmap="/usr/share/enigma2/rc.png" position="500,600" zPosition="10" size="154,475" transparent="1" alphatest="on"/>
+ <widget name="arrowdown" pixmap="/usr/share/enigma2/arrowdown.png" position="0,0" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
+ <widget name="arrowup" pixmap="/usr/share/enigma2/arrowup.png" position="-100,-100" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
+ <widget name="arrowup2" pixmap="/usr/share/enigma2/arrowup.png" position="-100,-100" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
+ </screen>"""
+
+ def __init__(self, session):
+ self.skin = TutorialWizard.skin
+ self.xmlfile = "tutorialwizard.xml"
+
+ Wizard.__init__(self, session, showSteps=False, showStepSlider=False)
+ self["rc"] = MovingPixmap()
+ self["arrowdown"] = MovingPixmap()
+ self["arrowup"] = MovingPixmap()
+ self["arrowup2"] = MovingPixmap()
+
+ def markDone(self):
+ config.misc.firstruntutorial.value = 1;
+ config.misc.firstruntutorial.save()
+
+#wizardManager.registerWizard(TutorialWizard, config.misc.firstruntutorial.value)
\ No newline at end of file
from Components.Label import Label
from Components.Slider import Slider
from Components.ActionMap import HelpableActionMap, NumberActionMap
-from Components.config import config, configElementBoolean
from Components.Pixmap import *
from Components.MenuList import MenuList
from Components.ConfigList import ConfigList
from xml.sax import make_parser
from xml.sax.handler import ContentHandler
-config.misc.firstrun = configElementBoolean("config.misc.firstrun", 1);
-
class Wizard(Screen, HelpableScreen):
class parseWizard(ContentHandler):
self.wizard[self.lastStep]["code"] = self.wizard[self.lastStep]["code"] + ch
elif self.currContent == "condition":
self.wizard[self.lastStep]["condition"] = self.wizard[self.lastStep]["condition"] + ch
- def __init__(self, session):
+ def __init__(self, session, showSteps = True, showStepSlider = True):
Screen.__init__(self, session)
HelpableScreen.__init__(self)
wizardHandler = self.parseWizard(self.wizard)
parser.setContentHandler(wizardHandler)
parser.parse('/usr/share/enigma2/' + self.xmlfile)
-
+
+ self.showSteps = showSteps
+ self.showStepSlider = showStepSlider
+
self.numSteps = len(self.wizard)
self.currStep = 1
self["config"] = ConfigList([])
- self["step"] = Label()
-
- self["stepslider"] = Slider(1, self.numSteps)
+ if self.showSteps:
+ self["step"] = Label()
+
+ if self.showStepSlider:
+ self["stepslider"] = Slider(1, self.numSteps)
self.list = []
self["list"] = MenuList(self.list)
self.currStep = 1
self.updateValues()
+ def markDone(self):
+ pass
+
def ok(self):
print "OK"
if (self.wizard[self.currStep]["config"]["screen"] != None):
self.currStep = int(nextStep) - 1
if (self.currStep == self.numSteps): # wizard finished
- config.misc.firstrun.value = 0;
- config.misc.firstrun.save()
+ self.markDone()
self.session.close()
else:
self.currStep += 1
self.condition = True
exec (self.wizard[self.currStep]["condition"])
if self.condition:
- self["step"].setText(_("Step ") + str(self.currStep) + "/" + str(self.numSteps))
- self["stepslider"].setValue(self.currStep)
+ if self.showSteps:
+ self["step"].setText(_("Step ") + str(self.currStep) + "/" + str(self.numSteps))
+ if self.showStepSlider:
+ self["stepslider"].setValue(self.currStep)
print _(self.wizard[self.currStep]["text"])
self["text"].setText(_(self.wizard[self.currStep]["text"]))
def __init__(self):
self.wizards = []
- def registerWizard(self, wizard):
- self.wizards.append(wizard)
+ def registerWizard(self, wizard, precondition):
+ self.wizards.append((wizard, precondition))
def getWizards(self):
- if config.misc.firstrun.value:
- return self.wizards
- else:
- return []
+ list = []
+ for x in self.wizards:
+ if x[1] == 1: # precondition
+ list.append(x[0])
+ return list
wizardManager = WizardManager()
msgstr ""
"Project-Id-Version: tuxbox-enigma 0.0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-12-17 01:09+0100\n"
+"POT-Creation-Date: 2005-12-17 17:40+0100\n"
"PO-Revision-Date: 2005-12-14 03:29+0100\n"
"Language-Team: none\n"
"X-Poedit-Country: GERMANY\n"
"X-Poedit-SourceCharset: iso-8859-15\n"
-#: ../lib/python/Screens/EventView.py:89
+#: ../lib/python/Screens/EventView.py:72
#, python-format
msgid "%d min"
msgstr ""
-#: ../lib/python/Screens/TimerEntry.py:85
-#: ../lib/python/Screens/TimerEntry.py:88
+#: ../lib/python/Screens/TimerEntry.py:86
+#: ../lib/python/Screens/TimerEntry.py:89
msgid "%d.%B %Y"
msgstr ""
msgstr "Alle"
#: ../lib/python/Screens/ScanSetup.py:170
+#: ../lib/python/Screens/ScanSetup.py:173
#: ../lib/python/Screens/ScanSetup.py:177
#: ../lib/python/Screens/ScanSetup.py:178
#: ../lib/python/Screens/ScanSetup.py:179
msgid "Capacity: "
msgstr "Kapazität: "
-#: ../lib/python/Screens/TimerEntry.py:168 ../data/
+#: ../lib/python/Screens/TimerEntry.py:170 ../data/
msgid "Channel"
msgstr "Kanal"
msgid "Delete"
msgstr "Löschen"
-#: ../lib/python/Screens/TimerEntry.py:129
+#: ../lib/python/Screens/TimerEntry.py:131
msgid "Description"
msgstr "Beschreibung"
msgid "Disable"
msgstr "Aus"
-#: ../lib/python/Screens/InfoBarGenerics.py:625
+#: ../lib/python/Screens/InfoBarGenerics.py:633
msgid ""
"Do you want to stop the current\n"
"(instant) recording?"
msgid "Enable"
msgstr "Ein"
-#: ../lib/python/Screens/TimerEntry.py:163
+#: ../lib/python/Screens/TimerEntry.py:165
msgid "End"
msgstr "Ende"
-#: ../lib/python/Screens/TimerEntry.py:166
+#: ../lib/python/Screens/TimerEntry.py:168
msgid "EndTime"
msgstr "Endzeit"
#: ../lib/python/Screens/ScanSetup.py:87
#: ../lib/python/Screens/ScanSetup.py:114
#: ../lib/python/Screens/ScanSetup.py:124
-#: ../lib/python/Screens/TimerEntry.py:136
+#: ../lib/python/Screens/TimerEntry.py:138
msgid "Frequency"
msgstr "Frequenz"
-#: ../lib/python/Screens/TimerEntry.py:91
-#: ../lib/python/Screens/TimerEntry.py:150
+#: ../lib/python/Screens/TimerEntry.py:92
+#: ../lib/python/Screens/TimerEntry.py:152
msgid "Friday"
msgstr "Freitag"
msgid "Modulation"
msgstr ""
-#: ../lib/python/Screens/TimerEntry.py:83
+#: ../lib/python/Screens/TimerEntry.py:84
msgid "Mon-Fri"
msgstr "Montag bis Freitag"
-#: ../lib/python/Screens/TimerEntry.py:91
-#: ../lib/python/Screens/TimerEntry.py:146
+#: ../lib/python/Screens/TimerEntry.py:92
+#: ../lib/python/Screens/TimerEntry.py:148
msgid "Monday"
msgstr "Montag"
msgid "N/A"
msgstr "Nicht verfügbar"
+#: ../lib/python/Screens/TimerEntry.py:130
+msgid "Name"
+msgstr ""
+
#: ../lib/python/Screens/NetworkSetup.py:46 ../data/
msgid "Nameserver"
msgstr ""
msgid "Netmask"
msgstr "Netzmaske"
+#: ../lib/python/Screens/ScanSetup.py:173
#: ../lib/python/Screens/ScanSetup.py:179
#: ../lib/python/Screens/ScanSetup.py:186
#: ../lib/python/Screens/ScanSetup.py:187
msgid "Provider"
msgstr "Provider"
-#: ../lib/python/Screens/InfoBarGenerics.py:682
+#: ../lib/python/Screens/InfoBarGenerics.py:690
msgid "Record"
msgstr "Aufnahme"
msgid "Satellites"
msgstr "Satelliten"
-#: ../lib/python/Screens/TimerEntry.py:91
-#: ../lib/python/Screens/TimerEntry.py:151
+#: ../lib/python/Screens/TimerEntry.py:92
+#: ../lib/python/Screens/TimerEntry.py:153
msgid "Saturday"
msgstr "Samstag"
-#: ../lib/python/Screens/TimerEntry.py:206
+#: ../lib/python/Screens/TimerEntry.py:208
msgid "Select channel to record from"
msgstr "Kanal auswahlen, von dem aufgenommen werden soll"
msgid "South"
msgstr "Süd"
-#: ../lib/python/Screens/TimerEntry.py:158
+#: ../lib/python/Screens/TimerEntry.py:160
msgid "Start"
msgstr ""
-#: ../lib/python/Screens/InfoBarGenerics.py:627
+#: ../lib/python/Screens/InfoBarGenerics.py:635
msgid "Start recording?"
msgstr "Aufnahme beginnen?"
-#: ../lib/python/Screens/TimerEntry.py:161
+#: ../lib/python/Screens/TimerEntry.py:163
msgid "StartTime"
msgstr "Startzeit"
-#: ../lib/python/Screens/Wizard.py:178
+#: ../lib/python/Screens/Wizard.py:177
msgid "Step "
msgstr "Schritt "
msgid "Stop playing this movie?"
msgstr "Das Abspielen dieses Films beenden?"
-#: ../lib/python/Screens/InfoBarGenerics.py:688 ../data/
+#: ../lib/python/Screens/InfoBarGenerics.py:696 ../data/
msgid "Subservices"
msgstr "Unterkanäle"
-#: ../lib/python/Screens/TimerEntry.py:91
-#: ../lib/python/Screens/TimerEntry.py:152
+#: ../lib/python/Screens/TimerEntry.py:92
+#: ../lib/python/Screens/TimerEntry.py:154
msgid "Sunday"
msgstr "Sonntag"
msgid "Terrestrial provider"
msgstr "Region"
-#: ../lib/python/Screens/TimerEntry.py:91
-#: ../lib/python/Screens/TimerEntry.py:149
+#: ../lib/python/Screens/TimerEntry.py:92
+#: ../lib/python/Screens/TimerEntry.py:151
msgid "Thursday"
msgstr "Donnerstag"
-#: ../lib/python/Screens/TimerEntry.py:130
+#: ../lib/python/Screens/TimerEntry.py:132
msgid "Timer Type"
msgstr "Timer-Art"
msgid "Transmission mode"
msgstr "Übertragungstyp"
-#: ../lib/python/Screens/TimerEntry.py:91
-#: ../lib/python/Screens/TimerEntry.py:147
+#: ../lib/python/Screens/TimerEntry.py:92
+#: ../lib/python/Screens/TimerEntry.py:149
msgid "Tuesday"
msgstr "Dienstag"
msgid "Use DHCP"
msgstr "Adresse automatisch beziehen (DHCP)"
-#: ../lib/python/Screens/TimerEntry.py:91
-#: ../lib/python/Screens/TimerEntry.py:148
+#: ../lib/python/Screens/TimerEntry.py:92
+#: ../lib/python/Screens/TimerEntry.py:150
msgid "Wednesday"
msgstr "Mittwoch"
-#: ../lib/python/Screens/TimerEntry.py:143
+#: ../lib/python/Screens/TimerEntry.py:145
msgid "Weekday"
msgstr "Wochentag"
msgid "circular right"
msgstr ""
-#: ../lib/python/Screens/TimerEntry.py:83
+#: ../lib/python/Screens/TimerEntry.py:84
msgid "daily"
msgstr "täglich"
msgstr "nächster Kanal"
#: ../lib/python/Screens/ScanSetup.py:196
-#: ../lib/python/Screens/TimerEntry.py:95
+#: ../lib/python/Screens/TimerEntry.py:96
#: ../lib/python/Components/Network.py:140
msgid "no"
msgstr "nein"
msgid "show EPG..."
msgstr "zeige EPG..."
-#: ../lib/python/Screens/Wizard.py:181 ../lib/python/Screens/Wizard.py:182
+#: ../lib/python/Screens/Wizard.py:180 ../lib/python/Screens/Wizard.py:181
msgid "text"
msgstr ""
-#: ../lib/python/Screens/EventView.py:73
+#: ../lib/python/Screens/EventView.py:56
msgid "unknown service"
msgstr "unbekannter Service"
-#: ../lib/python/Screens/TimerEntry.py:83
+#: ../lib/python/Screens/TimerEntry.py:84
msgid "user defined"
msgstr "benutzerdefiniert"
msgid "vertical"
msgstr "vertikal"
-#: ../lib/python/Screens/TimerEntry.py:83
+#: ../lib/python/Screens/TimerEntry.py:84
msgid "weekly"
msgstr "wöchentlich"
#: ../lib/python/Screens/ScanSetup.py:196
-#: ../lib/python/Screens/TimerEntry.py:95
+#: ../lib/python/Screens/TimerEntry.py:96
#: ../lib/python/Components/Network.py:15
#: ../lib/python/Components/Network.py:140
msgid "yes"
#: ../data/
msgid "Satelliteconfig"
msgstr "Satelliteneinstellungen"
-