1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-23 22:52:33 +01:00

- Simplified main configuration loading code. This *might* break some old conf files, but should be easy to manually fix.

- Reworked GUI: Moved script button next to connect button, reduced size of both buttons, moved advanced settings from an expander to a dialog and put an advanced settings button next to scripts/connect buttons.
- When a wireless network has encryption enabled, "Secured" will no longer show up in the info for the network unless the encryption type can't be determined.
- Added support for detecting kill switch status (thanks to webograph for the inital patch).
- Reduced the number of calls to iwconfig during connection status updates (it is only called once per update now), which should lower cpu usage.
- Moved Autoreconnect methods from the wireless dbus service to the daemon dbus service.
- Added "Validating Authentication" status message during wireless connection process.
- Added support for disabling monitoring of connection status when computer is suspended, which gets rid of some error messages, eliminates occasional suspension failure, and reduces the odds that wicd will auto connect to a wireless network when a wired network is available. (Right now this feature is disabled, as it requires a script in /etc/acpi/suspend.d/, which can't be included with the current SVN layout.)
This commit is contained in:
imdano
2008-01-20 23:09:29 +00:00
parent 03b7ead08f
commit 0528e2436c
8 changed files with 532 additions and 369 deletions

16
misc.py
View File

@@ -106,6 +106,14 @@ def ReadFile(filename):
my_file.close()
return str(data)
def to_bool(var):
""" Convert a string to type bool, but make "False"/"0" become False. """
if var == "False" or var == "0":
var = False
else:
var = bool(var)
return var
def Noneify(variable):
''' convert string types to either None or booleans'''
#set string Nones to real Nones
@@ -237,10 +245,12 @@ def to_unicode(x):
default_encoding = locale.getpreferredencoding()
except:
default_encoding = None
if default_encoding:
return x.decode(default_encoding).encode('utf-8')
else:
return x.decode('utf-8').encode('utf-8')
ret = x.decode(default_encoding, 'replace').encode('utf-8')
else: # Just guess UTF-8
ret = x.decode('utf-8', 'replace').encode('utf-8')
return ret
def error(parent, message):
""" Shows an error dialog """