mirror of
https://github.com/gryf/wicd.git
synced 2025-12-19 20:38:00 +01:00
Split the networking module, moving the common tasks into wnettools.py
By splitting the common tasks performed by the networking module out into a separate set of classes, it is possible to reduce code duplication and improve the structure of the networking module. The wnettools module now performs _almost_ all the actual commands that control the network interfaces, splitting it from the actual connection logic contained in the networking module. Splitting these two tasks also allows for tool changes to be made in a central location, rather than spread throughout the networking.py file.
This commit is contained in:
2
gui.py
2
gui.py
@@ -1232,10 +1232,12 @@ class appGui:
|
||||
wired.SetWiredProperty("gateway",'')
|
||||
|
||||
if networkentry.expander.checkboxStaticDNS.get_active() == True:
|
||||
wireless.SetWirelessProperty(networkid,'use_static_dns',True)
|
||||
wired.SetWiredProperty("dns1",noneToString(networkentry.expander.txtDNS1.get_text()))
|
||||
wired.SetWiredProperty("dns2",noneToString(networkentry.expander.txtDNS2.get_text()))
|
||||
wired.SetWiredProperty("dns3",noneToString(networkentry.expander.txtDNS3.get_text()))
|
||||
else:
|
||||
wireless.SetWirelessProperty(networkid,'use_static_dns',False)
|
||||
wired.SetWiredProperty("dns1",'')
|
||||
wired.SetWiredProperty("dns2",'')
|
||||
wired.SetWiredProperty("dns3",'')
|
||||
|
||||
Reference in New Issue
Block a user