1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-19 20:38:00 +01:00

Completely reorganized edgy.py

Changed the way wired profile chooser gets launched (now uses a dbus signal)
Fixed bug where launching gui.py through the tray sometimes left a zombie (uses a dbus signal)
Added a bunch of docstrings and changed formatting to follow python conventions
Added support for displaying signal strength in dBm instead of a percentage
Added some print statements during the ad-hoc connection process
Started work on a way to autoconnect to a hidden network (not done or working yet)
This commit is contained in:
imdano
2007-08-29 18:49:02 +00:00
parent 697bb050ea
commit 82958861a7
6 changed files with 453 additions and 192 deletions

View File

@@ -248,18 +248,24 @@ class Wireless(Controller):
"""
wiface = wnettools.WirelessInterface(self.wireless_interface,
self.wpa_driver)
print 'Creating ad-hoc network'
print 'Killing dhclient and wpa_supplicant'
wiface.StopDHCP()
wiface.StopWPA()
print 'Putting wireless interface down'
wiface.Down()
print 'Setting mode, channel, and essid'
wiface.SetMode('ad-hoc')
wiface.SetChannel(channel)
wiface.SetEssid(essid)
#Right now it just assumes you're using WEP
if enc_used:
print 'Setting encryption key'
wiface.SetKey(key)
print 'Putting interface up'
wiface.Up()
# Just assume that the netmask is 255.255.255.0, it simplifies ICS
print 'Setting IP address'
wiface.SetAddress(ip, '255.255.255.0')
ip_parts = misc.IsValidIP(ip)