1
0
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:
metrics
2007-08-16 01:07:26 +00:00
parent 197f6913af
commit 4e9e960ac9
4 changed files with 1116 additions and 863 deletions

2
gui.py
View File

@@ -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",'')