From 5c5011e9e81e6929c440cea99bdc838f8ba92db5 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Tue, 22 Nov 2005 01:36:54 +0000 Subject: add welcome wizard --- lib/python/Screens/Wizard.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 lib/python/Screens/Wizard.py (limited to 'lib/python/Screens/Wizard.py') diff --git a/lib/python/Screens/Wizard.py b/lib/python/Screens/Wizard.py new file mode 100644 index 00000000..56ab56f4 --- /dev/null +++ b/lib/python/Screens/Wizard.py @@ -0,0 +1,42 @@ +from Screen import Screen + +from Screens.HelpMenu import HelpableScreen +from Components.Label import Label +from Components.ActionMap import HelpableActionMap +from Components.config import config, configElementBoolean + +config.misc.firstrun = configElementBoolean("config.misc.firstrun", 1); + +class WelcomeWizard(Screen, HelpableScreen): + + skin = """ + + + """ + + def __init__(self, session): + self.skin = WelcomeWizard.skin + + Screen.__init__(self, session) + HelpableScreen.__init__(self) + + + self["text"] = Label(_("Welcome!\n\nYou can always press the help key!\n\nPlease Note: Make a service search first!")); + + self["actions"] = HelpableActionMap(self, "OkCancelActions", + { + "ok": (self.ok, _("Close this Screen...")), + }) + + def ok(self): + config.misc.firstrun.value = 0; + config.misc.firstrun.save() + self.session.close() + +def listActiveWizards(): + wizards = [ ] + + if config.misc.firstrun.value: + wizards.append(WelcomeWizard) + + return wizards -- cgit v1.2.3