Dont show Nameserver Dialoque when dhcp is selected
authorMladen Horvat <acid-burn@opendreambox.org>
Thu, 2 Oct 2008 09:27:11 +0000 (09:27 +0000)
committerMladen Horvat <acid-burn@opendreambox.org>
Thu, 2 Oct 2008 09:27:11 +0000 (09:27 +0000)
networkwizard/src/NetworkWizard.py
networkwizard/src/networkwizard.xml

index 41df470..2691111 100755 (executable)
@@ -95,6 +95,7 @@ class NetworkWizard(WizardPluginLanguage, Rc):
                if iface == 'ath0':
                        iNetwork.resetNetworkConfig('wlan-mpci')
                        self.InterfaceUp('ath0')
+                       
        def InterfaceUp(self,iface):
                iNetwork.getInterfaces()
                if iNetwork.getAdapterAttribute(iface, 'up') is True:
@@ -157,7 +158,6 @@ class NetworkWizard(WizardPluginLanguage, Rc):
                iNetwork.restartNetwork()
                self.checkNetwork()
        
-
        def isWlanPluginInstalled(self):                
                try:
                        from Plugins.SystemPlugins.WirelessLan.Wlan import Wlan
@@ -166,3 +166,13 @@ class NetworkWizard(WizardPluginLanguage, Rc):
                else:
                        self.WlanPluginInstalled = True
 
+       def AdapterSetupEnd(self, iface):
+               self.iface = iface
+               if iNetwork.getAdapterAttribute(self.iface, "dhcp") is True:
+                       self.checkNetwork()
+                       self.NextStep = 'checklanstatusend'
+               else:
+                       self.NextStep = 'confdns'
+                       
+
+
index 3bcbfa9..e7b63ea 100755 (executable)
@@ -24,7 +24,7 @@ self.currStep = self.getStepWithID(self.NextStep)
                        </code> 
                </step>
 
-               <step id="nwconfig" nextstep="confdns">
+               <step id="nwconfig">
                        <text value="Please configure your internet connection by filling out the required values.\nWhen you are ready press OK to continue." />
                        <displaytext value="Configure interface" />
                        <config screen="AdapterSetup" module="NetworkSetup" args="self.selectedInterface" type="ConfigList" />
@@ -36,6 +36,10 @@ self.selectKey("DOWN")
 self.selectKey("LEFT")
 self.selectKey("RIGHT")
                        </code>
+                       <code pos="after">
+self.AdapterSetupEnd(self.selectedInterface)    
+self.currStep = self.getStepWithID(self.NextStep)
+                       </code>                 
                </step>
 
                <step id="confdns" nextstep="checklanstatusend">