add welcome wizard
authorFelix Domke <tmbinc@elitedvb.net>
Tue, 22 Nov 2005 01:36:54 +0000 (01:36 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Tue, 22 Nov 2005 01:36:54 +0000 (01:36 +0000)
lib/python/Screens/Makefile.am
lib/python/Screens/Wizard.py [new file with mode: 0644]
lib/python/Screens/__init__.py

index ca6e5d15c7e570a37cb24b094b6a84db26cffc70..cb54ec5b2778f53d532fc929b6c013cc0eaaf880 100644 (file)
@@ -6,4 +6,4 @@ install_PYTHON = \
        MovieSelection.py Setup.py About.py HarddiskSetup.py FixedMenu.py \
        Satconfig.py ScanSetup.py NetworkSetup.py Ci.py TimerEntry.py Volume.py \
        EpgSelection.py EventView.py Mute.py Standby.py ServiceInfo.py \
-       AudioSelection.py InfoBarGenerics.py HelpMenu.py __init__.py
+       AudioSelection.py InfoBarGenerics.py HelpMenu.py Wizard.py __init__.py
diff --git a/lib/python/Screens/Wizard.py b/lib/python/Screens/Wizard.py
new file mode 100644 (file)
index 0000000..56ab56f
--- /dev/null
@@ -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 = """
+               <screen position="140,125" size="460,350" title="Welcome...">
+                       <widget name="text" position="20,20" size="440,300" font="Arial;30" />
+               </screen>"""
+
+       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
index 157dee5d712fcae4e27659bdf4968ba9ed0b5e10..0c6f171490a0f83de6bcdb064ff55217c225057a 100644 (file)
@@ -4,4 +4,4 @@ __all__ = ["ChannelSelection", "ClockDisplay", "ConfigMenu",
        "TimerEdit", "Setup", "HarddiskSetup", "FixedMenu",
        "Satconfig", "Scanconfig", "Ci.py", "Volume.py", "Mute.py",
        "EpgSelection", "EventView", "Standby", "ServiceInfo",
-       "AudioSelection", "InfoBarGenerics", "HelpMenu"]
+       "AudioSelection", "InfoBarGenerics", "HelpMenu", "Wizard"]