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

Made calls to Autoconnect outside the daemon asynchronous.

Removed some unnecessary print statements.
Added checks to the daemon and configscript.py to make sure the user opening it is root.
Fixed formatting problems in class definitions in wicd.py
This commit is contained in:
imdano
2008-03-13 14:10:49 +00:00
parent a7c22b9724
commit 04b67e9b2e
7 changed files with 44 additions and 28 deletions

View File

@@ -216,7 +216,8 @@ class ConnectionStatus():
# First try connecting through ethernet
if wired.CheckPluggedIn():
print "Wired connection available, trying to connect..."
daemon.AutoConnect(False)
daemon.AutoConnect(False, reply_handler=reply_handle,
error_handler=err_handle)
self.reconnecting = False
return
@@ -231,10 +232,18 @@ class ConnectionStatus():
elif not wireless.CheckIfWirelessConnecting():
print "Couldn't reconnect to last used network, \
scanning for an autoconnect network..."
daemon.AutoConnect(True)
daemon.AutoConnect(True, reply_handler=reply_handle,
error_handler=err_handle)
else:
daemon.AutoConnect(True)
daemon.AutoConnect(True, reply_handler=reply_handle,
error_handler=err_handle)
self.reconnecting = False
def reply_handle(r):
pass
def err_handle(e):
pass
def main():