mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 12:58:07 +01:00
Cleaned up formatting in gui.py. Made glade template for preferences dialog and rewrote gui.py to use it instead of creating it explictly in the code. Fixed a bunch indentation/whitespace problems. Cleaned up a ton of formatting in daemon.py Fixed a wired autoconnect bug. Rewrote part of the connection monitoring code, further minimizing the number of external program calls, as well as number of dbus calls. Added StatusInformation methods to daemon.py, to allow external apps to poll for the current connection status without making several dbus calls. Fixed bad function call to GetDBMSignalStrength in daemon.py.
32 lines
824 B
Python
32 lines
824 B
Python
""" Path configuration and functions for the wicd daemon and gui clients.
|
|
|
|
chdir() -- Change directory to the location of the current file.
|
|
|
|
"""
|
|
|
|
import os
|
|
|
|
# The path containing the wpath.py file.
|
|
current = os.path.dirname(os.path.realpath(__file__)) + '/'
|
|
|
|
# These paths can easily be modified to handle system wide installs, or
|
|
# they can be left as is if all files remain with the source directory
|
|
# layout.
|
|
lib = current
|
|
images = lib + 'images/'
|
|
encryption = lib + 'encryption/templates/'
|
|
bin = current
|
|
etc = current + 'data/'
|
|
networks = lib + 'encryption/configurations/'
|
|
log = current + 'data/'
|
|
|
|
def chdir(file):
|
|
"""Change directory to the location of the specified file.
|
|
|
|
Keyword arguments:
|
|
file -- the file to switch to (usually __file__)
|
|
|
|
"""
|
|
os.chdir(os.path.dirname(os.path.realpath(file)))
|
|
|