fix imports
[enigma2.git] / lib / python / Screens / NetworkSetup.py
index 640da615764d19861ad7620ace1812f3ce79dcb6..9514e7fd43a15e3f03e975791cdab6d5f615b44f 100644 (file)
@@ -1,11 +1,11 @@
 from Screen import Screen
 from Components.ActionMap import ActionMap
 from Screen import Screen
 from Components.ActionMap import ActionMap
-from Components.ConfigList import ConfigList, ConfigListScreen
+from Components.ConfigList import ConfigListScreen
 from Components.config import config, getConfigListEntry
 from Components.Network import iNetwork
 from Components.Label import Label
 from Components.MenuList import MenuList
 from Components.config import config, getConfigListEntry
 from Components.Network import iNetwork
 from Components.Label import Label
 from Components.MenuList import MenuList
-from Components.config import config, ConfigYesNo, ConfigIP, NoSave, ConfigSubsection, ConfigNothing
+from Components.config import config, ConfigYesNo, ConfigIP, NoSave, ConfigNothing
 from Components.PluginComponent import plugins
 from Plugins.Plugin import PluginDescriptor
 
 from Components.PluginComponent import plugins
 from Plugins.Plugin import PluginDescriptor
 
@@ -137,11 +137,22 @@ class AdapterSetup(Screen, ConfigListScreen):
                                self.list.append(getConfigListEntry(_('Gateway'), self.gatewayConfigEntry))
                
                self.extended = None
                                self.list.append(getConfigListEntry(_('Gateway'), self.gatewayConfigEntry))
                
                self.extended = None
+               self.extendedSetup = None
                for p in plugins.getPlugins(PluginDescriptor.WHERE_NETWORKSETUP):
                for p in plugins.getPlugins(PluginDescriptor.WHERE_NETWORKSETUP):
-                       callFnc = p.__call__(self.iface)
+                       callFnc = p.__call__["ifaceSupported"](self.iface)
                        if callFnc is not None:
                                self.extended = callFnc
                        if callFnc is not None:
                                self.extended = callFnc
-                               self.extendedSetup = getConfigListEntry(_('Extended Setup...'), NoSave(ConfigNothing()))
+                               print p.__call__
+                               if p.__call__.has_key("configStrings"):
+                                       self.configStrings = p.__call__["configStrings"]
+                               else:
+                                       self.configStrings = None
+                               
+                               if p.__call__.has_key("menuEntryName"):
+                                       menuEntryName = p.__call__["menuEntryName"](self.iface)
+                               else:
+                                       menuEntryName = _('Extended Setup...')
+                               self.extendedSetup = getConfigListEntry(menuEntryName, NoSave(ConfigNothing()))
                                self.list.append(self.extendedSetup)
 
                self["config"].list = self.list
                                self.list.append(self.extendedSetup)
 
                self["config"].list = self.list
@@ -172,8 +183,10 @@ class AdapterSetup(Screen, ConfigListScreen):
                                iNetwork.setAdapterAttribute(self.iface, "gateway", self.gatewayConfigEntry.value)
                        else:
                                iNetwork.removeAdapterAttribute(self.iface, "gateway")
                                iNetwork.setAdapterAttribute(self.iface, "gateway", self.gatewayConfigEntry.value)
                        else:
                                iNetwork.removeAdapterAttribute(self.iface, "gateway")
-                                       
-                                       
+                       
+                       if self.extended is not None and self.configStrings is not None:
+                               iNetwork.setAdapterAttribute(self.iface, "configStrings", self.configStrings(self.iface))
+
                        iNetwork.deactivateNetworkConfig()
                        iNetwork.writeNetworkConfig()    
                        iNetwork.activateNetworkConfig()
                        iNetwork.deactivateNetworkConfig()
                        iNetwork.writeNetworkConfig()    
                        iNetwork.activateNetworkConfig()