Add NetworkWizard to configure LAN/WLAN on Enigma2 first-startup
[enigma2-plugins.git] / networkwizard / src / plugin.py
1 from Screens.Screen import Screen
2 from Plugins.Plugin import PluginDescriptor
3 from Components.SystemInfo import SystemInfo
4 from Components.ConfigList import ConfigListScreen
5 from Components.config import getConfigListEntry, config
6 from Components.config import config
7
8
9 def NetworkWizardMain(session, **kwargs):
10         session.open(NetworkWizard)
11
12 def startSetup(menuid):
13         if menuid != "system": 
14                 return [ ]
15
16         return [(_("Network Wizard") + "...", NetworkWizardMain, "nw_wizard", 40)]
17
18 def NetworkWizard(*args, **kwargs):
19         from NetworkWizard import NetworkWizard
20         return NetworkWizard(*args, **kwargs)
21
22 def Plugins(**kwargs):
23         list = [
24                 #PluginDescriptor(name=_("Network Wizard"), description=_("Network Wizard"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup) 
25         ]
26         if config.misc.firstrun.value:
27                 list.append(PluginDescriptor(name=_("Network Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(1, NetworkWizard)))
28         return list