wicd-1.7.2.4/0000775000175000017500000000000011747563546013035 5ustar daviddavid00000000000000wicd-1.7.2.4/tests/0000775000175000017500000000000011747563546014177 5ustar daviddavid00000000000000wicd-1.7.2.4/tests/__init__.py0000664000175000017500000000041311635330115016262 0ustar daviddavid00000000000000def run_tests(): import unittest test_suite = unittest.TestSuite() import testwnettools test_suite.addTest(testwnettools.suite()) import testmisc test_suite.addTest(testmisc.suite()) unittest.TextTestRunner(verbosity=2).run(test_suite) wicd-1.7.2.4/tests/testmisc.py0000664000175000017500000001035311635330115016362 0ustar daviddavid00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- import unittest from wicd import misc class TestMisc(unittest.TestCase): def test_misc_run(self): output = misc.Run(['echo', 'hi']).strip() self.assertEquals('hi', output) def test_valid_ip_1(self): self.assertTrue(misc.IsValidIP('0.0.0.0')) def test_valid_ip_2(self): self.assertTrue(misc.IsValidIP('255.255.255.255')) def test_valid_ip_3(self): self.assertTrue(misc.IsValidIP('10.0.1.1')) def test_invalid_ip_1(self): self.assertFalse(misc.IsValidIP('-10.0.-1.-1')) def test_invalid_ip_2(self): self.assertFalse(misc.IsValidIP('256.0.0.1')) def test_invalid_ip_3(self): self.assertFalse(misc.IsValidIP('1000.0.0.1')) def test_run_valid_regex(self): import re regex = re.compile('.*(ABC.EFG).*') found = misc.RunRegex(regex, '01234ABCDEFG56789') self.assertEquals(found, 'ABCDEFG') def test_run_invalid_regex(self): import re regex = re.compile('.*(ABC.EFG).*') found = misc.RunRegex(regex, '01234ABCEDFG56789') self.assertEquals(found, None) def test_to_boolean_false(self): self.assertFalse(misc.to_bool('False')) def test_to_boolean_0(self): self.assertFalse(misc.to_bool('0')) def test_to_boolean_true(self): self.assertTrue(misc.to_bool('True')) def test_to_boolean_true(self): self.assertTrue(misc.to_bool('1')) def test_noneify_1(self): self.assertEquals(misc.Noneify('None'), None) def test_noneify_2(self): self.assertEquals(misc.Noneify(''), None) def test_noneify_3(self): self.assertEquals(misc.Noneify(None), None) def test_noneify_4(self): self.assertFalse(misc.Noneify('False')) def test_noneify_5(self): self.assertFalse(misc.Noneify('0')) def test_noneify_6(self): self.assertFalse(misc.Noneify(False)) def test_noneify_7(self): self.assertTrue(misc.Noneify('True')) def test_noneify_8(self): self.assertTrue(misc.Noneify('1')) def test_noneify_9(self): self.assertTrue(misc.Noneify(True)) def test_noneify_10(self): self.assertEquals(misc.Noneify('randomtext'), 'randomtext') def test_noneify_11(self): self.assertEquals(misc.Noneify(5), 5) def test_none_to_string_1(self): self.assertEquals(misc.noneToString(None), 'None') def test_none_to_string_2(self): self.assertEquals(misc.noneToString(''), 'None') def test_none_to_string_3(self): self.assertEquals(misc.noneToString(None), 'None') #################################################################### # misc.to_unicode actually converts to utf-8, which is type str # #################################################################### def test_to_unicode_1(self): self.assertEquals(misc.to_unicode('邪悪'), '邪悪') def test_to_unicode_2(self): self.assertEquals(misc.to_unicode(u'邪悪'), '邪悪') def test_to_unicode_3(self): self.assertEquals(misc.to_unicode(u'abcdef'), 'abcdef') def test_to_unicode_4(self): self.assertEquals(type(misc.to_unicode('abcdef'.encode('latin-1'))), str) def test_to_unicode_5(self): self.assertEquals(misc.to_unicode("berkåk"), "berkåk") def test_to_unicode_6(self): self.assertEquals(misc.to_unicode('berk\xe5k'), "berkåk") def test_none_to_blank_string_1(self): self.assertEquals(misc.noneToBlankString(None), '') def test_none_to_blank_string_2(self): self.assertEquals(misc.noneToBlankString('None'), '') def test_string_to_none_1(self): self.assertEquals(misc.stringToNone(''), None) def test_string_to_none_2(self): self.assertEquals(misc.stringToNone('None'), None) def test_string_to_none_3(self): self.assertEquals(misc.stringToNone(None), None) def test_string_to_none_4(self): self.assertEquals(misc.stringToNone('abcdef'), 'abcdef') def suite(): suite = unittest.TestSuite() tests = [] [ tests.append(test) for test in dir(TestMisc) if test.startswith('test') ] for test in tests: suite.addTest(TestMisc(test)) return suite if __name__ == '__main__': unittest.main() wicd-1.7.2.4/tests/testwnettools.py0000664000175000017500000000430211635330115017462 0ustar daviddavid00000000000000import unittest from wicd import wnettools class TestWnettools(unittest.TestCase): def setUp(self): self.interface = wnettools.BaseInterface('eth0') def test_find_wireless_interface(self): interfaces = wnettools.GetWirelessInterfaces() # wlan0 may change depending on your system self.assertTrue('wlan0' in interfaces) def test_find_wired_interface(self): interfaces = wnettools.GetWiredInterfaces() # eth0 may change depending on your system self.assertTrue('eth0' in interfaces) def test_wext_is_valid_wpasupplicant_driver(self): self.assertTrue(wnettools.IsValidWpaSuppDriver('wext')) def test_needs_external_calls_not_implemented(self): self.assertRaises(NotImplementedError, wnettools.NeedsExternalCalls) def test_get_ip_not_implemented(self): self.assertRaises(NotImplementedError, self.interface.GetIP) def test_is_up_not_implemented(self): self.assertRaises(NotImplementedError, self.interface.IsUp) def test_enable_debug_mode(self): self.interface.SetDebugMode(True) self.assertTrue(self.interface.verbose) def test_disable_debug_mode(self): self.interface.SetDebugMode(False) self.assertFalse(self.interface.verbose) def test_interface_name_sanitation(self): interface = wnettools.BaseInterface('blahblah; uptime > /tmp/blah | cat') self.assertEquals(interface.iface, 'blahblahuptimetmpblahcat') def test_freq_translation_low(self): freq = '2.412 GHz' interface = wnettools.BaseWirelessInterface('wlan0') self.assertEquals(interface._FreqToChannel(freq), 1) def test_freq_translation_high(self): freq = '2.484 GHz' interface = wnettools.BaseWirelessInterface('wlan0') self.assertEquals(interface._FreqToChannel(freq), 14) def test_generate_psk(self): interface = wnettools.BaseWirelessInterface('wlan0') psk = interface.GeneratePSK({'essid' : 'Network 1', 'key' : 'arandompassphrase'}) self.assertEquals(psk, 'd70463014514f4b4ebb8e3aebbdec13f4437ac3a9af084b3433f3710e658a7be') def suite(): suite = unittest.TestSuite() tests = [] [ tests.append(test) for test in dir(TestWnettools) if test.startswith('test') ] for test in tests: suite.addTest(TestWnettools(test)) return suite if __name__ == '__main__': unittest.main() wicd-1.7.2.4/setup.py0000775000175000017500000007057611747563467014573 0ustar daviddavid00000000000000#!/usr/bin/env python # # Copyright (C) 2007 - 2009 Adam Blackburn # Copyright (C) 2007 - 2009 Dan O'Reilly # Copyright (C) 2009 Andrew Psaltis # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # from distutils.core import setup, Command from distutils.extension import Extension import os import sys import shutil import subprocess from glob import glob # Be sure to keep this updated! # VERSIONNUMBER VERSION_NUM = '1.7.2.4' # REVISION_NUM is automatically updated REVISION_NUM = 'unknown' CURSES_REVNO = 'uimod' # change to the directory setup.py is contained in os.chdir(os.path.abspath(os.path.split(__file__)[0])) try: if os.path.exists('.bzr') and os.system('bzr > /dev/null 2>&1') == 0: try: os.system('bzr version-info --python > vcsinfo.py') except: pass import vcsinfo REVISION_NUM = vcsinfo.version_info['revno'] except Exception, e: print 'failed to find revision number:' print e class configure(Command): description = "configure the paths that Wicd will be installed to" user_options = [ # The first bunch is DIRECTORIES - they need to end with a slash ("/"), # which will automatically be tacked on in the finalize_options method ('lib=', None, 'set the lib directory'), ('share=', None, 'set the share directory'), ('etc=', None, 'set the etc directory'), ('scripts=', None, 'set the global scripts directory'), ('pixmaps=', None, 'set the pixmaps directory'), ('images=', None, 'set the image directory'), ('encryption=', None, 'set the encryption template directory'), ('bin=', None, 'set the bin directory'), ('sbin=', None, 'set the sbin directory'), ('backends=', None, 'set the backend storage directory'), ('daemon=', None, 'set the daemon directory'), ('curses=', None, 'set the curses UI directory'), ('gtk=', None, 'set the GTK UI directory'), ('cli=', None, 'set the CLI directory'), ('networks=', None, 'set the encryption configuration directory'), ('log=', None, 'set the log directory'), ('resume=', None, 'set the directory the resume from suspend script is stored in'), ('suspend=', None, 'set the directory the suspend script is stored in'), ('pmutils=', None, 'set the directory the pm-utils hooks are stored in'), ('dbus=', None, 'set the directory the dbus config file is stored in'), ('dbus-service=', None, 'set the directory where the dbus services config files are stored in'), ('systemd=', None, 'set the directory where the systemd system services config files are stored in'), ('logrotate=', None, 'set the directory where the logrotate configuration files are stored in'), ('desktop=', None, 'set the directory the .desktop file is stored in'), ('icons=', None, "set the base directory for the .desktop file's icons"), ('translations=', None, 'set the directory translations are stored in'), ('autostart=', None, 'set the directory that will be autostarted on desktop login'), ('varlib=',None , 'set the path for wicd\'s variable state data'), ('init=', None, 'set the directory for the init file'), ('docdir=', None, 'set the directory for the documentation'), ('mandir=', None, 'set the directory for the man pages'), ('kdedir=', None, 'set the kde autostart directory'), # Anything after this is a FILE; in other words, a slash ("/") will # not automatically be added to the end of the path. # Do NOT remove the python= entry, as it signals the beginning of # the file section. ('python=', None, 'set the path to the Python executable'), ('pidfile=', None, 'set the pid file'), ('initfile=', None, 'set the init file to use'), ('initfilename=', None, "set the name of the init file (don't use)"), ('wicdgroup=', None, "set the name of the group used for wicd"), ('distro=', None, 'set the distribution for which wicd will be installed'), ('loggroup=', None, 'the group the log file belongs to'), ('logperms=', None, 'the log file permissions'), # Configure switches ('no-install-init', None, "do not install the init file"), ('no-install-man', None, 'do not install the man files'), ('no-install-i18n-man', None, 'do not install the translated man files'), ('no-install-kde', None, 'do not install the kde autostart file'), ('no-install-acpi', None, 'do not install the suspend.d and resume.d acpi scripts'), ('no-install-pmutils', None, 'do not install the pm-utils hooks'), ('no-install-docs', None, 'do not install the auxiliary documentation'), ('no-install-ncurses', None, 'do not install the ncurses client'), ('no-install-cli', None, 'do not install the command line executable'), ('no-install-gtk', None, 'do not install the gtk client'), ('no-use-notifications', None, 'do not ever allow the use of libnotify notifications') ] def initialize_options(self): self.lib = '/usr/lib/wicd/' self.share = '/usr/share/wicd/' self.etc = '/etc/wicd/' self.scripts = self.etc + "scripts/" self.icons = '/usr/share/icons/hicolor/' self.pixmaps = '/usr/share/pixmaps/' self.images = self.pixmaps + 'wicd/' self.encryption = self.etc + 'encryption/templates/' self.bin = '/usr/bin/' self.sbin = '/usr/sbin/' self.daemon = self.share + 'daemon' self.backends = self.share + 'backends' self.curses = self.share + 'curses' self.gtk = self.share + 'gtk' self.cli = self.share + 'cli' self.varlib = '/var/lib/wicd/' self.networks = self.varlib + 'configurations/' self.log = '/var/log/wicd/' self.resume = '/etc/acpi/resume.d/' self.suspend = '/etc/acpi/suspend.d/' self.pmutils = '/usr/lib/pm-utils/sleep.d/' self.dbus = '/etc/dbus-1/system.d/' self.dbus_service = '/usr/share/dbus-1/system-services/' self.systemd = '/lib/systemd/system/' self.logrotate = '/etc/logrotate.d/' self.desktop = '/usr/share/applications/' self.translations = '/usr/share/locale/' self.autostart = '/etc/xdg/autostart/' self.docdir = '/usr/share/doc/wicd/' self.mandir = '/usr/share/man/' self.kdedir = '/usr/share/autostart/' self.distro = 'auto' self.no_install_init = False self.no_install_man = False self.no_install_i18n_man = False self.no_install_kde = False self.no_install_acpi = False self.no_install_pmutils = False self.no_install_docs = False self.no_install_gtk = False self.no_install_ncurses = False self.no_install_cli = False self.no_use_notifications = False # Determine the default init file location on several different distros self.distro_detect_failed = False self.initfile = 'init/default/wicd' # ddistro is the detected distro if os.path.exists('/etc/redhat-release'): self.ddistro = 'redhat' elif os.path.exists('/etc/SuSE-release'): self.ddistro = 'suse' elif os.path.exists('/etc/fedora-release'): self.ddistro = 'redhat' elif os.path.exists('/etc/gentoo-release'): self.ddistro = 'gentoo' elif os.path.exists('/etc/debian_version'): self.ddistro = 'debian' elif os.path.exists('/etc/arch-release'): self.ddistro = 'arch' elif os.path.exists('/etc/slackware-version') or \ os.path.exists('/etc/slamd64-version') or \ os.path.exists('/etc/bluewhite64-version'): self.ddistro = 'slackware' elif os.path.exists('/etc/pld-release'): self.ddistro = 'pld' elif os.path.exists('/usr/bin/crux'): self.ddistro = 'crux' elif os.path.exists('/etc/lunar.release'): self.distro = 'lunar' else: self.ddistro = 'FAIL' #self.no_install_init = True #self.distro_detect_failed = True print 'WARNING: Unable to detect the distribution in use. ' + \ 'If you have specified --distro or --init and --initfile, configure will continue. ' + \ 'Please report this warning, along with the name of your ' + \ 'distribution, to the wicd developers.' # Try to get the pm-utils sleep hooks directory from pkg-config and # the kde prefix from kde-config # Don't run these in a shell because it's not needed and because shell # swallows the OSError we would get if {pkg,kde}-config do not exist # If we don't get anything from *-config, or it didn't run properly, # or the path is not a proper absolute path, raise an error try: pmtemp = subprocess.Popen(["pkg-config", "--variable=pm_sleephooks", "pm-utils"], stdout=subprocess.PIPE) returncode = pmtemp.wait() # let it finish, and get the exit code pmutils_candidate = pmtemp.stdout.readline().strip() # read stdout if len(pmutils_candidate) == 0 or returncode != 0 or \ not os.path.isabs(pmutils_candidate): raise ValueError else: self.pmutils = pmutils_candidate except (OSError, ValueError): pass # use our default try: kdetemp = subprocess.Popen(["kde-config","--prefix"], stdout=subprocess.PIPE) returncode = kdetemp.wait() # let it finish, and get the exit code kdedir_candidate = kdetemp.stdout.readline().strip() # read stdout if len(kdedir_candidate) == 0 or returncode != 0 or \ not os.path.isabs(kdedir_candidate): raise ValueError else: self.kdedir = kdedir_candidate + '/share/autostart' except (OSError, ValueError): # If kde-config isn't present, we'll check for kde-4.x try: kde4temp = subprocess.Popen(["kde4-config","--prefix"], stdout=subprocess.PIPE) returncode = kde4temp.wait() # let it finish, and get the exit code kde4dir_candidate = kde4temp.stdout.readline().strip() # read stdout if len(kde4dir_candidate) == 0 or returncode != 0 or \ not os.path.isabs(kde4dir_candidate): raise ValueError else: self.kdedir = kde4dir_candidate + '/share/autostart' except (OSError, ValueError): # If neither kde-config nor kde4-config are not present or # return an error, then we can assume that kde isn't installed # on the user's system self.no_install_kde = True # If the assumption above turns out to be wrong, do this: #pass # use our default self.python = '/usr/bin/python' self.pidfile = '/var/run/wicd/wicd.pid' self.initfilename = os.path.basename(self.initfile) self.wicdgroup = 'users' self.loggroup = '' self.logperms = '0600' def distro_check(self): print "Distro is: " + self.distro if self.distro in ['sles', 'suse']: self.init = '/etc/init.d/' self.initfile = 'init/suse/wicd' elif self.distro in ['redhat', 'centos', 'fedora']: self.init = '/etc/rc.d/init.d/' self.initfile = 'init/redhat/wicd' self.pidfile = '/var/run/wicd.pid' elif self.distro in ['slackware', 'slamd64', 'bluewhite64']: self.init = '/etc/rc.d/' self.initfile = 'init/slackware/rc.wicd' self.docdir = '/usr/doc/wicd-%s' % VERSION_NUM self.mandir = '/usr/man/' self.no_install_acpi = True self.wicdgroup = "netdev" elif self.distro in ['debian']: self.wicdgroup = "netdev" self.loggroup = "adm" self.logperms = "0640" self.init = '/etc/init.d/' self.initfile = 'init/debian/wicd' elif self.distro in ['arch']: self.init = '/etc/rc.d/' self.initfile = 'init/arch/wicd' elif self.distro in ['gentoo']: self.init = '/etc/init.d/' self.initfile = 'init/gentoo/wicd' elif self.distro in ['pld']: self.init = '/etc/rc.d/init.d/' self.initfile = 'init/pld/wicd' elif self.distro in ['crux']: self.init = '/etc/rc.d/' elif self.distro in ['lunar']: self.init='/etc/init.d/' self.initfile = 'init/lunar/wicd' else : if self.distro == 'auto': print "NOTICE: Automatic distro detection found: " + self.ddistro + ", retrying with that..." self.distro = self.ddistro self.distro_check() else: print "WARNING: Distro detection failed!" self.init='init/default/wicd' self.no_install_init = True self.distro_detect_failed = True def finalize_options(self): self.distro_check() if self.distro_detect_failed and not self.no_install_init and \ 'FAIL' in [self.init, self.initfile]: print 'ERROR: Failed to detect distro. Configure cannot continue. ' + \ 'Please specify --init and --initfile to continue with configuration.' # loop through the argument definitions in user_options for argument in self.user_options: # argument name is the first item in the user_options list # sans the = sign at the end argument_name = argument[0][:-1] # select the first one, which is the name of the option value = getattr(self, argument_name.replace('-', '_')) # if the option is not python (which is not a directory) if not argument[0][:-1] == "python": # see if it ends with a / if not value.endswith("/"): # if it doesn't, slap one on setattr(self, argument_name, value + "/") else: # as stated above, the python entry defines the beginning # of the files section return def run(self): values = list() for argument in self.user_options: if argument[0].endswith('='): cur_arg = argument[0][:-1] cur_arg_value = getattr(self, cur_arg.replace('-', '_')) print "%s is %s" % (cur_arg, cur_arg_value) values.append((cur_arg, getattr(self, cur_arg.replace('-','_')))) else: cur_arg = argument[0] cur_arg_value = getattr(self, cur_arg.replace('-', '_')) print "Found switch %s %s" % (argument, cur_arg_value) values.append((cur_arg, bool(cur_arg_value))) print 'Replacing values in template files...' for item in os.listdir('in'): if item.endswith('.in'): print 'Replacing values in',item, original_name = os.path.join('in',item) item_in = open(original_name, 'r') final_name = item[:-3].replace('=','/') parent_dir = os.path.dirname(final_name) if parent_dir and not os.path.exists(parent_dir): print '(mkdir %s)'%parent_dir, os.makedirs(parent_dir) print final_name item_out = open(final_name, 'w') for line in item_in.readlines(): for item, value in values: line = line.replace('%' + str(item.upper().replace('-','_')) + \ '%', str(value)) # other things to replace that aren't arguments line = line.replace('%VERSION%', str(VERSION_NUM)) line = line.replace('%REVNO%', str(REVISION_NUM)) line = line.replace('%CURSES_REVNO%', str(CURSES_REVNO)) item_out.write(line) item_out.close() item_in.close() shutil.copymode(original_name, final_name) trans = compile_translations(self.distribution) trans.run() class clear_generated(Command): description = 'clears out files generated by configure' user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): print 'Removing completed template files...' for item in os.listdir('in'): if item.endswith('.in'): print 'Removing completed',item, original_name = os.path.join('in',item) final_name = item[:-3].replace('=','/') print final_name, '...', if os.path.exists(final_name): os.remove(final_name) print 'Removed.' else: print 'Does not exist.' print 'Removing compiled translation files...' if os.path.exists('translations'): shutil.rmtree('translations/') os.makedirs('translations/') class test(Command): description = "run Wicd's unit tests" user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): print "importing tests" import tests print 'running tests' tests.run_tests() class update_message_catalog(Command): description = "update wicd.pot with new strings" user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): os.system('pybabel extract . -o po/wicd.pot --sort-output') os.system('xgettext -L glade data/wicd.ui -j -o po/wicd.pot') class update_translations(Command): description = "update po-files with new strings from wicd.pot" user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): for pofile in glob('po/*.po'): lang = pofile.replace('po/', '').replace('.po', '') os.system('pybabel update -o %s -i po/wicd.pot -D wicd -l %s' % (pofile, lang)) class compile_translations(Command): description = 'compile po-files to binary mo' user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): if os.path.exists('translations'): shutil.rmtree('translations/') os.makedirs('translations') for pofile in glob('po/*.po'): lang = pofile.replace('po/', '').replace('.po', '') os.makedirs('translations/' + lang + '/LC_MESSAGES/') os.system('pybabel compile -D wicd -i %s -l %s -d translations/' % (pofile, lang)) class uninstall(Command): description = "remove Wicd using uninstall.sh and install.log" user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): os.system("./uninstall.sh") try: import wpath except ImportError: print '''Error importing wpath.py. You can safely ignore this message. It is probably because you haven't run python setup.py configure yet or you are running it for the first time.''' data = [] py_modules = ['wicd.networking','wicd.misc','wicd.wnettools', 'wicd.wpath','wicd.dbusmanager', 'wicd.logfile','wicd.backend','wicd.configmanager', 'wicd.translations'] # path to the file to put in empty directories # fixes https://bugs.launchpad.net/wicd/+bug/503028 empty_file = 'other/.empty_on_purpose' try: print "Using init file",(wpath.init, wpath.initfile) data = [ (wpath.dbus, ['other/wicd.conf']), (wpath.dbus_service, ['other/org.wicd.daemon.service']), (wpath.systemd, ['other/wicd.service']), (wpath.logrotate, ['other/wicd.logrotate']), (wpath.log, [empty_file]), (wpath.etc, ['other/dhclient.conf.template.default']), (wpath.encryption, [('encryption/templates/' + b) for b in os.listdir('encryption/templates') if not b.startswith('.')]), (wpath.networks, [empty_file]), (wpath.sbin, ['scripts/wicd']), (wpath.daemon, ['wicd/monitor.py', 'wicd/wicd-daemon.py', 'wicd/suspend.py', 'wicd/autoconnect.py']), (wpath.backends, ['wicd/backends/be-external.py', 'wicd/backends/be-ioctl.py']), (wpath.scripts, [empty_file]), (wpath.predisconnectscripts, [empty_file]), (wpath.postdisconnectscripts, [empty_file]), (wpath.preconnectscripts, [empty_file]), (wpath.postconnectscripts, [empty_file]), ] if not wpath.no_install_gtk: data.append((wpath.desktop, ['other/wicd.desktop'])) data.append((wpath.bin, ['scripts/wicd-client'])) data.append((wpath.bin, ['scripts/wicd-gtk'])) data.append((wpath.gtk, [ 'gtk/wicd-client.py', 'gtk/netentry.py', 'gtk/prefs.py', 'gtk/gui.py', 'gtk/guiutil.py', 'data/wicd.ui', 'gtk/configscript.py', ])) data.append((wpath.autostart, ['other/wicd-tray.desktop'])) if not wpath.no_install_man: data.append((wpath.mandir + 'man1/', [ 'man/wicd-client.1' ])) data.append((wpath.icons + 'scalable/apps/', ['icons/scalable/wicd-gtk.svg'])) data.append((wpath.icons + '192x192/apps/', ['icons/192px/wicd-gtk.png'])) data.append((wpath.icons + '128x128/apps/', ['icons/128px/wicd-gtk.png'])) data.append((wpath.icons + '96x96/apps/', ['icons/96px/wicd-gtk.png'])) data.append((wpath.icons + '72x72/apps/', ['icons/72px/wicd-gtk.png'])) data.append((wpath.icons + '64x64/apps/', ['icons/64px/wicd-gtk.png'])) data.append((wpath.icons + '48x48/apps/', ['icons/48px/wicd-gtk.png'])) data.append((wpath.icons + '36x36/apps/', ['icons/36px/wicd-gtk.png'])) data.append((wpath.icons + '32x32/apps/', ['icons/32px/wicd-gtk.png'])) data.append((wpath.icons + '24x24/apps/', ['icons/24px/wicd-gtk.png'])) data.append((wpath.icons + '22x22/apps/', ['icons/22px/wicd-gtk.png'])) data.append((wpath.icons + '16x16/apps/', ['icons/16px/wicd-gtk.png'])) data.append((wpath.images, [('images/' + b) for b in os.listdir('images') if not b.startswith('.')])) data.append((wpath.pixmaps, ['other/wicd-gtk.xpm'])) if not wpath.no_install_ncurses: data.append((wpath.curses, ['curses/curses_misc.py'])) data.append((wpath.curses, ['curses/prefs_curses.py'])) data.append((wpath.curses, ['curses/wicd-curses.py'])) data.append((wpath.curses, ['curses/netentry_curses.py'])) data.append((wpath.curses, ['curses/configscript_curses.py'])) data.append((wpath.bin, ['scripts/wicd-curses'])) if not wpath.no_install_man: data.append(( wpath.mandir + 'man8/', ['man/wicd-curses.8'])) if not wpath.no_install_man and not wpath.no_install_i18n_man: data.append(( wpath.mandir + 'nl/man8/', ['man/nl/wicd-curses.8'])) if not wpath.no_install_docs: data.append(( wpath.docdir, ['curses/README.curses'])) if not wpath.no_install_cli: data.append((wpath.cli, ['cli/wicd-cli.py'])) data.append((wpath.bin, ['scripts/wicd-cli'])) if not wpath.no_install_man: data.append(( wpath.mandir + 'man8/', ['man/wicd-cli.8'])) if not wpath.no_install_docs: data.append(( wpath.docdir, ['cli/README.cli'])) piddir = os.path.dirname(wpath.pidfile) if not piddir.endswith('/'): piddir += '/' if not wpath.no_install_docs: data.append((wpath.docdir, ['INSTALL', 'LICENSE', 'AUTHORS', 'README', 'CHANGES', ])) data.append((wpath.varlib, ['other/WHEREAREMYFILES'])) if not wpath.no_install_kde: if not wpath.no_install_gtk: data.append((wpath.kdedir, ['other/wicd-tray.desktop'])) if not wpath.no_install_init: data.append((wpath.init, [ wpath.initfile ])) if not wpath.no_install_man: data.append((wpath.mandir + 'man8/', ['man/wicd.8'])) data.append((wpath.mandir + 'man5/', ['man/wicd-manager-settings.conf.5'])) data.append((wpath.mandir + 'man5/', ['man/wicd-wired-settings.conf.5'])) data.append((wpath.mandir + 'man5/', ['man/wicd-wireless-settings.conf.5'])) data.append((wpath.mandir + 'man1/', ['man/wicd-client.1'])) if not wpath.no_install_man and not wpath.no_install_i18n_man: # Dutch translations of the man data.append((wpath.mandir + 'nl/man8/', ['man/nl/wicd.8' ])) data.append((wpath.mandir + 'nl/man5/', ['man/nl/wicd-manager-settings.conf.5'])) data.append((wpath.mandir + 'nl/man5/', ['man/nl/wicd-wired-settings.conf.5'])) data.append((wpath.mandir + 'nl/man5/', ['man/nl/wicd-wireless-settings.conf.5'])) data.append((wpath.mandir + 'nl/man1/', ['man/nl/wicd-client.1'])) if not wpath.no_install_acpi: data.append((wpath.resume, ['other/80-wicd-connect.sh'])) data.append((wpath.suspend, ['other/50-wicd-suspend.sh'])) if not wpath.no_install_pmutils: data.append((wpath.pmutils, ['other/55wicd'])) print 'Using pid path', os.path.basename(wpath.pidfile) print 'Language support for', for pofile in glob('po/*.po'): language = pofile.replace('po/', '').replace('.po', '') print language, data.append((wpath.translations + language + '/LC_MESSAGES/', ['translations/' + language + '/LC_MESSAGES/wicd.mo'])) print except Exception, e: print str(e) print '''Error setting up data array. This is normal if python setup.py configure has not yet been run.''' wpactrl_ext = Extension(name = 'wpactrl', sources = ['depends/python-wpactrl/wpa_ctrl.c', 'depends/python-wpactrl/wpactrl.c'], extra_compile_args = ["-fno-strict-aliasing"]) iwscan_ext = Extension(name = 'iwscan', libraries = ['iw'], sources = ['depends/python-iwscan/pyiwscan.c']) setup( cmdclass = { 'configure' : configure, 'uninstall' : uninstall, 'test' : test, 'clear_generated' : clear_generated, 'update_message_catalog' : update_message_catalog, 'update_translations' : update_translations, 'compile_translations' : compile_translations, }, name = "wicd", version = VERSION_NUM, description = "A wireless and wired network manager", long_description = """A complete network connection manager Wicd supports wired and wireless networks, and capable of creating and tracking profiles for both. It has a template-based wireless encryption system, which allows the user to easily add encryption methods used. It ships with some common encryption types, such as WPA and WEP. Wicd will automatically connect at startup to any preferred network within range. """, author = "Adam Blackburn, Dan O'Reilly, Andrew Psaltis, David Paleino", author_email = "compwiz18@gmail.com, oreilldf@gmail.com, ampsaltis@gmail.com, d.paleino@gmail.com", url = "https://launchpad.net/wicd", license = "http://www.gnu.org/licenses/old-licenses/gpl-2.0.html", py_modules = py_modules, data_files = data, ) wicd-1.7.2.4/data/0000775000175000017500000000000011747563546013746 5ustar daviddavid00000000000000wicd-1.7.2.4/data/wicd.ui0000644000175000017500000030455011667754331015233 0ustar daviddavid00000000000000 450 400 True Wicd Network Manager center 550 wicd-gtk center True vertical True both-horiz True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True gtk-network True True True accelgroup1 True Create an ad-hoc network True image1 False Find a hidden network True Enter a hidden network to try to locate. image2 False False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True _Switch Off Wi-Fi True gtk-media-stop False True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True _Disconnect All True gtk-disconnect False True True True _Refresh True gtk-refresh False True True True _Preferences True gtk-preferences False True True True _About True gtk-about False True True GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK True _Quit True gtk-quit False True False 0 True 0 10 10 Choose from the networks below: True False 1 True False automatic automatic True none True 3 vertical 2 4 Connecting... True Connecting... 3 0 gtk-cancel True False False Cancel the current connection attempt True False 3 1 False 3 True False 4 416 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 Configure Scripts center-on-parent dialog False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK vertical 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK vertical True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Configure scripts to run for this network: False False 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 150 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Pre-connection Script: 0 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 False False 5 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 150 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Post-connection Script: 0 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 False False 5 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 150 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Pre-disconnection Script: 0 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 False False 5 3 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 150 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Post-disconnection Script: 0 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 False False 5 4 1 True end gtk-cancel True True False True False False 0 gtk-ok True True False True False False 1 False end 0 button3 button4 5 center-on-parent dialog False True vertical 2 True True True 12 12 12 12 True True automatic automatic True queue none True 22 2 4 4 True Always switch to a wired connection when available True True False True If selected, wicd will automatically connect to a wired network as soon as a cable is plugged in, even if a wireless connection is already active. True 2 4 5 24 True 24 True 0 DNS domain: 7 8 True True 1 2 7 8 GTK_FILL True 12 Show never connect networks True True False True 2 19 20 True 0 <b>Never Connect</b> True 2 18 19 True 12 Automatically reconnect on network connection loss True True False True 2 17 18 True 0 <b>Automatic Reconnection</b> True 2 16 17 True 12 Use last wired network profile True True False True True 2 15 16 True 12 Prompt for wired network profile True True False True True pref_use_last_radio 2 14 15 True 12 Use default wired network profile True True False True True pref_use_last_radio 2 13 14 True 0 <b>Wired automatic connection</b> True 2 12 13 True 12 True 0 Wired interface: 2 3 True 12 True 0 Wireless interface: 1 2 True True 1 2 2 3 True True 1 2 1 2 True 0 <b>Network Interfaces</b> True 2 True 24 True 0 DNS server 3: 11 12 True True 1 2 11 12 True 24 True 0 DNS server 2: 10 11 True 24 True 0 DNS server 1: 9 10 True 24 True 0 Search domain: 8 9 True 12 Use global DNS servers True True False True 2 6 7 True 0 <b>Global DNS Servers</b> True 2 5 6 True True 1 2 10 11 True True 1 2 9 10 True True 1 2 8 9 True 24 Always show wired interface True True False If enabled, the wired network interface will always be displayed in the main window. This can be useful if your wired network card does not detect when the interface is connected to a cable. True 2 3 4 True 0 <b>Notifications</b> True 2 20 21 True 12 Display notifications about connection status True True False True 2 21 22 True General Settings False True 12 12 12 12 True True automatic automatic True queue none True 8 True 0 <b>Route Table Flushing</b> True 4 5 True 0 <b>Wired Link Detection</b> True 2 3 True 12 True vertical Automatic (recommended) True True False True True False 0 ip True True False True True flush_auto_radio False 1 route True True False True True flush_auto_radio False 2 5 6 True 12 True vertical Automatic (recommended) True True False True True False 0 ethtool True True False True True link_auto_radio False 1 mii-tool True True False True True link_auto_radio False 2 3 4 True 12 True vertical Automatic (recommended) True True False True True dhclient_radio False 0 dhcpcd True True False True True dhclient_radio False 1 pump True True False True True dhclient_radio False 2 dhclient True True False True True False 3 udhcpc True True False True True dhclient_radio False 4 1 2 True 0 <b>DHCP Client</b> True True 0 <b>Graphical Sudo Application</b> True 6 7 True 12 True vertical Automatic (recommended) True True False True True False 0 gksudo True True False True True sudo_auto_radio False 1 kdesu True True False True True sudo_auto_radio False 2 ktsuss True True False True True sudo_auto_radio False 3 7 8 1 True External Programs 1 False True 12 12 12 12 True 11 2 True 0 Hover your mouse over the selected backend to read its description. True 1 2 5 6 True vertical True False 0 1 2 1 2 True 2 3 GTK_FILL True 12 True 0 Driver: 1 2 True 12 Use dBm to measure signal strength True True False True 2 9 10 True 12 Enable debug mode True True False True 2 7 8 True 0 <b>Wireless Interface</b> True 2 8 9 True 0 <b>WPA Supplicant</b> True 2 True 0 <b>Debugging</b> True 2 6 7 True 12 True 0 Backend: 4 5 True True 1 2 4 5 True 0 <b>Backend</b> True 2 3 4 True 0 You should almost always use wext as the WPA supplicant driver. True 1 2 2 3 True 5 6 GTK_FILL True 12 Ping static gateways after connecting to verify association True True False True 2 10 11 2 True Advanced Settings 2 False 1 True end gtk-cancel True True True True False False 0 gtk-ok True True True True False False 1 False end 0 button2 button1 True gtk-add True gtk-find wicd-1.7.2.4/data/wicd.png0000664000175000017500000000003611635330115015355 0ustar daviddavid00000000000000link /opt/wicd/images/wicd.pngwicd-1.7.2.4/images/0000775000175000017500000000000011747563546014302 5ustar daviddavid00000000000000wicd-1.7.2.4/images/high-signal.png0000664000175000017500000000172211635330115017160 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<OIDAT8Mh]EgfIi>hjJK!XQ !E dʍ EMB!h"BѤBT$&MCL{9.}!/ν3;gg\138mt095:dɑWCVV].۷a7_]YY/--}]Mȭ,R^3ess3q{~L!䶒0;;;9<<|g?pydbll[`Wȭw "R]XX!Mӑ6_W1̤|HsB`f;"r =ݷh>2?ȷן1Bo~6T)IENDB`wicd-1.7.2.4/images/idle-low-signal-lock.png0000664000175000017500000000204511635330115020702 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8}Oh\Uhi4K! JQ.$l]Qqۊ d* ] 6" 54I=ŝLҩy3;|w/q@1 38ۯ?{*2s8\Cw4{ykBdYFQ,..~."o 32ox,g4{3#@39ܜ 0"C \4(u19/" VU"=Pzgg_Yx19?F;b!_],K,Kv9Vxs{<N@D!bs/9ד,@9Ԥn XjbtETF#s.I3&T1}TUE=A @QC5`VcQӳFrP:t̋"f!FY>jCFئU>3js(8M}yp3R"Lx1嘘c%#% C%:mW;z|ǥWBe N|+BTdZ144 '&xMD sQsOgSr|||˛7@wZֽ!"rdaa᧢(FsG<c)ncZM["2dPpf7qTZ?D{W_1{oGO|9H!>IENDB`wicd-1.7.2.4/images/transmitting-low-signal.png0000664000175000017500000000201011635330115021552 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8}MhU̼y5Kl@jRtK.tR(~V5H,\fV(\=.ą E nZ Ѵi:{y_I^<0̽; (Pch챷#63fKUEE$ 7n9w̹#NIe_Q~|{*BN:@*|EΞ9B Әjt1cXb}"R!1}'#Q 3BeEz/pPU,lss J"wn9eY9vRZnݳ_}W h&&I^- !PV};;$:^u kzwGU ! 4y޽ dKw,K}&u7qxN0kMy},B(Y[_'7i13b"43xMҰL56^MD~c!{E>("PbҢeYwco× ѣxn%bU$ ccc}Y+jA*Br| (@UR ͷ_x[!AN/b"wPzVkrrtE9xx+m6?7׀^r-<˕.^|suuXYYQddUVu.]$V" [xYkpN:4==ǎ}Ǐ'wή}sVXsR\ZZ%˲]l#cjDCD~ubĤiwwg>IENDB`wicd-1.7.2.4/images/transmitting-bad-signal-lock.png0000664000175000017500000000177211635330115022443 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<wIDAT8kU;g|4$*)EJ!`AbHRJu BtʅEhiC:=.޹7F|`8;ywjC_n~qm$IPUTMr Om$IBe}+"O?GGUDN I@Ξy 13x03&N:`fD z#F#&P=PQTԀ;c? 1V =EQT]_aU%ƘaH*FÀ~@EAZҭ*[[%8N_K}cG8oM<@Uȼi0==SGF03t]aw`XтV =XVaf*{TS:'Ӳ-bQU]Dz~ݢIňa=wZi>O'NBIֹ. *w1/"s&{,#@A.z$IHZ i2;3G.,*,Ȳ ,ڝAzHn xisUexx)R{fF*%"*$X u*9b|o{/@#fHX-KE͉gONcvn|(@8TY|~97t0ϯ^=so ADqf-"JHU$,--m^{`aaavrrOZON !뛙z}#͛ή6,"+++fYv;>6 !C%쉈S|ʕ[7:ZZzWb8ljgw3 QpNAXIENDB`wicd-1.7.2.4/images/both-bad-signal.png0000664000175000017500000000177611635330115017732 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<{IDAT8kU̙31֤%B7A\ 6ŽXR̢RK/(\J .*6{9;&ވ/0c;WT$wL#'U30ͷ7OMNFQ1#"r{.mDQs/ER?p'?,eY;E @&`|gaET={T9#bDA5i?y^C"; HP0 * !T =YUN}僕+c ! D UAR8!IӔ,HӔVU5w;aF ã(T>q0==SPUe]ag\Ѭj@$*c 8inBAQzdYFU.WlHٯ!(x:$i?=5j]*u !G4M84M<~9]jQ1Z$ZKǜ9]= O9D9sIzA^쀋Ul1h̳Os ZBL l}tx P,R#x?k9T(naY:gtT=}j,Eځ||ڛ;;;ͭ_?A"ݽK YU}("~lDq(ϫuM TK'&&z͹sy럙Zm7[eU ѵsw#iy81D>3@t#/ܹzv?+>l?&Y^~11ZUK_jIENDB`wicd-1.7.2.4/images/low-signal-lock.png0000664000175000017500000000204511635330115017767 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8}Oh\Uhi4K! JQ.$l]Qqۊ d* ] 6" 54I=ŝLҩy3;|w/q@1 38ۯ?{*2s8\Cw4{ykBdYFQ,..~."o 32ox,g4{3#@39ܜ 0"C \4(u19/" VU"=Pzgg_Yx19?F;b!_],K,Kv9Vxs{<N@D!bs/9ד,@9Ԥn XjbtETF#s.I3&T1}TUE=A @QC5`VcQӳFrP:t̋"f!FY>jCFئU>3js(8M}yp3R"Lx1嘘c%#% C%:mW;z|ǥWBe N|+BTdZ144 '&xMD sQsOgSr|||˛7@wZֽ!"rdaa᧢(FsG<c)ncZM["2dPpf7qTZ?D{W_1{oGO|9H!>IENDB`wicd-1.7.2.4/images/receiving-low-signal.png0000664000175000017500000000204211635330115021007 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8}kUi'|K!7J7BW(ALU$ ( BVRA\PkSIi2;ν縸3I:0sbf88P}YN }ןKN$޽?&,-Z-$IBlll|."og?a,[ 64 #c|7,-cfx`fTsFĉ R+:`U@*" 58y)˲Skk!8P_zppHg*TQUz,Klicww'_~ "b:K8Y!"LNNEpuJ?j(bnbPU* fs=ι'w!4-)R4 oP4cf]gO_x5uvgbb٬d31i2;b1!/g9JGP>4Kңf0Υm_-BiI*8OLKDQ% G@%gzf'|dYF/^0<%yyv#BTqfB'Z_} q4^l1xqat|jnmmj[Puv:8H޿qR`%-"?벷=U+++8l϶,,,L^~…ŋAߔLML|yaVtHS\[[9_EDNO:sM,4]*֑b_Df}*.վ[m=wꋏ?Y4mOէKD~?}‰a4ᙏY37IENDB`wicd-1.7.2.4/images/receiving-low-signal-lock.png0000664000175000017500000000204211635330115021735 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8}kUi'|K!7J7BW(ALU$ ( BVRA\PkSIi2;ν縸3I:0sbf88P}YN }ןKN$޽?&,-Z-$IBlll|."og?a,[ 64 #c|7,-cfx`fTsFĉ R+:`U@*" 58y)˲Skk!8P_zppHg*TQUz,Klicww'_~ "b:K8Y!"LNNEpuJ?j(bnbPU* fs=ι'w!4-)R4 oP4cf]gO_x5uvgbb٬d31i2;b1!/g9JGP>4Kңf0Υm_-BiI*8OLKDQ% G@%gzf'|dYF/^0<%yyv#BTqfB'Z_} q4^l1xqat|jnmmj[Puv:8H޿qR`%-"?벷=U+++8l϶,,,L^~…ŋAߔLML|yaVtHS\[[9_EDNO:sM,4]*֑b_Df}*.վ[m=wꋏ?Y4mOէKD~?}‰a4ᙏY37IENDB`wicd-1.7.2.4/images/good-signal.png0000664000175000017500000000203611635330115017170 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8k]Uk}OLڤm^&IgBE!)E BAAItȉ#EAAE85i{k9<p~;3Dwaf '},9e1Y^ehj(@QȲ<ϙTD8 \և>qgGdx``7SmCv2T$P;ʳ1}b68I?IENDB`wicd-1.7.2.4/images/signal-50.png0000664000175000017500000000320311635330115016461 0ustar daviddavid00000000000000PNG  IHDR3JgsRGBbKGD pHYs B(xtIME G]UIDATXXK]G;wˎ @x,xI C eņ߁? l"eŞ@J2M/ALRL2HZ"Nr?_9_ۺ[o\b CYR6#37$}<4M,-xrc [rf*)HX& I#$K/_ݺiqI@"cϛk>~: ȩ9L}Է9uGdf@B-TᄂmI??ɬ|2θ !&[MTwbqۨ;Bjϴ(Ң61Ɠ5My1@}L:lJ4d/m?aqa%ISIIww u 4BىRYRaO i, x'y_t䜿vԬB K904:fvdBpp{v#鎤wX9bjT0tb9r }3 eI\L_;/8ЙҹæF KD(C@"RS͘iK9Ζ$,vy6O'f(Cf1U8(7{<)MHn|_.|um}uvq5HKjz9AjgLw'Gw˽W~@h@E0! KɆܣq4l?pBݢفRbu~8bA*XEIPa5Е̐!$n 6}єHN$m.4φ[უ }`D,'6yf֬X䦒-0>*U[P) ჌%3k0GrS>eCf@TF,wՌᓍND)ZFMr8E?:Zya6p  ୃͧS=0f b 1x(2ZG79&7}Ɍ :Wi &KF`r^msy"bIi@t}f4=$G!3vX@e!ZMBZ\w9=rrL@ؠGfХ~= W.9?HInA >/̶>v}ڍOc$$ ,AyơkA1KR՜'u]Kr/vwWɎNzIENDB`wicd-1.7.2.4/images/transmitting-low-signal-lock.png0000664000175000017500000000201011635330115022500 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8}MhU̼y5Kl@jRtK.tR(~V5H,\fV(\=.ą E nZ Ѵi:{y_I^<0̽; (Pch챷#63fKUEE$ 7n9w̹#NIe_Q~|{*BN:@*|EΞ9B Әjt1cXb}"R!1}'#Q 3BeEz/pPU,lss J"wn9eY9vRZnݳ_}W h&&I^- !PV};;$:^u kzwGU ! 4y޽ dKw,K}&u7qxN0kMy},B(Y[_'7i13b"43xMҰL56^MD~c!{E>("PbҢeYwco× ѣxn%bU$ ccc}Y+jA*Br| (@UR ͷ_x[!AN/b"wPzVkrrtE9xx+m6?7׀^r-<˕.^|suuXYYQddUVu.]$V" [xYkpN:4==ǎ}Ǐ'wή}sVXsR\ZZ%˲]l#cjDCD~ubĤiwwg>IENDB`wicd-1.7.2.4/images/receiving-good-signal-lock.png0000664000175000017500000000203711635330115022070 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8kU?ΝIMWKFР"JR,n\T\ -( JT.&.k4&i^̽縸^_x}|w{Ǧ5 ں]~W׆',9e1YZm̅I!eEQ0?? _鲬rA1ā ⥉_9?s3#@3`$ກq"`(;TGbmpHPtp4_ &(˲}*?3ܻ})9TY]77!R*J2F,i44ͤ9VVozN@Dt%Iμ|O/S&V x͜ѣ B XjbM"[J@Rw:<#)T1Sz58M6:fPP UXtvTh?F$c##X,PWV8÷"١x‚'w ###{{8 cd(IDIVxvC8)Z,|ps޾)8O>D</EsGQh2<;Iph>pV[7_# HRTV@1'SkeӓpK}M Ն^+W^[\\ܹyw}.GyV*D3of"իS/^yvvv]V*ZΞ={tpp 'N|N d|ddWqgGdx``7SmCv2T$P;ʳ1}b68I?IENDB`wicd-1.7.2.4/images/both-good-signal.png0000664000175000017500000000201211635330115020114 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8ke?;vcCIX==x ^,s`IOOB J%TDCŘ]Mٙy}<&يϲ||["b*]cvTu3A``9ujY4Mqa\\ysIVADБ1m,\92<2< ~`D"&m]Pe1VD@R+Gx; It˲Ͽ[?B=ooG{䪼*pw$I8sư[K|l@Pr PG,&)N[*q<6r(uK2E5{ak̻9i#(ZnCP ptb #Ÿzvjh?.wGS:0P^A˕Vmce${߿wT].ev &NsQ*$T,"Xk[aH~AJWԩ:5 (6P챰*A)[!0D<8c48lۯD0@v=ڱHh58zb:6Jl,ofyl%?ƍ[8{W^[[fTtTB$z_DHժ 9sd~~kϞ>9s&P ˲#鉉ϯ_5"9.Y///a;w1̲, 'BW({aU~x>#|v,m*\w,; Zۿj/IN:IENDB`wicd-1.7.2.4/images/idle-low-signal.png0000664000175000017500000000204511635330115017754 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8}Oh\Uhi4K! JQ.$l]Qqۊ d* ] 6" 54I=ŝLҩy3;|w/q@1 38ۯ?{*2s8\Cw4{ykBdYFQ,..~."o 32ox,g4{3#@39ܜ 0"C \4(u19/" VU"=Pzgg_Yx19?F;b!_],K,Kv9Vxs{<N@D!bs/9ד,@9Ԥn XjbtETF#s.I3&T1}TUE=A @QC5`VcQӳFrP:t̋"f!FY>jCFئU>3js(8M}yp3R"Lx1嘘c%#% C%:mW;z|ǥWBe N|+BTdZ144 '&xMD sQsOgSr|||˛7@wZֽ!"rdaa᧢(FsG<c)ncZM["2dPpf7qTZ?D{W_1{oGO|9H!>IENDB`wicd-1.7.2.4/images/both-low-signal-lock.png0000664000175000017500000000176611635330115020732 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<sIDAT8͋UUUh'1Pp3KAdЅ0 "(Q_wBLnM! Q` q>WﺨLG/Uns=ԓ1P(0ܶHLqGf<'"DEPΝ_p<@QxZ|s!H0l4y_h7Nn0I @v(N ʲr:PB޼t`jޝY6>]sH$ {`u6 s98H}`x6G%RżB# PwfF*N wg I6`a ݿOu:CeF' m6f1a"əqsYU.FNCqoĝw$ ӧ߰PU"h4)@]Ilf$mjkk+?ZwQ*)#X\\ƒVVV~qfd b/p;&x~ƻ^ׁوҏI{ʲ^sg✯ԽhLd^p]MVo#qMD s#O;B/4Z&u=Woll;gQV;l6: X-뭽6^AU[?.P.V#zOoudf"OoM:lMDuuvvvUڡxW._]tpX{N`9=77KeDSJi||{Q/)$jB˚D~fzUMP1{ҿkIENDB`wicd-1.7.2.4/images/no-signal.png0000664000175000017500000000211511635330115016652 0ustar daviddavid00000000000000PNG  IHDRĴl;bKGD pHYs  tIME %&IDAT8˵[h\U}朙2i)vK[/ѦADC-R"Q">xACVP[-QQ D[DbQ#44Ә6If9{̜6h\؋6?Kqŀ@]%qȴ:PA)@155Xcxd5ę3mm91"Z "XkA3CVƉT*/-H$Vh#չ;~ȫ`uEl2JU1XkZWbc&{>˛ǎGoQir7mȁԮFD" mb[Kա"%Ҥ_)10 +[$_pEtyZj:t#pYjvO"d:6280XeLE?5AP,YXXT*UXU5]͚MlߗbfvLKK #?TE1w67Ŋ%?RVCpPk L PYӿ"D"Rx}{{e8p8=tS(qVPP3m7\^5]J%@Z?.> 1444 .,, ZkbvvkgMFlE@)P͐ A6oo3{ <L)`3H&]tRTQ%q7zٷ^xyę'q_޽{cmmmRe`HRaOOϗ\|˦NGn9wc-R:SOxBԡ=y;dnG<~rrAk]Yy477gGtѮݺ;͏arS l=;zu]l,  qJ)rJ%;[ۻjco\ǷYBmulI \{ev>zS! _ % jv4 eĕIENDB`wicd-1.7.2.4/images/receiving-good-signal.png0000664000175000017500000000203711635330115021142 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8kU?ΝIMWKFР"JR,n\T\ -( JT.&.k4&i^̽縸^_x}|w{Ǧ5 ں]~W׆',9e1YZm̅I!eEQ0?? _鲬rA1ā ⥉_9?s3#@3`$ກq"`(;TGbmpHPtp4_ &(˲}*?3ܻ})9TY]77!R*J2F,i44ͤ9VVozN@Dt%Iμ|O/S&V x͜ѣ B XjbM"[J@Rw:<#)T1Sz58M6:fPP UXtvTh?F$c##X,PWV8÷"١x‚'w ###{{8 cd(IDIVxvC8)Z,|ps޾)8O>D</EsGQh2<;Iph>pV[7_# HRTV@1'SkeӓpK}M Ն^+W^[\\ܹyw}.GyV*D3of"իS/^yvvv]V*ZΞ={tpp 'N|N d|ddWq0==SPUe]ag\Ѭj@$*c 8inBAQzdYFU.WlHٯ!(x:$i?=5j]*u !G4M84M<~9]jQ1Z$ZKǜ9]= O9D9sIzA^쀋Ul1h̳Os ZBL l}tx P,R#x?k9T(naY:gtT=}j,Eځ||ڛ;;;ͭ_?A"ݽK YU}("~lDq(ϫuM TK'&&z͹sy럙Zm7[eU ѵsw#iy81D>3@t#/ܹzv?+>l?&Y^~11ZUK_jIENDB`wicd-1.7.2.4/images/idle-bad-signal-lock.png0000664000175000017500000000203311635330115020624 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8kU?ΝjGWXKԔn! 0XHJEp!AdJU6(҅+Iڕ 14 I{q1^~"ܙ9{q0D5;c6oc?|w,pDpY@Q^sg✯ԽhLd^p]MVo#qMD s#O;B/4Z&u=Woll;gQV;l6: X-뭽6^AU[?.P.V#zOoudf"OoM:lMDuuvvvUڡxW._]tpX{N`9=77KeDSJi||{Q/)$jB˚D~fzUMP1{ҿkIENDB`wicd-1.7.2.4/images/both-low-signal.png0000664000175000017500000000176611635330115020004 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<sIDAT8͋UUUh'1Pp3KAdЅ0 "(Q_wBLnM! Q` q>WﺨLG/Uns=ԓ1P(0ܶHLqGf<'"DEPΝ_p<@QxZ|s!H0l4y_h7Nn0I @v(N ʲr:PB޼t`jޝY6>]sH$ {`u6 s98H}`x6G%RżB# PwfF*N wg I6`a ݿOu:CeF' m6f1a"əqsYU.FNCqoĝw$ ӧ߰PU"h4)@]Ilf$mjkk+?ZwQ*)#X\\ƒVVV~qfd b/p;&x~ƻ^ׁوҏI{ʲhjJK!XQ !E dʍ EMB!h"BѤBT$&MCL{9.}!/ν3;gg\138mt095:dɑWCVV].۷a7_]YY/--}]Mȭ,R^3ess3q{~L!䶒0;;;9<<|g?pydbll[`Wȭw "R]XX!Mӑ6_W1̤|HsB`f;"r =ݷh>2?ȷן1Bo~6T)IENDB`wicd-1.7.2.4/images/idle-good-signal-lock.png0000664000175000017500000000203611635330115021031 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8k]Uk}OLڤm^&IgBE!)E BAAItȉ#EAAE85i{k9<p~;3Dwaf '},9e1Y^ehj(@QȲ<ϙTD8 \և>qgGdx``7SmCv2T$P;ʳ1}b68I?IENDB`wicd-1.7.2.4/images/good-signal-lock.png0000664000175000017500000000203611635330115020116 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8k]Uk}OLڤm^&IgBE!)E BAAItȉ#EAAE85i{k9<p~;3Dwaf '},9e1Y^ehj(@QȲ<ϙTD8 \և>qgGdx``7SmCv2T$P;ʳ1}b68I?IENDB`wicd-1.7.2.4/images/both-high-signal-lock.png0000664000175000017500000000166211635330115021043 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org</IDAT8k\U?;offdȤ&JKf7.7. DE%PDݴT(VAJBIc$3{f+x.ss*&"(r>g0"GvnĿ;bg7;U:&pI"nxgX_PD^.WGQ\E @'0YS?Pʕ,`F1" x7` "TA FAE\p /v`;^$`cCOw FA <,FHͻ_{$I xݞI FZQ'sSBB<>Y{Em64 O]i+!U޼r奍 d_j Fdd,--} P*TH4NREz@V '곏=9w.P977?z2O+"0 s-,,A᪩VUi =~Ϸ>tGͼO("cιg:'Uu;n5IENDB`wicd-1.7.2.4/images/high-signal-lock.png0000664000175000017500000000172211635330115020106 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<OIDAT8Mh]EgfIi>hjJK!XQ !E dʍ EMB!h"BѤBT$&MCL{9.}!/ν3;gg\138mt095:dɑWCVV].۷a7_]YY/--}]Mȭ,R^3ess3q{~L!䶒0;;;9<<|g?pydbll[`Wȭw "R]XX!Mӑ6_W1̤|HsB`f;"r =ݷh>2?ȷן1Bo~6T)IENDB`wicd-1.7.2.4/images/transmitting-good-signal-lock.png0000664000175000017500000000201011635330115022627 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8kE?2)Vi-z{<ԋJ!P)X"CIU6~Z1#ཬ=5wI,c%I>ܣG()NZ0νyPUxPUGOAU@JJ`b$e]P1b0HHzC1Fz<Ĩ c'MNw;?+4b!hﭯ';;bT@4 4hjrưo\,@P %Uѡ*OIC,fx(JL{QATU{XLM[jf8L Np|%OABvs//PTmpy:^EҤݯ1(xm\נ*<Ɋ"Ho\iV|&`pSA[wb }v.SmpGӢwcܦBf$ ) SU*F02Pi#II+el+S,tk bk Zj !=\cwɕ{/`4fh"U0TO['=9~/ӱQ9=Wnj@Njnܸc\wWWW+++ n%U!9UKKKRKF$ 0`>p=6::KOcΜ '&6~=T5[Dž"'"ߒ$Dd`LRƢ>B OD`-OX׿Cw<][UBs"oB'9j?IENDB`wicd-1.7.2.4/images/wired-gui.svg0000664000175000017500000010166311635330115016702 0ustar daviddavid00000000000000 image/svg+xml Lapo Calamandrei wicd-1.7.2.4/images/transmitting-high-signal.png0000664000175000017500000000165511635330115021706 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<*IDAT8Mh\U;off&:RjB7*`7eAE%k"MJBh"BѤ⪢MR'If{f:W<?QUzCD P11ƈy+SUqCͫZk1`D0D̥XϿpMD.|x3<*QS` yJR00"(!(@'ya0HzBz'"1BNszc !{6"ʃ@|lݿ9xjp$y -("*h«*=|G:W݂V 5ۄrB Z=Bo䏿dZ"5ӶF*Uvכ}2!@5YJ ^z2$RiaŊ@RqL'de[OJc2K2a9oXY'pT@"HB :7x DF05a[vY.FO>sTdd,NXQ{9O_@J"h ]Gġ#`3\>3NdD 좧~ѱ\!:AɀUKW20DracZ ZT*R`dF@bb&pZ!9$Sd%@8J@K A DF ,sgBJZf\s[R-~猥Š`&wtүm:rc15S2*l|hxllFN8] Z(\M$sT%A&X{,$+>>>GA-苧75tb=׿G?0&]^l'F=iӸf3#fźQ/ y̜<XX-y"÷.zeˆ|+i}@ƨ@P! *^:zUPӨ1NSٳ33-JD8.N c`6NSa蒠Y18} 8) JP+{L2`TCӨũ3FsAɲsDAOStmܚ Ȕd'P+#'1Lvj]Lb_UĶvd|FnnsG[lNY9%glN1jI13K.!NF^;a{6זv/z,/~} 4ā#M&5,s29\KDա_7.3_V^ޔٌ؟0dW;ԪlCg|ĭ dͦjs᥿@Jd`XMǔE K-@ "*,;K(4sͣ˻/p)ɔD@U ~"GPH)oWpnaёH + *`bp$wڕmYd^{%ٗLaD\JA+}&jЦlK28zgnZP^+)nB2iyzP¥Bc-dQ:g7zb}[<uG+7&ǷH,J4}pi7oqɯyZH2+\%g=VÃs؃ALu0<48  IENDB`wicd-1.7.2.4/images/transmitting-high-signal-lock.png0000664000175000017500000000165511635330115022634 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<*IDAT8Mh\U;off&:RjB7*`7eAE%k"MJBh"BѤ⪢MR'If{f:W<?QUzCD P11ƈy+SUqCͫZk1`D0D̥XϿpMD.|x3<*QS` yJR00"(!(@'ya0HzBz'"1BNszc !{6"ʃ@|lݿ9xjp$y -("*h«*=|G:W݂V 5ۄrB Z;sf"c!Zf?|wcTe8p", (?_\8 v1e!_|8eA0r7~gq"fF#fi #D PPim<`Up6_ 6)˲ ǟ|)9T[CwRLU%idNQeIQt:JsllW;_ܣ]0p"Uc=7_9}a|| ӍVZTJbIJpc9WW<R2"b*foNYj5_ @ 1bI&Šf*Z '0UjK` (EA&HEQ<)DԬ_ك[ zkley㽧h's&'&kp/4`q6JK< ! "}CywJFN9_W"d3ȼUchh1j&S<ًn |/ޟ1FA*Ee7m#bNscjtԩ%Tm(߮9W־uO;Dvߞpԛ٦ p5]o._X_YSm_JΜҝ= 쒉fs7`m>E!wWW}ă}RJCC #9 d/2+W _kU 4˚>1{kY:\OgIENDB`wicd-1.7.2.4/images/low-signal.png0000664000175000017500000000204511635330115017041 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8}Oh\Uhi4K! JQ.$l]Qqۊ d* ] 6" 54I=ŝLҩy3;|w/q@1 38ۯ?{*2s8\Cw4{ykBdYFQ,..~."o 32ox,g4{3#@39ܜ 0"C \4(u19/" VU"=Pzgg_Yx19?F;b!_],K,Kv9Vxs{<N@D!bs/9ד,@9Ԥn XjbtETF#s.I3&T1}TUE=A @QC5`VcQӳFrP:t̋"f!FY>jCFئU>3js(8M}yp3R"Lx1嘘c%#% C%:mW;z|ǥWBe N|+BTdZ144 '&xMD sQsOgSr|||˛7@wZֽ!"rdaa᧢(FsG<c)ncZM["2dPpf7qTZ?D{W_1{oGO|9H!>IENDB`wicd-1.7.2.4/images/signal-75.png0000664000175000017500000000340011635330115016467 0ustar daviddavid00000000000000PNG  IHDR3JgsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<}IDATXXM]G=}ߛyyvH|ʂ ! `K~,X!vlĂ+QEDIIb=y{wxlYj]S}M^;w\~_R!pkO>h}^؎Pcw"}}j uLR%-$JzIR#i_I$$$o|="?:X. Ʀ!3#Rlef'fϼxLF'7O|{/ ۷ozg߾+ő}ȇƺj͉?'W*=F$K @nu VJYS`!@XQSCMjYK+SjIRGe*v\3u7Zn$W &h$$hj_T64^f +ZD"<5CCT+&;O2IJf$!iFr͈xʭ[jr!aD˭*\5tSwfv6oIL$;u_=h}G$ TC>8}}:(xT_/[ʊf v9<3hjeC̬ؤNL]I~ri(Goꪡ7vzC`* G2",4YC J*]bw@afԳ 9j #G0J39tZ&8OEʊbLb&sMոm8mua3@Pr*Z%zW+ZwSyPFI-%%f.+;sa-W/~8۾WqEPz^(QiG8%&vvƮhS`e&^J)x{@ 8@,r54Lh/d/`2gdɲ)S2:EACZi(c8̝ˁ8E#""Zv 6eSҕu- Luږ}4jЊ?+,,TµT`意c{dR򼛎KJHng_z*L;2X6ԱjF }GYk:_H )'/$% ed`&l -g\R"9'$:EĩoS!rS5[-!MR""(Z޹|l7o^—u$PhnW32mZdH FD!wtO|CFIENDB`wicd-1.7.2.4/images/idle-bad-signal.png0000664000175000017500000000203311635330115017676 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8kU?ΝjGWXKԔn! 0XHJEp!AdJU6(҅+Iڕ 14 I{q1^~"ܙ9{q0D5;c6oc?|w,pDpY@Q^sg✯ԽhLd^p]MVo#qMD s#O;B/4Z&u=Woll;gQV;l6: X-뭽6^AU[?.P.V#zOoudf"OoM:lMDuuvvvUڡxW._]tpX{N`9=77KeDSJi||{Q/)$jB˚D~fzUMP1{ҿkIENDB`wicd-1.7.2.4/images/receiving-bad-signal.png0000664000175000017500000000203311635330115020734 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8k]E?gy55m$5AB7j7(YtPKP*ra-IT|m9Ž5 /˝c>;sf"c!Zf?|wcTe8p", (?_\8 v1e!_|8eA0r7~gq"fF#fi #D PPim<`Up6_ 6)˲ ǟ|)9T[CwRLU%idNQeIQt:JsllW;_ܣ]0p"Uc=7_9}a|| ӍVZTJbIJpc9WW<R2"b*foNYj5_ @ 1bI&Šf*Z '0UjK` (EA&HEQ<)DԬ_ك[ zkley㽧h's&'&kp/4`q6JK< ! "}CywJFN9_W"d3ȼUchh1j&S<ًn |/ޟ1FA*Ee7m#bNscjtԩ%Tm(߮9W־uO;Dvߞpԛ٦ p5]o._X_YSm_JΜҝ= 쒉fs7`m>E!wWW}ă}RJCC #9 d/2+W _kU 4˚>1{kY:\OgIENDB`wicd-1.7.2.4/images/both-high-signal.png0000664000175000017500000000166211635330115020115 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org</IDAT8k\U?;offdȤ&JKf7.7. DE%PDݴT(VAJBIc$3{f+x.ss*&"(r>g0"GvnĿ;bg7;U:&pI"nxgX_PD^.WGQ\E @'0YS?Pʕ,`F1" x7` "TA FAE\p /v`;^$`cCOw FA <,FHͻ_{$I xݞI FZQ'sSBB<>Y{Em64 O]i+!U޼r奍 d_j Fdd,--} P*TH4NREz@V '곏=9w.P977?z2O+"0 s-,,A᪩VUi =~Ϸ>tGͼO("cιg:'Uu;n5IENDB`wicd-1.7.2.4/images/transmitting-good-signal.png0000664000175000017500000000201011635330115021701 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8kE?2)Vi-z{<ԋJ!P)X"CIU6~Z1#ཬ=5wI,c%I>ܣG()NZ0νyPUxPUGOAU@JJ`b$e]P1b0HHzC1Fz<Ĩ c'MNw;?+4b!hﭯ';;bT@4 4hjrưo\,@P %Uѡ*OIC,fx(JL{QATU{XLM[jf8L Np|%OABvs//PTmpy:^EҤݯ1(xm\נ*<Ɋ"Ho\iV|&`pSA[wb }v.SmpGӢwcܦBf$ ) SU*F02Pi#II+el+S,tk bk Zj !=\cwɕ{/`4fh"U0TO['=9~/ӱQ9=Wnj@Njnܸc\wWWW+++ n%U!9UKKKRKF$ 0`>p=6::KOcΜ '&6~=T5[Dž"'"ߒ$Dd`LRƢ>B OD`-OX׿Cw<][UBs"oB'9j?IENDB`wicd-1.7.2.4/images/wired.png0000664000175000017500000000233511635330115016101 0ustar daviddavid00000000000000PNG  IHDRĴl;bKGD pHYs  tIME :[jIDAT8˥OlTE?۷-vwH Xh BHlLA^`"h$jI<1$DH R))@Lڭօy3-D/{|7U#i|щ73 0!Zk|_,D>җѷ9T XG Euh Z+(J-֮[jӸz91E2D*R|X`0dZWl9X7oz7 "uۿP(Tnҗ(})%ЕXۯ_e-jXJk ssswۡʷjUXLOeg.cg<.T?_ɻ u H<五^jz88CR 8 VqiǑRH&v?LmĢQ?Zqr!{vj!6rv̙3! b,#u B^clllU4Mv&zT C .]'#W,k7a߶mrfΪx\׽t1 Eٸ1G2BJI 4MimMo>uԵ<e&2{ۃ0!;a.R B!:;;I8@,X,RKm[ֱgM4%J7Lj7I%`srd2L&Ccc#MMM |_'-+q/y&ۦnݺ}Кa 'ܪQ(ŋܾ=GKK 7l6U,{@j .oT*5& L&4Nypcv8H|> g~9k(zzzQ^ "Dhhhe|~brx<)F_~mxxh(knnn]L:vUڵk]SSA;m@ 6i.%C)ER}]___t]w\.C###}gҶmOmh_*JIӯG"MibFM0 )T*ҔRSJJ5ˮM!۶ΝZL_S92}IENDB`wicd-1.7.2.4/images/bad-signal-lock.png0000664000175000017500000000203311635330115017711 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8kU?ΝjGWXKԔn! 0XHJEp!AdJU6(҅+Iڕ 14 I{q1^~"ܙ9{q0D5;c6oc?|w,pDpY@Q^sg✯ԽhLd^p]MVo#qMD s#O;B/4Z&u=Woll;gQV;l6: X-뭽6^AU[?.P.V#zOoudf"OoM:lMDuuvvvUڡxW._]tpX{N`9=77KeDSJi||{Q/)$jB˚D~fzUMP1{ҿkIENDB`wicd-1.7.2.4/images/idle-high-signal.png0000664000175000017500000000172211635330115020073 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<OIDAT8Mh]EgfIi>hjJK!XQ !E dʍ EMB!h"BѤBT$&MCL{9.}!/ν3;gg\138mt095:dɑWCVV].۷a7_]YY/--}]Mȭ,R^3ess3q{~L!䶒0;;;9<<|g?pydbll[`Wȭw "R]XX!Mӑ6_W1̤|HsB`f;"r =ݷh>2?ȷן1Bo~6T)IENDB`wicd-1.7.2.4/images/receiving-high-signal-lock.png0000664000175000017500000000172211635330115022057 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<OIDAT8k]E?߹s_LGkqtlQ J n\(nZT q@+ &W &Iw游$ν39gg\Mz8F^S8fW`dxd$8p.IY{~Tm<;~whBH80ϟ;o\)\'0H@bͱBpKJGg`2&2K3oqcw!b1c$Č~\[[v*^~C0p)"Yrɿ\xṮr_fvb,(˝‰Y8R w yOSy #4.O'NBIֹ. *w1/"s&{,#@A.z$IHZ i2;3G.,*,Ȳ ,ڝAzHn xisUexx)R{fF*%"*$X u*9b|o{/@#fHX-KE͉gONcvn|(@8TY|~97t0ϯ^=so ADqf-"JHU$,--m^{`aaavrrOZON !뛙z}#͛ή6,"+++fYv;>6 !C%쉈S|ʕ[7:ZZzWb8ljgw3 QpNAXIENDB`wicd-1.7.2.4/images/both-good-signal-lock.png0000664000175000017500000000201211635330115021042 0ustar daviddavid00000000000000PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8ke?;vcCIX==x ^,s`IOOB J%TDCŘ]Mٙy}<&يϲ||["b*]cvTu3A``9ujY4Mqa\\ysIVADБ1m,\92<2< ~`D"&m]Pe1VD@R+Gx; It˲Ͽ[?B=ooG{䪼*pw$I8sư[K|l@Pr PG,&)N[*q<6r(uK2E5{ak̻9i#(ZnCP ptb #Ÿzvjh?.wGS:0P^A˕Vmce${߿wT].ev &NsQ*$T,"Xk[aH~AJWԩ:5 (6P챰*A)[!0D<8c48lۯD0@v=ڱHh58zb:6Jl,ofyl%?ƍ[8{W^[[fTtTB$z_DHժ 9sd~~kϞ>9s&P ˲#鉉ϯ_5"9.Y///a;w1̲, 'BW({aU~x>#|v,m*\w,; Zۿj/IN:IENDB`wicd-1.7.2.4/images/signal-25.png0000664000175000017500000000301111635330115016460 0ustar daviddavid00000000000000PNG  IHDR3JgsRGBbKGD pHYs B(xtIME 0FIDATXXMk$=Uj4ƐOq18,.{]VY/m !3``3fE閦RW{ޓEWE1B2yի I\ǟ/䉩%Չb<-f~qGeijF`4|Ƶ? @MGr@rLUgCORH$=sPU6X]1s~PD@ !T"r""S90&*"B*")|/F{++杷߽4é w?6c3jI8)gh:=9;z7p;X]jfN$cK$$3=w$;>p-3Romm_u1",HV 9MoiRD\DbÓ,xǓsFed @A}w4U;wn ͭE]q}sweY;o~.pg:dRcUU,8Noƽg汈PD´Q}$>o_d677~Ğ˗ L fYvRxy$)r}#{'_[[\.4\\&J2RJY߿r9ɮ/֪ZgHs &}̞3凜~+-*]ppn CpsDrCH}wK7%,ʹܩ@)"d8kl8\j~?{9t.Ӗ4r>-}_U2·t&Yl檧Lp-_׿=*ppfG r8!#~GZ&2YYgLi >B˔Ri&]&^SGgNl8[W8{M\'nH@( UU0('u|Daac<tz1$qJ@u1mZܔ f1Aqc8C9 !<9'LƇ g&{B3{j`JSceiY!7a@'Cv&XU;u TYLufz5 ! yަH $ݺ~sbs4FQ UUJYl29| #5^eS6桋lffv'⭍g^><wooXU[unwBT wl1fc̘R˫om->P3jh+scOw}%F-RJb,`F{n=uꊪN)rU(ݍ̌ U/̐IENDB`wicd-1.7.2.4/vcsinfo.py0000664000175000017500000000115111747563545015053 0ustar daviddavid00000000000000#!/usr/bin/env python """This file is automatically generated by generate_version_info It uses the current working tree to determine the revision. So don't edit it. :) """ version_info = {'branch_nick': u'wicd', 'build_date': '2012-04-30 21:26:29 +0200', 'clean': None, 'date': '2012-04-30 21:26:10 +0200', 'revision_id': 'd.paleino@gmail.com-20120430192610-0eblawm4gmxvwn44', 'revno': '768'} revisions = {} file_revisions = {} if __name__ == '__main__': print 'revision: %(revno)s' % version_info print 'nick: %(branch_nick)s' % version_info print 'revision id: %(revision_id)s' % version_info wicd-1.7.2.4/uninstall.sh0000775000175000017500000000471711635330115015372 0ustar daviddavid00000000000000#!/bin/bash # Copyright 2008 Robby Workman , Northport, AL, USA # Copyright 2008 Alan Hicks , Lizella, GA, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. CWD=$(pwd) INSTALL_LOG=${INSTALL_LOG:-"$CWD/install.log"} UNINSTALL_LOG=${UNINSTALL_LOG:-"$CWD/uninstall.log"} DIR_LIST=$(mktemp) FILE_LIST=$(mktemp) trap "do_cleanup ; exit 0" EXIT; trap "do_cleanup ; exit 1" SIGINT SIGTERM; error_nolog() { echo "There does not appear to be an installation log present, most" echo "likely because you did not install Wicd from this directory." do_cleanup exit 1 } do_success() { echo "You have successfully uninstalled Wicd." echo "Configuration files added after installation were NOT removed." exit 0 } get_contents() { while read LINE ; do if [ -d "$LINE" ]; then # $LINE is a directory echo "$LINE" >> "$DIR_LIST" else # $LINE is a file or symlink or the like echo "$LINE" >> "$FILE_LIST" fi # Now handle parent directories RECURSE=true while [ "$RECURSE" = "true" ]; do LINE="$(dirname $LINE)" if [ ! "$LINE" = "/" ]; then echo "$LINE" >> "$DIR_LIST" else RECURSE=false fi done done < $INSTALL_LOG } do_uninstall() { cat $FILE_LIST | xargs rm -f &> $UNINSTALL_LOG cat $DIR_LIST | sort -ur | xargs rmdir &> $UNINSTALL_LOG } do_cleanup() { rm -f $FILE_LIST $DIR_LIST 2>/dev/null } [ -e $INSTALL_LOG ] || error_nolog get_contents do_uninstall do_cleanup do_success wicd-1.7.2.4/man/0000775000175000017500000000000011747563546013610 5ustar daviddavid00000000000000wicd-1.7.2.4/man/nl/0000775000175000017500000000000011747563546014221 5ustar daviddavid00000000000000wicd-1.7.2.4/man/nl/wicd-client.10000664000175000017500000000121111654454272016470 0ustar daviddavid00000000000000.TH WICD-CLIENT "1" "June 2009" .SH NAME wicd-client \- frontend voor de WICD daemon .SH BESCHRIJVING draadloos (en vast) verbindingen daemon front\-end. Als \fBwicd-curses\fR is geïnstalleerd en je probeert wicd-client uit te voeren zonder een actieve X server in de huidige terminal, wicd-client probeert \fBwicd-curses\fR in plaats daarvan te starten. Hij zal je waarschuwen als dit de eerste keer gebeurt. .SH OPTIES .TP .B \-n, \-\-no\-tray Start Wicd zonder het tray icon. .TP .B \-h, \-\-help Print deze helptekst. .TP .B \-a, \-\-no\-animate Start de tray icon zonder netwerkgebruik animaties. .SH ZIE OOK .BR wicd-curses (8) .BR wicd (8) wicd-1.7.2.4/man/wicd-client.10000664000175000017500000000125111654454272016063 0ustar daviddavid00000000000000.TH WICD-CLIENT "1" "November 2011" .SH NAME wicd-client \- frontend to the WICD daemon .SH DESCRIPTION wireless (and wired) connection daemon front\-end. If \fBwicd-curses\fR is installed, and you attempt to run wicd-client without an active X server on the current terminal, wicd-client will attempt to run \fBwicd-curses\fR instead. It will warn you the first time this happens. .SH OPTIONS .TP .B \-t, \-\-tray Run the wicd tray icon only. .TP .B \-n, \-\-no\-tray Run wicd without the tray icon. .TP .B \-h, \-\-help Print this help information. .TP .B \-a, \-\-no\-animate Run the tray without network traffic tray animations. .SH SEE ALSO .BR wicd-curses (8) .BR wicd (8) wicd-1.7.2.4/AUTHORS0000664000175000017500000000022011656523156014067 0ustar daviddavid00000000000000Adam Blackburn (compwiz18@gmail.com) Dan O'Reilly (oreilldf@gmail.com) Andrew Psaltis (ampsaltis@gmail.com) David Paleino (d.paleino@gmail.com) wicd-1.7.2.4/MANIFEST.in0000664000175000017500000000061311741372575014565 0ustar daviddavid00000000000000include AUTHORS include CHANGES include INSTALL include LICENSE include MANIFEST.in include NEWS include README include uninstall.sh include vcsinfo.py graft cli graft curses graft data graft encryption graft in graft other graft po graft tests graft wicd recursive-include man wicd-client.1 recursive-include . *.py recursive-include . *.png prune build/ prune .bzr* prune .git* prune *.log wicd-1.7.2.4/NEWS0000664000175000017500000001635011747563461013535 0ustar daviddavid00000000000000Wicd 1.7 Series --------------- 1.7.2.4: Minor Changes: - Really fix local privilege escalation (CVE-2012-2095). - Removed unmaintained language variants. 1.7.2.3: Minor Changes: - Fixed crash of wicd-curses with (again) UTF-8 locales. This should fix it all now. Hopefully. 1.7.2.2: Minor Changes: - Encryption templates were broken by the fix for CVE-2012-2095; fixed. 1.7.2.1: Minor Changes: - Fix typo in wicd-curses, which made it crash with UTF-8 locales. 1.7.2: Major Changes: - Fix local privilege escalation when setting configuration properties through the daemon's DBus interface (CVE-2012-2095). - Support passing no driver to wpa_supplicant. Minor Changes: - Fixed installation instructions, with the new >= 1.7.1 commands. - Fixed typo preventing DHCP hostname from properly working. - Renamed wpa templates to clarify usage. - Fixed wicd-cli crash when switching wired network profiles. - Fallback to mode 'Master' if 'None' is detected when scanning wifi networks. - Fixed bug when trying to start wicd multiple times. - Fixed wicd-curses crash when trying to select wired encryption type, thanks to Joe MacMahon. - Fixed wicd-curses crash with UTF-8 encryption types. - Fixed wicd-daemon crash when child_pid is undefined, thanks to David Cantrell. 1.7.1: Changes for Packagers: - You will now want to use the --python option to setup.py configure to make sure the right Python (python2.x) is used. With the Python 3 transition in progress, the lack of uniformity across distros made it difficult to find a solution that works everywhere. As a result, the python executable path can be set (for subprocesses launched by Wicd) with the --python option to setup.py configure, and patching of the shebang lines may be required if `which python` is not python2.x. - If you handle translations in your packaging process, setup.py now needs 'pybabel' and 'xgettext' binaries. Please provide them during the build process. - setup.py now accepts three more parameters: --dbus-service=, --systemd= and --logrotate=. Please set them accordingly to the paths of your distribution. Major Changes: - (New) upstream author: David Paleino :) - The translations are now handled by Rosetta, in Launchpad. - Implemented support for wired connections needing authentication with wpa_supplicant (thanks Joe MacMahon!) - Support 'Never show networks' (thanks Robin Becker!) - Mask out sensitive information in the logfile (CVE-2012-0813) Minor Changes: - Now uses gtkbuilder instead of libglade - Fixed bug in script macro expansion - Fixed typo in EAP-fast template - Applied 1 patch from Archlinux (thanks Rémy Oudompheng) - Fixed Python 2.7 support - Works if Python3 is the default Python - Applied 14 patches from Debian (big thank you to everyone who contributed): - Includes translations in source tarball - Improved documentation - Fixed resolv.conf permissions - Ignore configparser errors - Several others, please see CHANGES for more details - Proper localization of all the code has been put in place -- every part of the UIs and the daemon should be translated/translatable now! - Fixed various bugs with 'unicode in ESSID' handling - Implemented rfkill-support - Generalized libc linking using ctypes' find_library() - Fixed wireless connecting status message, now shows the correct ESSID - Support wifi-channels with more than 2 digits - Implemented in-GUI password hiding - Implemented -t/--tray to only run the wicd-gtk tray icon - Support alternative ifconfig output style 1.7.0: Changes for Packagers: - Wicd now supports a -k option, which should be run by the init script when the daemon is stopped to release the DHCP lease but should not be run on a restart of the daemon. - The ability has been added to split Wicd's components into multiple directories. Use --gtk, --cli, --curses, and --daemon to setup.py configure to specify the locations of the respective components. - The preferred way to run the GTK UI is now to use wicd-gtk, not wicd-client. wicd-gtk is a new addition to 1.7 that will never run wicd-curses. wicd-client will automatically decide to run wicd-curses if there is no X session available. Major Changes: - Connection information is available by right clicking the tray icon - Can set the hostname per network for all DHCP clients - urwid 0.9.9 is now supported - Added wicd-cli, a command line interface for use in scripts - Global scripts are now passed parameters specifying the network Minor Changes: - Support for only displaying notifications using -o to wicd-client - Reconnecting now works when measuring signal strength in dBm - ESSIDs made of numbers now work properly - All valid wpa_supplicant drivers are now displayed - Wired network is now displayed while scanning wireless networks - Added wicd-gtk, a command to always and only run the GTK UI - Marked ioctl backend not supported - Use dhcpcd-bin on Debian instead of dhcpcd script Wicd 1.6 Series --------------- 1.6.2: Minor Changes: - Now deals better if the interface disappears while running - Will now start if the global script directories don't exist - Adhoc window will now work correctly - PSK can be generated from non-ASCII characters - Fix a minor wicd-curses crash while connecting during a scan 1.6.1: Minor Changes: - User is told if the lack permission to access the daemon - Support for wireless cards that don't report signal strength added - Enhanced network configuration dialog title 1.6.0: Major Changes: - Improved tray icon and GUI images (thanks to Martin Sagastume) - Reorganized network list in the GUI for easier navigation - New experimental ioctl backend, which is more cpu-friendly than the previous one - Added a curses client (thanks to Andrew Psaltis) - Added a right-click connection menu to the tray icon - Added options to specify a DNS domain and search domain for static networks - Reworked the Preferences menu to be more in line with GNOME standards - Added support for global scripts - Made it possible to have optional entries in encryption templates - Added ability to show libnotify notifications on status change Minor Changes and Other Enhancements: - Better autoconnection behavior - Tray/GUI will survive the daemon being killed - Reasons for connection failures will now bubble back to the GUI - Add/remove wired profile system is now more user-friendly - Support for using resolvconf instead of directly editing /etc/resolv.conf - Wicd won't blindly kill dhcp clients / wpa_supplicant any more - Added an option to automatically switch from a wireless network to a wired one as soon as a cable is plugged in - Moved scanning to its own thread, which makes GUI and daemon more responsive during scans - Made it possible to specify macros in script entries - The GUI will now display the encryption entry dialog if you attempt to connect to an encrypted network without entering a password - Static gateway entry is now optional - Passwords with leading or trailing whitespace are now stored properly - Many init/config script, man page, and setup.py fixes/updates, including better autodetection of file placement with regard to sleep hooks and KDE autostart files (thanks to Robby Workman) wicd-1.7.2.4/INSTALL0000664000175000017500000000521411713522402014043 0ustar daviddavid00000000000000Installation of Wicd should be done using your distribution package if one exists. If not, the installation is relatively straightforward, but there are a few dependencies: 1. python (>=2.4, <3.0) 2. pygtk (>=2.10) 2. dbus and its glib and python bindings 3. a dhcp client (dhclient, dhcpcd, and pump are supported) 4. wireless-tools (iwlist, iwconfig, etcetera) 5. net-tools (ip, route, etcetera) 6. a graphical sudo application (gksu, kdesu, and ktsuss are supported), while optional, is strongly recommended 7. urwid (if you want to use the curses client - needs version >=0.9.8.3) 8. pm-utils (optional for suspend/resume integration) Wicd supports using versions >=1.2.4 -- earlier versions may work just fine, but they are completely unsupported here. 9. pybabel Next, configure Wicd for installation. Wicd will, by default, follow the FHS guidelines (or distribution standards where applicable if we know about them and it's feasible to implement them). You can specify exactly where every non-Python file (and some Python files) in Wicd will be placed. Pass "--help" as an option to the following command for more information, otherwise run it as is to configure Wicd for installation. python setup.py configure Note that setup.py will try to determine if and where to install the autostart desktop file for kde (either kde3 or kde4, but not both) and where to install the sleep hook for pm-utils. If you want native language translations, please remember to run: python setup.py compile_translations before the next step. Finally, do the actual installation. This step will need to be done as root or with sudo in most cases: python setup.py install If you are packaging Wicd, you will almost surely want to use the "--root" option; for example: python setup.py install --root=/package-dir To uninstall, you can use (using root or sudo): python setup.py uninstall You *MUST* run "python setup.py configure" before "python setup.py install" - the "configure" step generates wpath.py from wpath.py.in using the paths specified from the arguments to "python setup.py configure". As noted above in the configure step, "python setup.py configure" will use acceptable defaults, so it is usually not necessary to specify any arguments at all. After installation, especially if Wicd has not been installed before, you will probably need to restart the system message bus (dbus) or reload its configuration. You will also need to make sure the Wicd init script is started at boot. How to do those things is distribution-dependent, so if you're not sure, ask in your distribution's support area(s). wicd-1.7.2.4/setup.cfg0000664000175000017500000000012211647120276014635 0ustar daviddavid00000000000000[install] record = install.log [bdist_rpm] group = Productivity/Networking/System wicd-1.7.2.4/PKG-INFO0000664000175000017500000000152111747563546014131 0ustar daviddavid00000000000000Metadata-Version: 1.0 Name: wicd Version: 1.7.2.4 Summary: A wireless and wired network manager Home-page: https://launchpad.net/wicd Author: Adam Blackburn, Dan O'Reilly, Andrew Psaltis, David Paleino Author-email: compwiz18@gmail.com, oreilldf@gmail.com, ampsaltis@gmail.com, d.paleino@gmail.com License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html Description: A complete network connection manager Wicd supports wired and wireless networks, and capable of creating and tracking profiles for both. It has a template-based wireless encryption system, which allows the user to easily add encryption methods used. It ships with some common encryption types, such as WPA and WEP. Wicd will automatically connect at startup to any preferred network within range. Platform: UNKNOWN wicd-1.7.2.4/gtk/0000775000175000017500000000000011747563546013622 5ustar daviddavid00000000000000wicd-1.7.2.4/gtk/wicd-client.py0000644000175000017500000011720611715710103016355 0ustar daviddavid00000000000000#!/usr/bin/env python """ wicd - wireless connection daemon frontend implementation This module implements a usermode frontend for wicd. It updates connection information, provides an (optional) tray icon, and allows for launching of the wicd GUI and Wired Profile Chooser. class TrayIcon() -- Parent class of TrayIconGUI and IconConnectionInfo. class TrayConnectionInfo() -- Child class of TrayIcon which provides and updates connection status. class TrayIconGUI() -- Child class of TrayIcon which implements the tray. icon itself. Parent class of StatusTrayIconGUI and EggTrayIconGUI. class StatusTrayIconGUI() -- Implements the tray icon using a gtk.StatusIcon. class EggTrayIconGUI() -- Implements the tray icon using egg.trayicon. def usage() -- Prints usage information. def main() -- Runs the wicd frontend main loop. """ # # Copyright (C) 2007 - 2009 Adam Blackburn # Copyright (C) 2007 - 2009 Dan O'Reilly # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # import sys import gtk import gobject import getopt import os import pango import time import atexit from dbus import DBusException import pygtk pygtk.require('2.0') HAS_NOTIFY = True try: import pynotify if not pynotify.init("Wicd"): HAS_NOTIFY = False except ImportError: HAS_NOTIFY = False # Wicd specific imports from wicd import wpath from wicd import misc from wicd import dbusmanager import gui from guiutil import error, can_use_notify from wicd.translations import _ ICON_AVAIL = True USE_EGG = False # Import egg.trayicon if we're using an older gtk version if not hasattr(gtk, "StatusIcon"): try: import egg.trayicon USE_EGG = True except ImportError: print 'Unable to load tray icon: Missing both egg.trayicon and gtk.StatusIcon modules.' ICON_AVAIL = False misc.RenameProcess("wicd-client") if __name__ == '__main__': wpath.chdir(__file__) daemon = wireless = wired = lost_dbus_id = None DBUS_AVAIL = False def catchdbus(func): def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except DBusException, e: if e.get_dbus_name() != None and "DBus.Error.AccessDenied" in e.get_dbus_name(): error(None, _('Unable to contact the Wicd daemon due to an access denied error from DBus. Please check that your user is in the $A group.').replace("$A",""+wpath.wicd_group+"")) #raise raise DBusException(e) else: print "warning: ignoring exception %s" % e return None wrapper.__name__ = func.__name__ wrapper.__module__ = func.__module__ wrapper.__dict__ = func.__dict__ wrapper.__doc__ = func.__doc__ return wrapper class NetworkMenuItem(gtk.ImageMenuItem): def __init__(self, lbl, is_active=False): gtk.ImageMenuItem.__init__(self) self.label = gtk.Label(lbl) if is_active: atrlist = pango.AttrList() atrlist.insert(pango.AttrWeight(pango.WEIGHT_BOLD, 0, 50)) self.label.set_attributes(atrlist) self.label.set_justify(gtk.JUSTIFY_LEFT) self.label.set_alignment(0, 0) self.add(self.label) self.label.show() class TrayIcon(object): """ Base Tray Icon class. Base Class for implementing a tray icon to display network status. """ def __init__(self, animate, displaytray=True, displayapp=False): self.cur_sndbytes = -1 self.cur_rcvbytes = -1 self.last_sndbytes = -1 self.last_rcvbytes = -1 self.max_snd_gain = 10000 self.max_rcv_gain = 10000 if USE_EGG: self.tr = self.EggTrayIconGUI(self) else: self.tr = self.StatusTrayIconGUI(self) if displayapp: self.tr.toggle_wicd_gui() self.icon_info = self.TrayConnectionInfo(self, self.tr, animate) self.tr.icon_info = self.icon_info print 'displaytray %s' % displaytray self.tr.visible(displaytray) def is_embedded(self): if USE_EGG: raise NotImplementedError() else: return self.tr.is_embedded() def get_bandwidth_bytes(self): """ Gets the amount of byte sent sine the last time I checked """ dev_dir = '/sys/class/net/' iface = daemon.GetCurrentInterface() for fldr in os.listdir(dev_dir): if fldr == iface: dev_dir = dev_dir + fldr + "/statistics/" break try: self.cur_rcvbytes = int(open(dev_dir + "rx_bytes", "r").read().strip()) self.cur_sndbytes = int(open(dev_dir + "tx_bytes", "r").read().strip()) except: self.cur_sndbytes = -1 self.cur_rcvbytes = -1 class TrayConnectionInfo(object): """ Class for updating the tray icon status. """ def __init__(self, parent, tr, animate=True): """ Initialize variables needed for the icon status methods. """ self.last_strength = -2 self.still_wired = False self.network = '' self.tried_reconnect = False self.connection_lost_counter = 0 self.tr = tr self.last_sndbytes = -1 self.last_rcvbytes = -1 self.max_snd_gain = 10000 self.max_rcv_gain = 10000 self.animate = animate self.parent = parent self.network_name = '' # SSID self.network_type = 'none' # Wired/Wireless/None self.network_str = '' # Signal Strength self.network_addr = '0.0.0.0' # IP Address self.network_br = '' # Bitrate # keep track of the last state to provide appropriate # notifications self._last_bubble = None self.last_state = None self.should_notify = True if DBUS_AVAIL: self.update_tray_icon() else: handle_no_dbus() self.set_not_connected_state() # Initial update of the tooltip self.update_tooltip() def update_tooltip(self): """ Updates the trayicon tooltip based on current connection status """ if (self.network_type == "none"): self.tr.set_tooltip(_('Not connected')) elif (self.network_type == "wireless"): self.tr.set_tooltip(_('Connected to $A at $B (IP: $C)') .replace('$A', self.network_name) .replace('$B', self.network_str) .replace('$C', self.network_addr)) elif (self.network_type == "wired"): self.tr.set_tooltip(_('Connected to wired network (IP: $A)') .replace('$A', self.network_addr)) elif (self.network_type == "killswitch"): self.tr.set_tooltip(_('Not connected') + "(" + _('Wireless Kill Switch Enabled') + ")") elif (self.network_type == "no_daemon"): self.tr.set_tooltip(_('Wicd daemon unreachable')) return True def _show_notification(self, title, details, image=None): if self.should_notify: try: if not self._last_bubble: self._last_bubble = pynotify.Notification(title, details, image) self._last_bubble.show() else: self._last_bubble.clear_actions() self._last_bubble.clear_hints() self._last_bubble.update(title, details, image) self._last_bubble.show() except Exception, e: if hasattr(e, 'message') and e.message != '': msg = e.message elif hasattr(e, 'args') and len(e.args) > 0: msg = e.args[-1] else: msg = str(e) print "Exception during notification: %s" % msg self.should_notify = False @catchdbus def wired_profile_chooser(self): """ Launch the wired profile chooser. """ gui.WiredProfileChooser() daemon.SetNeedWiredProfileChooser(False) def set_wired_state(self, info): """ Sets the icon info for a wired state. """ wired_ip = info[0] self.network_addr = str(info[0]) self.network_type = "wired" self.tr.set_from_file(os.path.join(wpath.images, "wired.png")) # status_string = _('Connected to wired network (IP: $A)').replace('$A', #wired_ip) # self.tr.set_tooltip(status_string) self._show_notification(_('Wired Network'), _('Connection established'), 'network-wired') self.update_tooltip() @catchdbus def set_wireless_state(self, info): """ Sets the icon info for a wireless state. """ lock = '' wireless_ip = info[0] self.network = info[1] strength = info[2] cur_net_id = int(info[3]) sig_string = daemon.FormatSignalForPrinting(str(strength)) self.network_type = "wireless" self.network_addr = str(info[0]) self.network_name = info[1] self.network_str = sig_string self.network_br = info[4] self.set_signal_image(int(info[2]), lock) if wireless.GetWirelessProperty(cur_net_id, "encryption"): lock = "-lock" # status_string = (_('Connected to $A at $B (IP: $C)') #.replace('$A', self.network) # .replace('$B', sig_string) # .replace('$C', str(wireless_ip))) #self.tr.set_tooltip(status_string) self.set_signal_image(int(strength), lock) self._show_notification(self.network, _('Connection established'), 'network-wireless') self.update_tooltip() def set_connecting_state(self, info): """ Sets the icon info for a connecting state. """ wired = False if info[0] == 'wired' and len(info) == 1: cur_network = _('Wired Network') wired = True else: cur_network = info[1] status_string = _('Connecting') + " to " + \ cur_network + "..." self.update_tooltip() # self.tr.set_tooltip(status_string) self.tr.set_from_file(os.path.join(wpath.images, "no-signal.png")) if wired: self._show_notification(cur_network, _('Establishing connection...'), 'network-wired') else: self._show_notification(cur_network, _('Establishing connection...'), 'network-wireless') @catchdbus def set_not_connected_state(self, info=None): """ Set the icon info for the not connected state. """ self.tr.set_from_file(wpath.images + "no-signal.png") if not DBUS_AVAIL: status = _('Wicd daemon unreachable') elif wireless.GetKillSwitchEnabled(): status = (_('Not connected') + " (" + _('Wireless Kill Switch Enabled') + ")") else: status = _('Not connected') # self.tr.set_tooltip(status) self._show_notification(_('Disconnected'), None, 'stop') self.update_tooltip() @catchdbus def update_tray_icon(self, state=None, info=None): """ Updates the tray icon and current connection status. """ if not DBUS_AVAIL: return False if not state or not info: [state, info] = daemon.GetConnectionStatus() # should this state change display a notification? self.should_notify = (can_use_notify() and self.last_state != state) self.last_state = state if state == misc.WIRED: self.set_wired_state(info) elif state == misc.WIRELESS: self.set_wireless_state(info) elif state == misc.CONNECTING: self.set_connecting_state(info) elif state in (misc.SUSPENDED, misc.NOT_CONNECTED): self.set_not_connected_state(info) else: print 'Invalid state returned!!!' return False return True @catchdbus def set_signal_image(self, wireless_signal, lock): """ Sets the tray icon image for an active wireless connection. """ if self.animate: TrayIcon.get_bandwidth_bytes(self.parent) prefix = self.get_bandwidth_activity() else: prefix = 'idle-' if daemon.GetSignalDisplayType() == 0: if wireless_signal > 75: signal_img = "high-signal" elif wireless_signal > 50: signal_img = "good-signal" elif wireless_signal > 25: signal_img = "low-signal" else: signal_img = "bad-signal" else: if wireless_signal >= -60: signal_img = "high-signal" elif wireless_signal >= -70: signal_img = "good-signal" elif wireless_signal >= -80: signal_img = "low-signal" else: signal_img = "bad-signal" img_file = ''.join([wpath.images, prefix, signal_img, lock, ".png"]) self.tr.set_from_file(img_file) @catchdbus def get_bandwidth_activity(self): """ Determines what network activity state we are in. """ transmitting = False receiving = False dev_dir = '/sys/class/net/' wiface = daemon.GetWirelessInterface() for fldr in os.listdir(dev_dir): if fldr == wiface: dev_dir = dev_dir + fldr + "/statistics/" break try: rcvbytes = int(open(dev_dir + "rx_bytes", "r").read().strip()) sndbytes = int(open(dev_dir + "tx_bytes", "r").read().strip()) except IOError: sndbytes = None rcvbytes = None if not rcvbytes or not sndbytes: return 'idle-' # Figure out receiving data info. activity = self.is_network_active(self.parent.cur_rcvbytes, self.parent.max_rcv_gain, self.parent.last_rcvbytes) receiving = activity[0] self.parent.max_rcv_gain = activity[1] self.parent.last_rcvbytes = activity[2] # Figure out out transmitting data info. activity = self.is_network_active(self.parent.cur_sndbytes, self.parent.max_snd_gain, self.parent.last_sndbytes) transmitting = activity[0] self.parent.max_snd_gain = activity[1] self.parent.last_sndbytes = activity[2] if transmitting and receiving: return 'both-' elif transmitting: return 'transmitting-' elif receiving: return 'receiving-' else: return 'idle-' def is_network_active(self, bytes, max_gain, last_bytes): """ Determines if a network is active. Determines if a network is active by looking at the number of bytes sent since the previous check. This method is generic, and can be used to determine activity in both the sending and receiving directions. Returns: A tuple containing three elements: 1) a boolean specifying if the network is active. 2) an int specifying the maximum gain the network has had. 3) an int specifying the last recorded number of bytes sent. """ active = False if last_bytes == -1: last_bytes = bytes elif bytes > (last_bytes + float(max_gain / 20.0)): last_bytes = bytes active = True gain = bytes - last_bytes if gain > max_gain: max_gain = gain return (active, max_gain, last_bytes) class TrayIconGUI(object): """ Base Tray Icon UI class. Implements methods and variables used by both egg/StatusIcon tray icons. """ def __init__(self, parent): menu = """ """ actions = [ ('Menu', None, 'Menu'), ('Connect', gtk.STOCK_CONNECT, _('Connect')), ('Info', gtk.STOCK_INFO, _('_Connection Info'), None, _('Information about the current connection'), self.on_conn_info), ('Quit',gtk.STOCK_QUIT,_('_Quit'),None,_('Quit wicd-tray-icon'), self.on_quit), ] actg = gtk.ActionGroup('Actions') actg.add_actions(actions) self.manager = gtk.UIManager() self.manager.insert_action_group(actg, 0) self.manager.add_ui_from_string(menu) self.menu = (self.manager.get_widget('/Menubar/Menu/Quit'). props.parent) self.gui_win = None self.current_icon_path = None self._is_scanning = False net_menuitem = self.manager.get_widget("/Menubar/Menu/Connect/") net_menuitem.connect("activate", self.on_net_menu_activate) self.parent = parent self.time = 2 # Time between updates self.cont = 'Stop' self.conn_info_txt = '' def tray_scan_started(self): """ Callback for when a wireless scan is started. """ if not DBUS_AVAIL: return self._is_scanning = True self.init_network_menu() def tray_scan_ended(self): """ Callback for when a wireless scan finishes. """ if not DBUS_AVAIL: return self._is_scanning = False self.populate_network_menu() def on_activate(self, data=None): """ Opens the wicd GUI. """ if DBUS_AVAIL: self.toggle_wicd_gui() else: # error(None, _('The wicd daemon is unavailable, so your request cannot be completed')) pass def on_quit(self, widget=None): """ Closes the tray icon. """ sys.exit(0) def on_about(self, data=None): """ Opens the About Dialog. """ dialog = gtk.AboutDialog() dialog.set_name('Wicd Tray Icon') dialog.set_version('2.0') dialog.set_comments('An icon that shows your network connectivity') dialog.set_website('http://wicd.net') dialog.run() dialog.destroy() def on_conn_info(self, data=None): """ Opens the Connection Information Dialog """ window = gtk.Dialog("Wicd Connection Info", None, 0, (gtk.STOCK_OK, gtk.RESPONSE_CLOSE)) # Create labels self.label = gtk.Label() self.data = gtk.Label() self.data.set_selectable(True) self.label.show() self.data.show() self.list = [] self.list.append(self.data) self.list.append(self.label) # Setup table table = gtk.Table(1,2) table.set_col_spacings(12) table.attach(self.label, 0, 1, 0, 1) table.attach(self.data, 1, 2, 0 ,1) # Setup Window content = window.get_content_area() content.pack_start(table, True, True, 0) content.show_all() # Start updates self.cont = 'Go' gobject.timeout_add(5000, self.update_conn_info_win, self.list) self.update_conn_info_win(self.list) window.run() # Destroy window and stop updates window.destroy() self.cont = 'Stop' def update_conn_info_win(self, list): """ Updates the information in the connection summary window """ if (self.cont == "Stop"): return False [state, info] = daemon.GetConnectionStatus() [rx, tx] = self.get_current_bandwidth() # Choose info for the data if state == misc.WIRED: text = (_('''$A $B KB/s $C KB/s''') .replace('$A', str(info[0])) #IP .replace('$B', str(rx)) #RX .replace('$C', str(tx))) #TX elif state == misc.WIRELESS: text = (_('''$A $B $C $D $E KB/s $F KB/s''') .replace('$A', str(info[1])) #SSID .replace('$B', str(info[4])) #Speed .replace('$C', str(info[0])) #IP .replace('$D', daemon.FormatSignalForPrinting(str(info[2]))) .replace('$E', str(rx)) .replace('$F', str(tx))) else: text = '' # Choose info for the labels self.list[0].set_text('\n' + text) if state == misc.WIRED: self.list[1].set_text(_('''Wired IP: RX: TX:''')) elif state == misc.WIRELESS: self.list[1].set_text(_('''Wireless SSID: Speed: IP: Strength: RX: TX:''')) elif state == misc.CONNECTING: self.list[1].set_text(_('Connecting')) elif state in (misc.SUSPENDED, misc.NOT_CONNECTED): self.list[1].set_text(_('Disconnected')) return True def get_current_bandwidth(self): """ Calculates the current bandwidth based on sent/received bytes divided over time. Unit is in KB/s """ self.parent.get_bandwidth_bytes() rxb = self.parent.cur_rcvbytes - self.parent.last_rcvbytes txb = self.parent.cur_sndbytes - self.parent.last_sndbytes self.parent.last_rcvbytes = self.parent.cur_rcvbytes self.parent.last_sndbytes = self.parent.cur_sndbytes rx_rate = float(rxb / (self.time * 1024)) tx_rate = float(txb / (self.time * 1024)) return (rx_rate, tx_rate) def _add_item_to_menu(self, net_menu, lbl, type_, n_id, is_connecting, is_active): """ Add an item to the network list submenu. """ def network_selected(widget, net_type, net_id): """ Callback method for a menu item selection. """ if net_type == "__wired__": wired.ConnectWired() else: wireless.ConnectWireless(net_id) item = NetworkMenuItem(lbl, is_active) image = gtk.Image() if type_ == "__wired__": image.set_from_icon_name("network-wired", 2) else: pb = gtk.gdk.pixbuf_new_from_file_at_size(self._get_img(n_id), 20, 20) image.set_from_pixbuf(pb) del pb item.set_image(image) del image item.connect("activate", network_selected, type_, n_id) net_menu.append(item) item.show() if is_connecting: item.set_sensitive(False) del item @catchdbus def _get_img(self, net_id): """ Determines which image to use for the wireless entries. """ def fix_strength(val, default): """ Assigns given strength to a default value if needed. """ return val and int(val) or default def get_prop(prop): return wireless.GetWirelessProperty(net_id, prop) strength = fix_strength(get_prop("quality"), -1) dbm_strength = fix_strength(get_prop('strength'), -100) if daemon.GetWPADriver() == 'ralink legacy' or \ daemon.GetSignalDisplayType() == 1: if dbm_strength >= -60: signal_img = 'signal-100.png' elif dbm_strength >= -70: signal_img = 'signal-75.png' elif dbm_strength >= -80: signal_img = 'signal-50.png' else: signal_img = 'signal-25.png' else: if strength > 75: signal_img = 'signal-100.png' elif strength > 50: signal_img = 'signal-75.png' elif strength > 25: signal_img = 'signal-50.png' else: signal_img = 'signal-25.png' return wpath.images + signal_img @catchdbus def on_net_menu_activate(self, item): """ Trigger a background scan to populate the network menu. Called when the network submenu is moused over. We sleep briefly, clear pending gtk events, and if we're still being moused over we trigger a scan. This is to prevent scans when the user is just mousing past the menu to select another menu item. """ def dummy(x=None): pass if self._is_scanning: return True self.init_network_menu() gobject.timeout_add(800, self._trigger_scan_if_needed, item) @catchdbus def _trigger_scan_if_needed(self, item): """ Trigger a scan if the network menu is being hovered over. """ while gtk.events_pending(): gtk.main_iteration() if item.state != gtk.STATE_PRELIGHT: return True wireless.Scan(False) return False @catchdbus def populate_network_menu(self, data=None): """ Populates the network list submenu. """ def get_prop(net_id, prop): return wireless.GetWirelessProperty(net_id, prop) net_menuitem = self.manager.get_widget("/Menubar/Menu/Connect/") submenu = net_menuitem.get_submenu() self._clear_menu(submenu) if not DBUS_AVAIL: net_menuitem.show() return is_connecting = daemon.CheckIfConnecting() num_networks = wireless.GetNumberOfNetworks() [status, info] = daemon.GetConnectionStatus() if daemon.GetAlwaysShowWiredInterface() or \ wired.CheckPluggedIn(): if status == misc.WIRED: is_active = True else: is_active = False self._add_item_to_menu(submenu, "Wired Network", "__wired__", 0, is_connecting, is_active) sep = gtk.SeparatorMenuItem() submenu.append(sep) sep.show() if num_networks > 0: skip_never_connect = not daemon.GetShowNeverConnect() for x in xrange(0, num_networks): if skip_never_connect and misc.to_bool(get_prop(x,"never")): continue essid = get_prop(x, "essid") if status == misc.WIRELESS and info[1] == essid: is_active = True else: is_active = False self._add_item_to_menu(submenu, essid, "wifi", x, is_connecting, is_active) else: no_nets_item = gtk.MenuItem(_('No wireless networks found.')) no_nets_item.set_sensitive(False) no_nets_item.show() submenu.append(no_nets_item) net_menuitem.show() def init_network_menu(self): """ Set the right-click network menu to the scanning state. """ net_menuitem = self.manager.get_widget("/Menubar/Menu/Connect/") submenu = net_menuitem.get_submenu() self._clear_menu(submenu) loading_item = gtk.MenuItem(_('Scanning') + "...") loading_item.set_sensitive(False) loading_item.show() submenu.append(loading_item) net_menuitem.show() def _clear_menu(self, menu): """ Clear the right-click menu. """ for item in menu.get_children(): menu.remove(item) item.destroy() def toggle_wicd_gui(self): """ Toggles the wicd GUI. """ if not self.gui_win: self.gui_win = gui.appGui(tray=self) elif not self.gui_win.is_visible: self.gui_win.show_win() else: self.gui_win.exit() return True if USE_EGG: class EggTrayIconGUI(TrayIconGUI): """ Tray Icon for gtk < 2.10. Uses the deprecated egg.trayicon module to implement the tray icon. Since it relies on a deprecated module, this class is only used for machines running versions of GTK < 2.10. """ def __init__(self, parent): """Initializes the tray icon""" TrayIcon.TrayIconGUI.__init__(self, parent) self.tooltip = gtk.Tooltips() self.eb = gtk.EventBox() self.tray = egg.trayicon.TrayIcon("WicdTrayIcon") self.pic = gtk.Image() self.tooltip.set_tip(self.eb, "Initializing wicd...") self.pic.set_from_file(wpath.images + "no-signal.png") self.eb.connect('button_press_event', self.tray_clicked) self.eb.add(self.pic) self.tray.add(self.eb) self.tray.show_all() def tray_clicked(self, widget, event): """ Handles tray mouse click events. """ if event.button == 1: self.toggle_wicd_gui() elif event.button == 3: self.init_network_menu() self.menu.popup(None, None, None, event.button, event.time) def set_from_file(self, val=None): """ Calls set_from_file on the gtk.Image for the tray icon. """ self.pic.set_from_file(val) def set_tooltip(self, val): """ Set the tooltip for this tray icon. Sets the tooltip for the gtk.ToolTips associated with this tray icon. """ self.tooltip.set_tip(self.eb, val) def visible(self, val): """ Set if the icon is visible or not. If val is True, makes the icon visible, if val is False, hides the tray icon. """ if val: self.tray.show_all() else: self.tray.hide_all() if hasattr(gtk, "StatusIcon"): class StatusTrayIconGUI(gtk.StatusIcon, TrayIconGUI): """ Class for creating the wicd tray icon on gtk > 2.10. Uses gtk.StatusIcon to implement a tray icon. """ def __init__(self, parent): TrayIcon.TrayIconGUI.__init__(self, parent) gtk.StatusIcon.__init__(self) self.current_icon_path = '' self.set_visible(True) self.connect('activate', self.on_activate) self.connect('popup-menu', self.on_popup_menu) self.set_from_file(wpath.images + "no-signal.png") self.set_tooltip("Initializing wicd...") def on_popup_menu(self, status, button, timestamp): """ Opens the right click menu for the tray icon. """ self.init_network_menu() self.menu.popup(None, None, None, button, timestamp) def set_from_file(self, path=None): """ Sets a new tray icon picture. """ if path != self.current_icon_path: self.current_icon_path = path gtk.StatusIcon.set_from_file(self, path) def visible(self, val): """ Set if the icon is visible or not. If val is True, makes the icon visible, if val is False, hides the tray icon. """ self.set_visible(val) def usage(): """ Print usage information. """ print """ wicd %s wireless (and wired) connection daemon front-end. Arguments: \t-t\t--tray\tRun the wicd tray icon only. \t-n\t--no-tray\tRun wicd without the tray icon. \t-h\t--help\t\tPrint this help information. \t-a\t--no-animate\tRun the tray without network traffic tray animations. \t-o\t--only-notifications\tDon't display anything except notifications. """ % wpath.version def setup_dbus(force=True): global daemon, wireless, wired, DBUS_AVAIL, lost_dbus_id print "Connecting to daemon..." try: dbusmanager.connect_to_dbus() except DBusException: if force: print "Can't connect to the daemon, trying to start it automatically..." misc.PromptToStartDaemon() try: dbusmanager.connect_to_dbus() except DBusException: error(None, _("Could not connect to wicd's D-Bus interface. Check the wicd log for error messages.")) return False else: return False if lost_dbus_id: gobject.source_remove(lost_dbus_id) lost_dbus_id = None dbus_ifaces = dbusmanager.get_dbus_ifaces() daemon = dbus_ifaces['daemon'] wireless = dbus_ifaces['wireless'] wired = dbus_ifaces['wired'] DBUS_AVAIL = True print "Connected." return True def on_exit(): if DBUS_AVAIL: try: daemon.SetGUIOpen(False) except DBusException: pass def handle_no_dbus(): """ Called when dbus announces its shutting down. """ global DBUS_AVAIL, lost_dbus_id DBUS_AVAIL = False gui.handle_no_dbus(from_tray=True) print "Wicd daemon is shutting down!" lost_dbus_id = misc.timeout_add(5, lambda:error(None, _('The wicd daemon has shut down. The UI will not function properly until it is restarted.'), block=False)) return False @catchdbus def main(argv): """ The main frontend program. Keyword arguments: argv -- The arguments passed to the script. """ try: opts, args = getopt.getopt(sys.argv[1:], 'tnhao', ['help', 'no-tray', 'tray', 'no-animate', 'only-notifications']) except getopt.GetoptError: # Print help information and exit usage() sys.exit(2) use_tray = True animate = True display_app = True for opt, a in opts: if opt in ('-h', '--help'): usage() sys.exit(0) elif opt in ('-t', '--tray'): display_app = False elif opt in ('-n', '--no-tray'): use_tray = False elif opt in ('-a', '--no-animate'): animate = False elif opt in ('-o', '--only-notifications'): print "only displaying notifications" use_tray = False display_app = False else: usage() sys.exit(2) print 'Loading...' setup_dbus() atexit.register(on_exit) if display_app and not use_tray or not ICON_AVAIL: the_gui = gui.appGui(standalone=True) mainloop = gobject.MainLoop() mainloop.run() sys.exit(0) # Set up the tray icon GUI and backend tray_icon = TrayIcon(animate, displaytray=use_tray, displayapp=display_app) # Check to see if wired profile chooser was called before icon # was launched (typically happens on startup or daemon restart). if DBUS_AVAIL and daemon.GetNeedWiredProfileChooser(): daemon.SetNeedWiredProfileChooser(False) tray_icon.icon_info.wired_profile_chooser() bus = dbusmanager.get_bus() bus.add_signal_receiver(tray_icon.icon_info.wired_profile_chooser, 'LaunchChooser', 'org.wicd.daemon') bus.add_signal_receiver(tray_icon.icon_info.update_tray_icon, 'StatusChanged', 'org.wicd.daemon') bus.add_signal_receiver(tray_icon.tr.tray_scan_ended, 'SendEndScanSignal', 'org.wicd.daemon.wireless') bus.add_signal_receiver(tray_icon.tr.tray_scan_started, 'SendStartScanSignal', 'org.wicd.daemon.wireless') bus.add_signal_receiver(lambda: (handle_no_dbus() or tray_icon.icon_info.set_not_connected_state()), "DaemonClosing", 'org.wicd.daemon') bus.add_signal_receiver(lambda: setup_dbus(force=False), "DaemonStarting", "org.wicd.daemon") print 'Done loading.' mainloop = gobject.MainLoop() mainloop.run() if __name__ == '__main__': main(sys.argv) wicd-1.7.2.4/gtk/netentry.py0000664000175000017500000014634311715710103016031 0ustar daviddavid00000000000000""" netentry -- Network entry widgets for the GUI. This module provides GUI widgets used to represent wired and wireless entries in the GUI's network list, as well as any settings dialogs contained within them. """ # # Copyright (C) 2008-2009 Adam Blackburn # Copyright (C) 2008-2009 Dan O'Reilly # Copyright (C) 2009 Andrew Psaltis # Copyright (C) 2011 David Paleino # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # import gtk import os import wicd.misc as misc import wicd.wpath as wpath import wicd.dbusmanager as dbusmanager from wicd.misc import noneToString, stringToNone, noneToBlankString, to_bool from guiutil import error, LabelEntry, GreyLabel, LeftAlignedLabel, string_input, ProtectedLabelEntry from wicd.translations import language, _ # These get set when a NetworkEntry is instantiated. daemon = None wired = None wireless = None def setup_dbus(): global daemon, wireless, wired daemon = dbusmanager.get_interface('daemon') wireless = dbusmanager.get_interface('wireless') wired = dbusmanager.get_interface('wired') class AdvancedSettingsDialog(gtk.Dialog): def __init__(self, network_name=None): """ Build the base advanced settings dialog. This class isn't used by itself, instead it is used as a parent for the WiredSettingsDialog and WirelessSettingsDialog. """ # if no network name was passed, just use Properties as the title if network_name: title = '%s - %s' % (network_name, _('Properties')) else: title = _('Properties') gtk.Dialog.__init__(self, title=title, flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_OK, gtk.RESPONSE_ACCEPT)) self.set_default_size() self.connect('show', lambda *a, **k: self.set_default_size()) # Set up the Advanced Settings Dialog. self.txt_ip = LabelEntry(_('IP')) self.txt_ip.entry.connect('focus-out-event', self.set_defaults) self.txt_netmask = LabelEntry(_('Netmask')) self.txt_gateway = LabelEntry(_('Gateway')) self.txt_search_dom = LabelEntry(_('Search domain')) self.txt_domain = LabelEntry(_('DNS domain')) self.txt_dns_1 = LabelEntry(_('DNS server') + ' 1') self.txt_dns_2 = LabelEntry(_('DNS server') + ' 2') self.txt_dns_3 = LabelEntry(_('DNS server') + ' 3') dhcp_hostname_hbox = gtk.HBox(False, 0) self.chkbox_use_dhcp_hostname = gtk.CheckButton() self.txt_dhcp_hostname = LabelEntry("DHCP Hostname") dhcp_hostname_hbox.pack_start(self.chkbox_use_dhcp_hostname, fill=False, expand=False) dhcp_hostname_hbox.pack_start(self.txt_dhcp_hostname) self.chkbox_static_ip = gtk.CheckButton(_('Use Static IPs')) self.chkbox_static_dns = gtk.CheckButton(_('Use Static DNS')) self.chkbox_global_dns = gtk.CheckButton(_('Use global DNS servers')) self.hbox_dns = gtk.HBox(False, 0) self.hbox_dns.pack_start(self.chkbox_static_dns) self.hbox_dns.pack_start(self.chkbox_global_dns) # Set up the script settings button self.script_button = gtk.Button() script_image = gtk.Image() script_image.set_from_stock(gtk.STOCK_EXECUTE, 4) script_image.set_padding(4, 0) #self.script_button.set_alignment(.5, .5) self.script_button.set_image(script_image) self.script_button.set_label(_('Scripts')) self.button_hbox = gtk.HBox(False, 2) self.button_hbox.pack_start(self.script_button, fill=False, expand=False) self.button_hbox.show() self.swindow = gtk.ScrolledWindow() self.swindow.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) self.viewport = gtk.Viewport() self.viewport.set_shadow_type(gtk.SHADOW_NONE) self.cvbox = gtk.VBox() self.viewport.add(self.cvbox) self.swindow.add(self.viewport) self.vbox.pack_start(self.swindow) assert(isinstance(self.cvbox, gtk.VBox)) self.cvbox.pack_start(self.chkbox_static_ip, fill=False, expand=False) self.cvbox.pack_start(self.txt_ip, fill=False, expand=False) self.cvbox.pack_start(self.txt_netmask, fill=False, expand=False) self.cvbox.pack_start(self.txt_gateway, fill=False, expand=False) self.cvbox.pack_start(self.hbox_dns, fill=False, expand=False) self.cvbox.pack_start(self.txt_domain, fill=False, expand=False) self.cvbox.pack_start(self.txt_search_dom, fill=False, expand=False) self.cvbox.pack_start(self.txt_dns_1, fill=False, expand=False) self.cvbox.pack_start(self.txt_dns_2, fill=False, expand=False) self.cvbox.pack_start(self.txt_dns_3, fill=False, expand=False) self.cvbox.pack_start(dhcp_hostname_hbox, fill=False, expand=False) self.cvbox.pack_end(self.button_hbox, fill=False, expand=False, padding=5) # Connect the events to the actions self.chkbox_static_ip.connect("toggled", self.toggle_ip_checkbox) self.chkbox_static_dns.connect("toggled", self.toggle_dns_checkbox) self.chkbox_global_dns.connect("toggled", self.toggle_global_dns_checkbox) self.chkbox_use_dhcp_hostname.connect('toggled', self.toggle_dhcp_hostname_checkbox) # Start with all disabled, then they will be enabled later. self.chkbox_static_ip.set_active(False) self.chkbox_static_dns.set_active(False) def set_default_size(self): width, height = self.get_size() s_height = gtk.gdk.screen_height() if s_height < 768: height = s_height * .75 else: height = 600 self.resize(int(width), int(height)) def set_defaults(self, widget=None, event=None): """ Put some default values into entries to help the user out. """ self.txt_ip.set_text(self.txt_ip.get_text().strip()) ipAddress = self.txt_ip.get_text() # For easy typing :) netmask = self.txt_netmask gateway = self.txt_gateway ip_parts = misc.IsValidIP(ipAddress) if ip_parts: if stringToNone(gateway.get_text()) is None: # Make sure the gateway box is blank # Fill it in with a .1 at the end gateway.set_text('.'.join(ip_parts[0:3]) + '.1') if stringToNone(netmask.get_text()) is None: # Make sure the netmask is blank netmask.set_text('255.255.255.0') # Fill in the most common one elif ipAddress != "": error(None, _('Invalid IP address entered.')) def reset_static_checkboxes(self): # Enable the right stuff if stringToNone(self.txt_ip.get_text()): self.chkbox_static_ip.set_active(True) self.chkbox_static_dns.set_active(True) self.chkbox_static_dns.set_sensitive(False) else: self.chkbox_static_ip.set_active(False) self.chkbox_static_dns.set_sensitive(True) if stringToNone(self.txt_dns_1.get_text()) or \ self.chkbox_global_dns.get_active(): self.chkbox_static_dns.set_active(True) else: self.chkbox_static_dns.set_active(False) # This will properly disable unused boxes. self.toggle_ip_checkbox() self.toggle_dns_checkbox() self.toggle_global_dns_checkbox() def toggle_ip_checkbox(self, widget=None): """Toggle entries/checkboxes based on the static IP checkbox. """ # Should disable the static IP text boxes, and also enable the DNS # checkbox when disabled and disable when enabled. if self.chkbox_static_ip.get_active(): self.chkbox_static_dns.set_active(True) self.chkbox_static_dns.set_sensitive(False) else: self.chkbox_static_dns.set_sensitive(True) self.txt_ip.set_sensitive(self.chkbox_static_ip.get_active()) self.txt_netmask.set_sensitive(self.chkbox_static_ip.get_active()) self.txt_gateway.set_sensitive(self.chkbox_static_ip.get_active()) def toggle_dns_checkbox(self, widget=None): """ Toggle entries and checkboxes based on the static dns checkbox. """ # Should disable the static DNS boxes if self.chkbox_static_ip.get_active(): self.chkbox_static_dns.set_active(True) self.chkbox_static_dns.set_sensitive(False) self.chkbox_global_dns.set_sensitive(self.chkbox_static_dns. get_active()) l = [self.txt_dns_1, self.txt_dns_2, self.txt_dns_3, self.txt_domain, self.txt_search_dom] if self.chkbox_static_dns.get_active(): # If global dns is on, don't use local dns for w in l: w.set_sensitive(not self.chkbox_global_dns.get_active()) else: for w in l: w.set_sensitive(False) self.chkbox_global_dns.set_active(False) def toggle_dhcp_hostname_checkbox(self, widget=None): self.txt_dhcp_hostname.set_sensitive( self.chkbox_use_dhcp_hostname.get_active()) def toggle_global_dns_checkbox(self, widget=None): """ Set the DNS entries' sensitivity based on the Global checkbox. """ global_dns_active = daemon.GetUseGlobalDNS() if not global_dns_active and self.chkbox_global_dns.get_active(): error(None, _('Global DNS has not been enabled in general preferences.')) self.chkbox_global_dns.set_active(False) if daemon.GetUseGlobalDNS() and self.chkbox_static_dns.get_active(): for w in [self.txt_dns_1, self.txt_dns_2, self.txt_dns_3, self.txt_domain, self.txt_search_dom]: w.set_sensitive(not self.chkbox_global_dns.get_active()) def toggle_encryption(self, widget=None): """ Toggle the encryption combobox based on the encryption checkbox. """ active = self.chkbox_encryption.get_active() self.vbox_encrypt_info.set_sensitive(active) self.combo_encryption.set_sensitive(active) def destroy_called(self, *args): """ Clean up everything. """ super(AdvancedSettingsDialog, self).destroy() self.destroy() del self def save_settings(self): """ Save settings common to wired and wireless settings dialogs. """ if self.chkbox_static_ip.get_active(): self.set_net_prop("ip", noneToString(self.txt_ip.get_text())) self.set_net_prop("netmask", noneToString(self.txt_netmask.get_text())) self.set_net_prop("gateway", noneToString(self.txt_gateway.get_text())) else: self.set_net_prop("ip", '') self.set_net_prop("netmask", '') self.set_net_prop("gateway", '') if self.chkbox_static_dns.get_active() and \ not self.chkbox_global_dns.get_active(): self.set_net_prop('use_static_dns', True) self.set_net_prop('use_global_dns', False) self.set_net_prop('dns_domain', noneToString(self.txt_domain.get_text())) self.set_net_prop("search_domain", noneToString(self.txt_search_dom.get_text())) self.set_net_prop("dns1", noneToString(self.txt_dns_1.get_text())) self.set_net_prop("dns2", noneToString(self.txt_dns_2.get_text())) self.set_net_prop("dns3", noneToString(self.txt_dns_3.get_text())) elif self.chkbox_static_dns.get_active() and \ self.chkbox_global_dns.get_active(): self.set_net_prop('use_static_dns', True) self.set_net_prop('use_global_dns', True) else: self.set_net_prop('use_static_dns', False) self.set_net_prop('use_global_dns', False) self.set_net_prop('dns_domain', '') self.set_net_prop("search_domain", '') self.set_net_prop("dns1", '') self.set_net_prop("dns2", '') self.set_net_prop("dns3", '') self.set_net_prop('usedhcphostname', self.chkbox_use_dhcp_hostname.get_active()) self.set_net_prop("dhcphostname",noneToString(self.txt_dhcp_hostname.get_text())) def change_encrypt_method(self, widget=None): """ Load all the entries for a given encryption method. """ for z in self.vbox_encrypt_info: z.destroy() # Remove stuff in there already ID = self.combo_encryption.get_active() methods = self.encrypt_types self.encryption_info = {} # If nothing is selected, select the first entry. if ID == -1: self.combo_encryption.set_active(0) ID = 0 for type_ in ['required', 'optional']: fields = methods[ID][type_] for field in fields: try: field_text = language[field[1].lower().replace(' ','_')] except KeyError: field_text = field[1].replace(' ','_') if field in methods[ID]['protected']: box = ProtectedLabelEntry(field_text) else: box = LabelEntry(field_text) self.vbox_encrypt_info.pack_start(box) # Add the data to a dict, so that the information # can be easily accessed by giving the name of the wanted # data. self.encryption_info[field[0]] = [box, type_] if self.wired: box.entry.set_text(noneToBlankString( wired.GetWiredProperty(field[0]))) else: box.entry.set_text(noneToBlankString( wireless.GetWirelessProperty(self.networkID, field[0]))) self.vbox_encrypt_info.show_all() class WiredSettingsDialog(AdvancedSettingsDialog): def __init__(self, name): """ Build the wired settings dialog. """ AdvancedSettingsDialog.__init__(self, _('Wired Network')) # So we can test if we are wired or wireless (for change_encrypt_method()) self.wired = True ## This section is largely copied from WirelessSettingsDialog, but with some changes # Set up encryption stuff self.combo_encryption = gtk.combo_box_new_text() self.chkbox_encryption = gtk.CheckButton(_('Use Encryption')) # Make the vbox to hold the encryption stuff. self.vbox_encrypt_info = gtk.VBox(False, 0) self.chkbox_encryption.set_active(bool(wired.GetWiredProperty('encryption_enabled'))) self.combo_encryption.set_sensitive(False) self.encrypt_types = misc.LoadEncryptionMethods(wired = True) # Build the encryption menu for x, enc_type in enumerate(self.encrypt_types): self.combo_encryption.append_text(enc_type['name']) self.combo_encryption.set_active(0) self.change_encrypt_method() self.toggle_encryption() self.cvbox.pack_start(self.chkbox_encryption, False, False) self.cvbox.pack_start(self.combo_encryption, False, False) self.cvbox.pack_start(self.vbox_encrypt_info, False, False) # Connect signals. self.chkbox_encryption.connect("toggled", self.toggle_encryption) self.combo_encryption.connect("changed", self.change_encrypt_method) self.des = self.connect("destroy", self.destroy_called) self.script_button.connect("clicked", self.edit_scripts) self.prof_name = name def set_net_prop(self, option, value): """ Sets the given option to the given value for this network. """ wired.SetWiredProperty(option, value) def edit_scripts(self, widget=None, event=None): """ Launch the script editting dialog. """ profile = self.prof_name cmdend = [os.path.join(wpath.gtk, "configscript.py"), profile, "wired"] if os.getuid() != 0: cmdbase = misc.get_sudo_cmd(_('You must enter your password to configure scripts'), prog_num=daemon.GetSudoApp()) if not cmdbase: error(None, _('Could not find a graphical sudo program. '\ 'The script editor could not be launched. '\ "You'll have to edit scripts directly your configuration file.")) return cmdbase.extend(cmdend) misc.LaunchAndWait(cmdbase) else: misc.LaunchAndWait(cmdend) def set_values(self): """ Fill in the Gtk.Entry objects with the correct values. """ self.txt_ip.set_text(self.format_entry("ip")) self.txt_netmask.set_text(self.format_entry("netmask")) self.txt_gateway.set_text(self.format_entry("gateway")) self.txt_dns_1.set_text(self.format_entry("dns1")) self.txt_dns_2.set_text(self.format_entry("dns2")) self.txt_dns_3.set_text(self.format_entry("dns3")) self.txt_domain.set_text(self.format_entry("dns_domain")) self.txt_search_dom.set_text(self.format_entry("search_domain")) self.chkbox_global_dns.set_active(bool(wired.GetWiredProperty("use_global_dns"))) dhcphname = wired.GetWiredProperty("dhcphostname") if dhcphname is None: dhcphname = os.uname()[1] self.txt_dhcp_hostname.set_text(dhcphname) self.reset_static_checkboxes() self.chkbox_encryption.set_active(bool(wired.GetWiredProperty('encryption_enabled'))) self.change_encrypt_method() self.toggle_encryption() def save_settings(self): # Check encryption info encrypt_info = self.encryption_info self.set_net_prop("encryption_enabled", self.chkbox_encryption.get_active()) if self.chkbox_encryption.get_active(): print "setting encryption info..." encrypt_methods = self.encrypt_types self.set_net_prop("enctype", encrypt_methods[self.combo_encryption.get_active()]['type']) # Make sure all required fields are filled in. for entry_info in encrypt_info.itervalues(): if entry_info[0].entry.get_text() == "" and \ entry_info[1] == 'required': error(self, "%s (%s)" % (_('Required encryption information is missing.'), entry_info[0].label.get_label()) ) return False # Now save all the entries. for entry_key, entry_info in encrypt_info.iteritems(): self.set_net_prop(entry_key, noneToString(entry_info[0].entry.get_text())) elif not wired and not self.chkbox_encryption.get_active() and \ wireless.GetWirelessProperty(networkid, "encryption"): # Encrypt checkbox is off, but the network needs it. error(self, _('This network requires encryption to be enabled.')) return False else: print "no encryption specified..." self.set_net_prop("enctype", "None") AdvancedSettingsDialog.save_settings(self) wired.SaveWiredNetworkProfile(self.prof_name) return True def format_entry(self, label): """ Helper method to fetch and format wired properties. """ return noneToBlankString(wired.GetWiredProperty(label)) def destroy_called(self, *args): """ Clean up everything. """ self.disconnect(self.des) super(WiredSettingsDialog, self).destroy_called() self.destroy() del self class WirelessSettingsDialog(AdvancedSettingsDialog): def __init__(self, networkID): """ Build the wireless settings dialog. """ AdvancedSettingsDialog.__init__(self, wireless.GetWirelessProperty(networkID, 'essid')) # So we can test if we are wired or wireless (for change_encrypt_method()) self.wired = False # Set up encryption stuff self.networkID = networkID self.combo_encryption = gtk.combo_box_new_text() self.chkbox_encryption = gtk.CheckButton(_('Use Encryption')) self.chkbox_global_settings = gtk.CheckButton(_('Use these settings for all networks sharing this essid')) # Make the vbox to hold the encryption stuff. self.vbox_encrypt_info = gtk.VBox(False, 0) self.toggle_encryption() self.chkbox_encryption.set_active(False) self.combo_encryption.set_sensitive(False) self.encrypt_types = misc.LoadEncryptionMethods() information_button = gtk.Button(stock=gtk.STOCK_INFO) self.button_hbox.pack_start(information_button, False, False) information_button.connect('clicked', lambda *a, **k: WirelessInformationDialog(networkID, self)) information_button.show() # Build the encryption menu activeID = -1 # Set the menu to this item when we are done for x, enc_type in enumerate(self.encrypt_types): self.combo_encryption.append_text(enc_type['name']) if enc_type['type'] == wireless.GetWirelessProperty(networkID, "enctype"): activeID = x self.combo_encryption.set_active(activeID) if activeID != -1: self.chkbox_encryption.set_active(True) self.combo_encryption.set_sensitive(True) self.vbox_encrypt_info.set_sensitive(True) else: self.combo_encryption.set_active(0) self.change_encrypt_method() self.cvbox.pack_start(self.chkbox_global_settings, False, False) self.cvbox.pack_start(self.chkbox_encryption, False, False) self.cvbox.pack_start(self.combo_encryption, False, False) self.cvbox.pack_start(self.vbox_encrypt_info, False, False) # Connect signals. self.chkbox_encryption.connect("toggled", self.toggle_encryption) self.combo_encryption.connect("changed", self.change_encrypt_method) self.script_button.connect("clicked", self.edit_scripts) self.des = self.connect("destroy", self.destroy_called) def destroy_called(self, *args): """ Clean up everything. """ self.disconnect(self.des) super(WirelessSettingsDialog, self).destroy_called() self.destroy() del self def edit_scripts(self, widget=None, event=None): """ Launch the script editting dialog. """ cmdend = [os.path.join(wpath.gtk, "configscript.py"), str(self.networkID), "wireless"] if os.getuid() != 0: cmdbase = misc.get_sudo_cmd(_('You must enter your password to configure scripts'), prog_num=daemon.GetSudoApp()) if not cmdbase: error(None, _('Could not find a graphical sudo program. '\ 'The script editor could not be launched. '\ "You'll have to edit scripts directly your configuration file.")) return cmdbase.extend(cmdend) misc.LaunchAndWait(cmdbase) else: misc.LaunchAndWait(cmdend) def set_net_prop(self, option, value): """ Sets the given option to the given value for this network. """ wireless.SetWirelessProperty(self.networkID, option, value) def set_values(self): """ Set the various network settings to the right values. """ networkID = self.networkID self.txt_ip.set_text(self.format_entry(networkID,"ip")) self.txt_netmask.set_text(self.format_entry(networkID,"netmask")) self.txt_gateway.set_text(self.format_entry(networkID,"gateway")) self.chkbox_global_dns.set_active(bool(wireless.GetWirelessProperty(networkID, 'use_global_dns'))) self.chkbox_static_dns.set_active(bool(wireless.GetWirelessProperty(networkID, 'use_static_dns'))) self.txt_dns_1.set_text(self.format_entry(networkID, "dns1")) self.txt_dns_2.set_text(self.format_entry(networkID, "dns2")) self.txt_dns_3.set_text(self.format_entry(networkID, "dns3")) self.txt_domain.set_text(self.format_entry(networkID, "dns_domain")) self.txt_search_dom.set_text(self.format_entry(networkID, "search_domain")) self.reset_static_checkboxes() self.chkbox_encryption.set_active(bool(wireless.GetWirelessProperty(networkID, 'encryption'))) self.chkbox_global_settings.set_active(bool(wireless.GetWirelessProperty(networkID, 'use_settings_globally'))) self.chkbox_use_dhcp_hostname.set_active( bool(wireless.GetWirelessProperty(networkID, 'usedhcphostname'))) dhcphname = wireless.GetWirelessProperty(networkID,"dhcphostname") if dhcphname is None: dhcphname = os.uname()[1] self.txt_dhcp_hostname.set_text(dhcphname) self.toggle_dhcp_hostname_checkbox() activeID = -1 # Set the menu to this item when we are done user_enctype = wireless.GetWirelessProperty(networkID, "enctype") for x, enc_type in enumerate(self.encrypt_types): if enc_type['type'] == user_enctype: activeID = x self.combo_encryption.set_active(activeID) if activeID != -1: self.chkbox_encryption.set_active(True) self.combo_encryption.set_sensitive(True) self.vbox_encrypt_info.set_sensitive(True) else: self.combo_encryption.set_active(0) self.change_encrypt_method() def save_settings(self, networkid): # Check encryption info encrypt_info = self.encryption_info if self.chkbox_encryption.get_active(): print "setting encryption info..." encrypt_methods = self.encrypt_types self.set_net_prop("enctype", encrypt_methods[self.combo_encryption.get_active()]['type']) # Make sure all required fields are filled in. for entry_info in encrypt_info.itervalues(): if entry_info[0].entry.get_text() == "" and \ entry_info[1] == 'required': error(self, "%s (%s)" % (_('Required encryption information is missing.'), entry_info[0].label.get_label()) ) return False # Now save all the entries. for entry_key, entry_info in encrypt_info.iteritems(): self.set_net_prop(entry_key, noneToString(entry_info[0].entry.get_text())) elif not self.chkbox_encryption.get_active() and \ wireless.GetWirelessProperty(networkid, "encryption"): # Encrypt checkbox is off, but the network needs it. error(self, _('This network requires encryption to be enabled.')) return False else: print "no encryption specified..." self.set_net_prop("enctype", "None") AdvancedSettingsDialog.save_settings(self) if self.chkbox_global_settings.get_active(): self.set_net_prop('use_settings_globally', True) else: self.set_net_prop('use_settings_globally', False) wireless.RemoveGlobalEssidEntry(networkid) wireless.SaveWirelessNetworkProfile(networkid) return True def format_entry(self, networkid, label): """ Helper method for fetching/formatting wireless properties. """ return noneToBlankString(wireless.GetWirelessProperty(networkid, label)) class NetworkEntry(gtk.HBox): def __init__(self): """ Base network entry class. Provides gtk objects used by both the WiredNetworkEntry and WirelessNetworkEntry classes. """ setup_dbus() gtk.HBox.__init__(self, False, 2) self.image = gtk.Image() self.pack_start(self.image, False, False) # Create an HBox to hold the buttons self.buttons_hbox = gtk.HBox(False, 6) # Set up the Connect button self.connect_button = gtk.Button(stock=gtk.STOCK_CONNECT) self.connect_hbox = gtk.HBox(False, 2) self.connect_hbox.pack_start(self.connect_button, False, False) self.connect_hbox.show() # Set up the Disconnect button self.disconnect_button = gtk.Button(stock=gtk.STOCK_DISCONNECT) self.connect_hbox.pack_start(self.disconnect_button, False, False) # Create a label to hold the name of the entry self.name_label = gtk.Label() self.name_label.set_alignment(0, 0.5) # Set up the VBox that goes in the gtk.Expander self.expander_vbox = gtk.VBox(False, 1) self.expander_vbox.show() self.pack_end(self.expander_vbox) # Set up the advanced settings button self.advanced_button = gtk.Button() self.advanced_image = gtk.Image() self.advanced_image.set_from_stock(gtk.STOCK_EDIT, 4) self.advanced_image.set_padding(4, 0) self.advanced_button.set_alignment(.5, .5) self.advanced_button.set_label(_('Properties')) self.advanced_button.set_image(self.advanced_image) self.buttons_hbox.pack_start(self.connect_hbox, False, False) self.buttons_hbox.pack_start(self.advanced_button, False, False) self.vbox_top = gtk.VBox(False, 0) self.expander_vbox.pack_start(self.name_label) self.expander_vbox.pack_start(self.vbox_top) self.expander_vbox.pack_start(self.buttons_hbox) def destroy_called(self, *args): """ Clean up everything. """ super(NetworkEntry, self).destroy() self.destroy() del self class WiredNetworkEntry(NetworkEntry): def __init__(self): """ Load the wired network entry. """ NetworkEntry.__init__(self) # Center the picture and pad it a bit self.image.set_padding(0, 0) self.image.set_alignment(.5, .5) self.image.set_size_request(60, -1) self.image.set_from_file(wpath.images + "wired-gui.svg") self.image.show() self.connect_button.show() self.name_label.set_use_markup(True) self.name_label.set_label("" + _('Wired Network') + "") self.is_full_gui = True self.button_add = gtk.Button(stock=gtk.STOCK_ADD) self.button_delete = gtk.Button(stock=gtk.STOCK_DELETE) self.profile_help = gtk.Label(_('To connect to a wired network, you must create a network profile. To create a network profile, type a name that describes this network, and press Add.')) self.chkbox_default_profile = gtk.CheckButton(_('Use as default profile (overwrites any previous default)')) self.combo_profile_names = gtk.combo_box_new_text() # Format the profile help label. self.profile_help.set_justify(gtk.JUSTIFY_LEFT) self.profile_help.set_line_wrap(True) # Pack the various VBox objects. self.hbox_temp = gtk.HBox(False, 0) self.hbox_def = gtk.HBox(False, 0) self.vbox_top.pack_start(self.profile_help, True, True) self.vbox_top.pack_start(self.hbox_def) self.vbox_top.pack_start(self.hbox_temp) self.hbox_temp.pack_start(self.combo_profile_names, True, True) self.hbox_temp.pack_start(self.button_add, False, False) self.hbox_temp.pack_start(self.button_delete, False, False) self.hbox_def.pack_start(self.chkbox_default_profile, False, False) # Connect events self.button_add.connect("clicked", self.add_profile) self.button_delete.connect("clicked", self.remove_profile) self.chkbox_default_profile.connect("toggled", self.toggle_default_profile) self.combo_profile_names.connect("changed", self.change_profile) # Build profile list. self.profile_list = wired.GetWiredProfileList() default_prof = wired.GetDefaultWiredNetwork() if self.profile_list: starting_index = 0 for x, prof in enumerate(self.profile_list): self.combo_profile_names.append_text(prof) if default_prof == prof: starting_index = x self.combo_profile_names.set_active(starting_index) else: print "no wired profiles found" self.profile_help.show() self.advanced_dialog = WiredSettingsDialog(self.combo_profile_names.get_active_text()) # Show everything, but hide the profile help label. self.show_all() self.profile_help.hide() # Toggle the default profile checkbox to the correct state. if to_bool(wired.GetWiredProperty("default")): self.chkbox_default_profile.set_active(True) else: self.chkbox_default_profile.set_active(False) self.check_enable() self.wireddis = self.connect("destroy", self.destroy_called) def destroy_called(self, *args): """ Clean up everything. """ self.disconnect(self.wireddis) self.advanced_dialog.destroy_called() del self.advanced_dialog super(WiredNetworkEntry, self).destroy_called() self.destroy() del self def save_wired_settings(self): """ Save wired network settings. """ return self.advanced_dialog.save_settings() def check_enable(self): """ Disable objects if the profile list is empty. """ profile_list = wired.GetWiredProfileList() if not profile_list: self.button_delete.set_sensitive(False) self.connect_button.set_sensitive(False) self.advanced_button.set_sensitive(False) def update_connect_button(self, state, apbssid=None): """ Update the connection/disconnect button for this entry. """ if state == misc.WIRED: self.disconnect_button.show() self.connect_button.hide() else: self.disconnect_button.hide() self.connect_button.show() def add_profile(self, widget): """ Add a profile to the profile list. """ response = string_input("Enter a profile name", "The profile name " + "will not be used by the computer. It " + "allows you to " + "easily distinguish between different network " + "profiles.", "Profile name:").strip() # if response is "" or None if not response: error(None, "Invalid profile name", block=True) return False profile_name = response profile_list = wired.GetWiredProfileList() if profile_list: if profile_name in profile_list: return False self.profile_help.hide() wired.CreateWiredNetworkProfile(profile_name, False) self.combo_profile_names.prepend_text(profile_name) self.combo_profile_names.set_active(0) self.advanced_dialog.prof_name = profile_name if self.is_full_gui: self.button_delete.set_sensitive(True) self.connect_button.set_sensitive(True) self.advanced_button.set_sensitive(True) def remove_profile(self, widget): """ Remove a profile from the profile list. """ print "removing profile" profile_name = self.combo_profile_names.get_active_text() wired.DeleteWiredNetworkProfile(profile_name) self.combo_profile_names.remove_text(self.combo_profile_names. get_active()) self.combo_profile_names.set_active(0) self.advanced_dialog.prof_name = self.combo_profile_names.get_active_text() if not wired.GetWiredProfileList(): self.profile_help.show() entry = self.combo_profile_names.child entry.set_text("") if self.is_full_gui: self.button_delete.set_sensitive(False) self.advanced_button.set_sensitive(False) self.connect_button.set_sensitive(False) else: self.profile_help.hide() def toggle_default_profile(self, widget): """ Change the default profile. """ if self.chkbox_default_profile.get_active(): # Make sure there is only one default profile at a time wired.UnsetWiredDefault() wired.SetWiredProperty("default", self.chkbox_default_profile.get_active()) wired.SaveWiredNetworkProfile(self.combo_profile_names.get_active_text()) def change_profile(self, widget): """ Called when a new profile is chosen from the list. """ # Make sure the name doesn't change everytime someone types something if self.combo_profile_names.get_active() > -1: if not self.is_full_gui: return profile_name = self.combo_profile_names.get_active_text() wired.ReadWiredNetworkProfile(profile_name) if hasattr(self, 'advanced_dialog'): self.advanced_dialog.prof_name = profile_name self.advanced_dialog.set_values() is_default = wired.GetWiredProperty("default") self.chkbox_default_profile.set_active(to_bool(is_default)) def format_entry(self, label): """ Help method for fetching/formatting wired properties. """ return noneToBlankString(wired.GetWiredProperty(label)) class WirelessNetworkEntry(NetworkEntry): def __init__(self, networkID): """ Build the wireless network entry. """ NetworkEntry.__init__(self) self.networkID = networkID self.image.set_padding(0, 0) self.image.set_alignment(.5, .5) self.image.set_size_request(60, -1) self.image.show() self.essid = noneToBlankString(wireless.GetWirelessProperty(networkID, "essid")) self.lbl_strength = GreyLabel() self.lbl_encryption = GreyLabel() self.lbl_channel = GreyLabel() print "ESSID : " + self.essid self.chkbox_autoconnect = gtk.CheckButton(_('Automatically connect to this network')) self.chkbox_neverconnect = gtk.CheckButton(_('Never connect to this network')) self.set_signal_strength(wireless.GetWirelessProperty(networkID, 'quality'), wireless.GetWirelessProperty(networkID, 'strength')) self.set_encryption(wireless.GetWirelessProperty(networkID, 'encryption'), wireless.GetWirelessProperty(networkID, 'encryption_method')) self.set_channel(wireless.GetWirelessProperty(networkID, 'channel')) self.name_label.set_use_markup(True) self.name_label.set_label("%s %s %s %s" % (self._escape(self.essid), self.lbl_strength.get_label(), self.lbl_encryption.get_label(), self.lbl_channel.get_label(), ) ) # Add the wireless network specific parts to the NetworkEntry # VBox objects. self.vbox_top.pack_start(self.chkbox_autoconnect, False, False) self.vbox_top.pack_start(self.chkbox_neverconnect, False, False) if to_bool(self.format_entry(networkID, "automatic")): self.chkbox_autoconnect.set_active(True) else: self.chkbox_autoconnect.set_active(False) if to_bool(self.format_entry(networkID, "never")): self.chkbox_autoconnect.set_sensitive(False) self.connect_button.set_sensitive(False) self.chkbox_neverconnect.set_active(True) else: self.chkbox_neverconnect.set_active(False) # Connect signals. self.chkbox_autoconnect.connect("toggled", self.update_autoconnect) self.chkbox_neverconnect.connect("toggled", self.update_neverconnect) # Show everything self.show_all() self.advanced_dialog = WirelessSettingsDialog(networkID) self.wifides = self.connect("destroy", self.destroy_called) def _escape(self, val): """ Escapes special characters so they're displayed correctly. """ return val.replace("&", "&").replace("<", "<").\ replace(">",">").replace("'", "'").replace('"', """) def save_wireless_settings(self, networkid): """ Save wireless network settings. """ return self.advanced_dialog.save_settings(networkid) def update_autoconnect(self, widget=None): """ Called when the autoconnect checkbox is toggled. """ wireless.SetWirelessProperty(self.networkID, "automatic", noneToString(self.chkbox_autoconnect. get_active())) wireless.SaveWirelessNetworkProperty(self.networkID, "automatic") def update_neverconnect(self, widget=None): """ Called when the neverconnect checkbox is toggled. """ wireless.SetWirelessProperty(self.networkID, "never", noneToString(self.chkbox_neverconnect.get_active())) wireless.SaveWirelessNetworkProperty(self.networkID, "never") if self.chkbox_neverconnect.get_active(): self.chkbox_autoconnect.set_sensitive(False) self.connect_button.set_sensitive(False) else: self.chkbox_autoconnect.set_sensitive(True) self.connect_button.set_sensitive(True) def destroy_called(self, *args): """ Clean up everything. """ self.disconnect(self.wifides) self.advanced_dialog.destroy_called() del self.advanced_dialog super(WirelessNetworkEntry, self).destroy_called() self.destroy() del self def update_connect_button(self, state, apbssid): """ Update the connection/disconnect button for this entry. """ if to_bool(self.format_entry(self.networkID, "never")): self.connect_button.set_sensitive(False) if not apbssid: apbssid = wireless.GetApBssid() if state == misc.WIRELESS and \ apbssid == wireless.GetWirelessProperty(self.networkID, "bssid"): self.disconnect_button.show() self.connect_button.hide() else: self.disconnect_button.hide() self.connect_button.show() def set_signal_strength(self, strength, dbm_strength): """ Set the signal strength displayed in the WirelessNetworkEntry. """ if strength: strength = int(strength) else: strength = -1 if dbm_strength: dbm_strength = int(dbm_strength) else: dbm_strength = -100 display_type = daemon.GetSignalDisplayType() if daemon.GetWPADriver() == 'ralink legacy' or display_type == 1: # Use the -xx dBm signal strength to display a signal icon # I'm not sure how accurately the dBm strength is being # "converted" to strength bars, so suggestions from people # for a better way would be welcome. if dbm_strength >= -60: signal_img = 'signal-100.png' elif dbm_strength >= -70: signal_img = 'signal-75.png' elif dbm_strength >= -80: signal_img = 'signal-50.png' else: signal_img = 'signal-25.png' ending = "dBm" disp_strength = str(dbm_strength) else: # Uses normal link quality, should be fine in most cases if strength > 75: signal_img = 'signal-100.png' elif strength > 50: signal_img = 'signal-75.png' elif strength > 25: signal_img = 'signal-50.png' else: signal_img = 'signal-25.png' ending = "%" disp_strength = str(strength) self.image.set_from_file(wpath.images + signal_img) self.lbl_strength.set_label(disp_strength + ending) self.image.show() def set_encryption(self, on, ttype): """ Set the encryption value for the WirelessNetworkEntry. """ if on and ttype: self.lbl_encryption.set_label(str(ttype)) if on and not ttype: self.lbl_encryption.set_label(_('Secured')) if not on: self.lbl_encryption.set_label(_('Unsecured')) def set_channel(self, channel): """ Set the channel value for the WirelessNetworkEntry. """ self.lbl_channel.set_label(_('Channel') + ' ' + str(channel)) def format_entry(self, networkid, label): """ Helper method for fetching/formatting wireless properties. """ return noneToBlankString(wireless.GetWirelessProperty(networkid, label)) class WirelessInformationDialog(gtk.Dialog): def __init__(self, networkID, parent): gtk.Dialog.__init__(self,parent=parent) # Make the combo box. self.lbl_strength = gtk.Label() self.lbl_strength.set_alignment(0, 0.5) self.lbl_encryption = gtk.Label() self.lbl_encryption.set_alignment(0, 0.5) self.lbl_mac = gtk.Label() self.lbl_mac.set_alignment(0, 0.5) self.lbl_channel = gtk.Label() self.lbl_channel.set_alignment(0, 0.5) self.lbl_mode = gtk.Label() self.lbl_mode.set_alignment(0, 0.5) self.hbox_status = gtk.HBox(False, 5) # Set the values of the network info labels. self.set_signal_strength(wireless.GetWirelessProperty(networkID, 'quality'), wireless.GetWirelessProperty(networkID, 'strength')) self.set_mac_address(wireless.GetWirelessProperty(networkID, 'bssid')) self.set_mode(wireless.GetWirelessProperty(networkID, 'mode')) self.set_channel(wireless.GetWirelessProperty(networkID, 'channel')) self.set_encryption(wireless.GetWirelessProperty(networkID, 'encryption'), wireless.GetWirelessProperty(networkID, 'encryption_method')) self.set_title('Network Information') vbox = self.vbox self.set_has_separator(False) table = gtk.Table(5, 2) table.set_col_spacings(12) vbox.pack_start(table) # Pack the network status HBox. table.attach(LeftAlignedLabel('Signal strength:'), 0, 1, 0, 1) table.attach(self.lbl_strength, 1, 2, 0, 1) table.attach(LeftAlignedLabel('Encryption type:'), 0, 1, 1, 2) table.attach(self.lbl_encryption, 1, 2, 1, 2) table.attach(LeftAlignedLabel('Access point address:'), 0, 1, 2, 3) table.attach(self.lbl_mac, 1, 2, 2, 3) table.attach(LeftAlignedLabel('Mode:'), 0, 1, 3, 4) table.attach(self.lbl_mode, 1, 2, 3, 4) table.attach(LeftAlignedLabel('Channel:'), 0, 1, 4, 5) table.attach(self.lbl_channel, 1, 2, 4, 5) vbox.show_all() self.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE) self.show() self.run() self.destroy() def set_signal_strength(self, strength, dbm_strength): """ Set the signal strength displayed in the WirelessNetworkEntry. """ if strength is not None: strength = int(strength) else: strength = -1 if dbm_strength is not None: dbm_strength = int(dbm_strength) else: dbm_strength = -100 display_type = daemon.GetSignalDisplayType() if daemon.GetWPADriver() == 'ralink legacy' or display_type == 1: # Use the -xx dBm signal strength to display a signal icon # I'm not sure how accurately the dBm strength is being # "converted" to strength bars, so suggestions from people # for a better way would be welcome. if dbm_strength >= -60: signal_img = 'signal-100.png' elif dbm_strength >= -70: signal_img = 'signal-75.png' elif dbm_strength >= -80: signal_img = 'signal-50.png' else: signal_img = 'signal-25.png' ending = "dBm" disp_strength = str(dbm_strength) else: # Uses normal link quality, should be fine in most cases if strength > 75: signal_img = 'signal-100.png' elif strength > 50: signal_img = 'signal-75.png' elif strength > 25: signal_img = 'signal-50.png' else: signal_img = 'signal-25.png' ending = "%" disp_strength = str(strength) self.lbl_strength.set_label(disp_strength + ending) def set_mac_address(self, address): """ Set the MAC address for the WirelessNetworkEntry. """ self.lbl_mac.set_label(str(address)) def set_encryption(self, on, ttype): """ Set the encryption value for the WirelessNetworkEntry. """ if on and ttype: self.lbl_encryption.set_label(str(ttype)) if on and not ttype: self.lbl_encryption.set_label(_('Secured')) if not on: self.lbl_encryption.set_label(_('Unsecured')) def set_channel(self, channel): """ Set the channel value for the WirelessNetworkEntry. """ self.lbl_channel.set_label(_('Channel') + ' ' + str(channel)) def set_mode(self, mode): """ Set the mode value for the WirelessNetworkEntry. """ self.lbl_mode.set_label(str(mode)) def format_entry(self, networkid, label): """ Helper method for fetching/formatting wireless properties. """ return noneToBlankString(wireless.GetWirelessProperty(networkid, label)) wicd-1.7.2.4/gtk/configscript.py0000775000175000017500000001442111656467533016671 0ustar daviddavid00000000000000#!/usr/bin/env python """ configscript -- Configure the scripts for a particular network. Script for configuring the scripts for a network passed in as a command line argument. This needs to run a separate process because editing scripts requires root access, and the GUI/Tray are typically run as the current user. """ # # Copyright (C) 2007-2009 Adam Blackburn # Copyright (C) 2007-2009 Dan O'Reilly # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # import sys import os import gtk from wicd import wpath from wicd.translations import _ from wicd import dbusmanager from wicd.configmanager import ConfigManager dbus = dbusmanager.DBusManager() dbus.connect_to_dbus() wireless = dbus.get_interface("wireless") wired = dbus.get_interface("wired") wireless_conf = wpath.etc + 'wireless-settings.conf' wired_conf = wpath.etc + 'wired-settings.conf' def none_to_blank(text): """ Converts special string cases to a blank string. If text is None, 'None', or '' then this method will return '', otherwise it will just return str(text). """ if text in (None, "None", ""): return "" else: return str(text) def blank_to_none(text): """ Convert an empty or null string to 'None'. """ if text in ("", None): return "None" else: return str(text) def get_script_info(network, network_type): """ Read script info from disk and load it into the configuration dialog """ info = {} if network_type == "wired": con = ConfigManager(wired_conf) if con.has_section(network): info["pre_entry"] = con.get(network, "beforescript", None) info["post_entry"] = con.get(network, "afterscript", None) info["pre_disconnect_entry"] = con.get(network, "predisconnectscript", None) info["post_disconnect_entry"] = con.get(network, "postdisconnectscript", None) else: bssid = wireless.GetWirelessProperty(int(network), "bssid") con = ConfigManager(wireless_conf) if con.has_section(bssid): info["pre_entry"] = con.get(bssid, "beforescript", None) info["post_entry"] = con.get(bssid, "afterscript", None) info["pre_disconnect_entry"] = con.get(bssid, "predisconnectscript", None) info["post_disconnect_entry"] = con.get(bssid, "postdisconnectscript", None) return info def write_scripts(network, network_type, script_info): """ Writes script info to disk and loads it into the daemon. """ if network_type == "wired": con = ConfigManager(wired_conf) con.set(network, "beforescript", script_info["pre_entry"]) con.set(network, "afterscript", script_info["post_entry"]) con.set(network, "predisconnectscript", script_info["pre_disconnect_entry"]) con.set(network, "postdisconnectscript", script_info["post_disconnect_entry"]) con.write(open(wired_conf, "w")) wired.ReloadConfig() wired.ReadWiredNetworkProfile(network) wired.SaveWiredNetworkProfile(network) else: bssid = wireless.GetWirelessProperty(int(network), "bssid") con = ConfigManager(wireless_conf) con.set(bssid, "beforescript", script_info["pre_entry"]) con.set(bssid, "afterscript", script_info["post_entry"]) con.set(bssid, "predisconnectscript", script_info["pre_disconnect_entry"]) con.set(bssid, "postdisconnectscript", script_info["post_disconnect_entry"]) con.write(open(wireless_conf, "w")) wireless.ReloadConfig() wireless.ReadWirelessNetworkProfile(int(network)) wireless.SaveWirelessNetworkProfile(int(network)) def main (argv): """ Runs the script configuration dialog. """ if len(argv) < 2: print 'Network id to configure is missing, aborting.' sys.exit(1) network = argv[1] network_type = argv[2] script_info = get_script_info(network, network_type) gladefile = os.path.join(wpath.gtk, "wicd.ui") wTree = gtk.Builder() wTree.set_translation_domain('wicd') wTree.add_from_file(gladefile) dialog = wTree.get_object("configure_script_dialog") wTree.get_object("pre_label").set_label(_('Pre-connection Script') + ":") wTree.get_object("post_label").set_label(_('Post-connection Script') + ":") wTree.get_object("pre_disconnect_label").set_label(_('Pre-disconnection Script') + ":") wTree.get_object("post_disconnect_label").set_label(_('Post-disconnection Script') + ":") wTree.get_object("window1").hide() pre_entry = wTree.get_object("pre_entry") post_entry = wTree.get_object("post_entry") pre_disconnect_entry = wTree.get_object("pre_disconnect_entry") post_disconnect_entry = wTree.get_object("post_disconnect_entry") pre_entry.set_text(none_to_blank(script_info.get("pre_entry"))) post_entry.set_text(none_to_blank(script_info.get("post_entry"))) pre_disconnect_entry.set_text(none_to_blank(script_info.get("pre_disconnect_entry"))) post_disconnect_entry.set_text(none_to_blank(script_info.get("post_disconnect_entry"))) dialog.show_all() result = dialog.run() if result == 1: script_info["pre_entry"] = blank_to_none(pre_entry.get_text()) script_info["post_entry"] = blank_to_none(post_entry.get_text()) script_info["pre_disconnect_entry"] = blank_to_none(pre_disconnect_entry.get_text()) script_info["post_disconnect_entry"] = blank_to_none(post_disconnect_entry.get_text()) write_scripts(network, network_type, script_info) dialog.destroy() if __name__ == '__main__': if os.getuid() != 0: print "Root privileges are required to configure scripts. Exiting." sys.exit(0) main(sys.argv) wicd-1.7.2.4/gtk/guiutil.py0000664000175000017500000001571011647613726015655 0ustar daviddavid00000000000000""" guiutil - A collection of commonly used gtk/gui functions and classes. """ # # Copyright (C) 2007 - 2009 Adam Blackburn # Copyright (C) 2007 - 2009 Dan O'Reilly # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # import gtk import os.path import wicd.wpath as wpath HAS_NOTIFY = True try: import pynotify if not pynotify.init("Wicd"): print 'Could not initalize pynotify' HAS_NOTIFY = False except ImportError: print "Importing pynotify failed, notifications disabled." HAS_NOTIFY = False print "Has notifications support", HAS_NOTIFY if wpath.no_use_notifications: print 'Notifications disabled during setup.py configure' def can_use_notify(): use_notify = os.path.exists(os.path.join(os.path.expanduser('~/.wicd'), 'USE_NOTIFICATIONS') ) return use_notify and HAS_NOTIFY and not wpath.no_use_notifications def error(parent, message, block=True): """ Shows an error dialog. """ def delete_event(dialog, id): dialog.destroy() if can_use_notify() and not block: notification = pynotify.Notification("ERROR", message, "error") notification.show() return dialog = gtk.MessageDialog(parent, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK) dialog.set_markup(message) if not block: dialog.present() dialog.connect("response", delete_event) else: dialog.run() dialog.destroy() def alert(parent, message, block=True): """ Shows an warning dialog. """ def delete_event(dialog, id): dialog.destroy() dialog = gtk.MessageDialog(parent, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_OK) dialog.set_markup(message) if not block: dialog.present() dialog.connect("response", delete_event) else: dialog.run() dialog.destroy() def string_input(prompt, secondary, textbox_label): # based on a version of a PyGTK text entry from # http://ardoris.wordpress.com/2008/07/05/pygtk-text-entry-dialog/ def dialog_response(entry, dialog, response): dialog.response(response) dialog = gtk.MessageDialog( None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_OK_CANCEL, None) # set the text dialog.set_markup("" + prompt + "") # add the secondary text dialog.format_secondary_markup(secondary) entry = gtk.Entry() # allow the user to press enter instead of clicking OK entry.connect("activate", dialog_response, dialog, gtk.RESPONSE_OK) # create an hbox and pack the label and entry in hbox = gtk.HBox() hbox.pack_start(gtk.Label(textbox_label), False, 4, 4) hbox.pack_start(entry) # pack the boxes and show the dialog dialog.vbox.pack_end(hbox, True, True, 0) dialog.show_all() if dialog.run() == gtk.RESPONSE_OK: text = entry.get_text() dialog.destroy() return text else: dialog.destroy() return None class SmallLabel(gtk.Label): def __init__(self, text=''): gtk.Label.__init__(self, text) self.set_size_request(50, -1) class LeftAlignedLabel(gtk.Label): def __init__(self, label=None): gtk.Label.__init__(self, label) self.set_alignment(0.0, 0.5) class LabelEntry(gtk.HBox): """ A label on the left with a textbox on the right. """ def __init__(self,text): gtk.HBox.__init__(self) self.entry = gtk.Entry() self.entry.set_size_request(200, -1) self.label = LeftAlignedLabel() self.label.set_text(text) self.label.set_size_request(170, -1) self.pack_start(self.label, fill=True, expand=True) self.pack_start(self.entry, fill=False, expand=False) self.label.show() self.entry.show() self.entry.connect('focus-out-event', self.hide_characters) self.entry.connect('focus-in-event', self.show_characters) self.auto_hide_text = False self.show() def set_text(self, text): # For compatibility... self.entry.set_text(text) def get_text(self): return self.entry.get_text() def set_auto_hidden(self, value): self.entry.set_visibility(False) self.auto_hide_text = value def show_characters(self, widget=None, event=None): # When the box has focus, show the characters if self.auto_hide_text and widget: self.entry.set_visibility(True) def set_sensitive(self, value): self.entry.set_sensitive(value) self.label.set_sensitive(value) def hide_characters(self, widget=None, event=None): # When the box looses focus, hide them if self.auto_hide_text and widget: self.entry.set_visibility(False) class GreyLabel(gtk.Label): """ Creates a grey gtk.Label. """ def __init__(self): gtk.Label.__init__(self) def set_label(self, text): self.set_markup(text) self.set_alignment(0, 0) class ProtectedLabelEntry(gtk.HBox): """ A LabelEntry with a CheckButton that protects the entry text. """ def __init__(self, label_text): gtk.HBox.__init__(self) self.entry = gtk.Entry() self.entry.set_size_request(200, -1) self.entry.set_visibility(False) self.label = LeftAlignedLabel() self.label.set_text(label_text) self.label.set_size_request(165, -1) self.check = gtk.CheckButton() self.check.set_size_request(5, -1) self.check.set_active(False) self.check.set_focus_on_click(False) self.pack_start(self.label, fill=True, expand=True) self.pack_start(self.check, fill=True, expand=True) self.pack_start(self.entry, fill=False, expand=False) self.label.show() self.check.show() self.entry.show() self.check.connect('clicked', self.click_handler) self.show() def set_entry_text(self, text): # For compatibility... self.entry.set_text(text) def get_entry_text(self): return self.entry.get_text() def set_sensitive(self, value): self.entry.set_sensitive(value) self.label.set_sensitive(value) self.check.set_sensitive(value) def click_handler(self, widget=None, event=None): active = self.check.get_active() self.entry.set_visibility(active) wicd-1.7.2.4/gtk/gui.py0000664000175000017500000010207211704560627014750 0ustar daviddavid00000000000000#!/usr/bin/python """ gui -- The main wicd GUI module. Module containing the code for the main wicd GUI. """ # # Copyright (C) 2007-2009 Adam Blackburn # Copyright (C) 2007-2009 Dan O'Reilly # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # import os import sys import time import gobject import pango import gtk from itertools import chain from dbus import DBusException from wicd import misc from wicd import wpath from wicd import dbusmanager from wicd.misc import noneToString from wicd.translations import _, language import prefs from prefs import PreferencesDialog import netentry from netentry import WiredNetworkEntry, WirelessNetworkEntry from guiutil import error, LabelEntry if __name__ == '__main__': wpath.chdir(__file__) proxy_obj = daemon = wireless = wired = bus = None DBUS_AVAIL = False def setup_dbus(force=True): global bus, daemon, wireless, wired, DBUS_AVAIL try: dbusmanager.connect_to_dbus() except DBusException: if force: print "Can't connect to the daemon, trying to start it automatically..." if not misc.PromptToStartDaemon(): print "Failed to find a graphical sudo program, cannot continue." return False try: dbusmanager.connect_to_dbus() except DBusException: error(None, _("Could not connect to wicd's D-Bus interface. Check the wicd log for error messages.")) return False else: return False prefs.setup_dbus() netentry.setup_dbus() bus = dbusmanager.get_bus() dbus_ifaces = dbusmanager.get_dbus_ifaces() daemon = dbus_ifaces['daemon'] wireless = dbus_ifaces['wireless'] wired = dbus_ifaces['wired'] DBUS_AVAIL = True return True def handle_no_dbus(from_tray=False): global DBUS_AVAIL DBUS_AVAIL = False if from_tray: return False print "Wicd daemon is shutting down!" error(None, _('The wicd daemon has shut down. The UI will not function properly until it is restarted.'), block=False) return False class WiredProfileChooser: """ Class for displaying the wired profile chooser. """ def __init__(self): """ Initializes and runs the wired profile chooser. """ # Import and init WiredNetworkEntry to steal some of the # functions and widgets it uses. wired_net_entry = WiredNetworkEntry() dialog = gtk.Dialog(title = _('Wired connection detected'), flags = gtk.DIALOG_MODAL, buttons = (gtk.STOCK_CONNECT, 1, gtk.STOCK_CANCEL, 2)) dialog.set_has_separator(False) dialog.set_size_request(400, 150) instruct_label = gtk.Label(_('Select or create a wired profile to connect with') + ':\n') stoppopcheckbox = gtk.CheckButton(_('Stop Showing Autoconnect pop-up temporarily')) wired_net_entry.is_full_gui = False instruct_label.set_alignment(0, 0) stoppopcheckbox.set_active(False) # Remove widgets that were added to the normal WiredNetworkEntry # so that they can be added to the pop-up wizard. wired_net_entry.vbox_top.remove(wired_net_entry.hbox_temp) wired_net_entry.vbox_top.remove(wired_net_entry.profile_help) dialog.vbox.pack_start(instruct_label, fill=False, expand=False) dialog.vbox.pack_start(wired_net_entry.profile_help, False, False) dialog.vbox.pack_start(wired_net_entry.hbox_temp, False, False) dialog.vbox.pack_start(stoppopcheckbox, False, False) dialog.show_all() wired_profiles = wired_net_entry.combo_profile_names wired_net_entry.profile_help.hide() if wired_net_entry.profile_list != None: wired_profiles.set_active(0) print "wired profiles found" else: print "no wired profiles found" wired_net_entry.profile_help.show() response = dialog.run() if response == 1: print 'reading profile ', wired_profiles.get_active_text() wired.ReadWiredNetworkProfile(wired_profiles.get_active_text()) wired.ConnectWired() else: if stoppopcheckbox.get_active(): daemon.SetForcedDisconnect(True) dialog.destroy() def get_wireless_prop(net_id, prop): return wireless.GetWirelessProperty(net_id, prop) class appGui(object): """ The main wicd GUI class. """ def __init__(self, standalone=False, tray=None): """ Initializes everything needed for the GUI. """ setup_dbus() if not daemon: errmsg = "Error connecting to wicd service via D-Bus." + \ "Please ensure the wicd service is running." d = gtk.MessageDialog(parent=None, flags=gtk.DIALOG_MODAL, type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK, message_format=errmsg) d.run() sys.exit(1) self.tray = tray gladefile = os.path.join(wpath.gtk, "wicd.ui") self.wTree = gtk.Builder() self.wTree.set_translation_domain('wicd') self.wTree.add_from_file(gladefile) self.window = self.wTree.get_object("window1") width = int(gtk.gdk.screen_width() / 2) if width > 530: width = 530 self.window.resize(width, int(gtk.gdk.screen_height() / 1.7)) dic = { "refresh_clicked" : self.refresh_clicked, "quit_clicked" : self.exit, "rfkill_clicked" : self.switch_rfkill, "disconnect_clicked" : self.disconnect_all, "main_exit" : self.exit, "cancel_clicked" : self.cancel_connect, "hidden_clicked" : self.connect_hidden, "preferences_clicked" : self.settings_dialog, "about_clicked" : self.about_dialog, "create_adhoc_clicked" : self.create_adhoc_network, } self.wTree.connect_signals(dic) # Set some strings in the GUI - they may be translated label_instruct = self.wTree.get_object("label_instructions") label_instruct.set_label(_('Choose from the networks below:')) probar = self.wTree.get_object("progressbar") probar.set_text(_('Connecting')) self.rfkill_button = self.wTree.get_object("rfkill_button") self.all_network_list = self.wTree.get_object("network_list_vbox") self.all_network_list.show_all() self.wired_network_box = gtk.VBox(False, 0) self.wired_network_box.show_all() self.network_list = gtk.VBox(False, 0) self.all_network_list.pack_start(self.wired_network_box, False, False) self.all_network_list.pack_start(self.network_list, True, True) self.network_list.show_all() self.status_area = self.wTree.get_object("connecting_hbox") self.status_bar = self.wTree.get_object("statusbar") menu = self.wTree.get_object("menu1") self.status_area.hide_all() if os.path.exists(os.path.join(wpath.images, "wicd.png")): self.window.set_icon_from_file(os.path.join(wpath.images, "wicd.png")) self.statusID = None self.first_dialog_load = True self.is_visible = True self.pulse_active = False self.pref = None self.standalone = standalone self.wpadrivercombo = None self.connecting = False self.refreshing = False self.prev_state = None self.update_cb = None self._wired_showing = False self.network_list.set_sensitive(False) label = gtk.Label("%s..." % _('Scanning')) self.network_list.pack_start(label) label.show() self.wait_for_events(0.2) self.window.connect('delete_event', self.exit) self.window.connect('key-release-event', self.key_event) daemon.SetGUIOpen(True) bus.add_signal_receiver(self.dbus_scan_finished, 'SendEndScanSignal', 'org.wicd.daemon.wireless') bus.add_signal_receiver(self.dbus_scan_started, 'SendStartScanSignal', 'org.wicd.daemon.wireless') bus.add_signal_receiver(self.update_connect_buttons, 'StatusChanged', 'org.wicd.daemon') bus.add_signal_receiver(self.handle_connection_results, 'ConnectResultsSent', 'org.wicd.daemon') bus.add_signal_receiver(lambda: setup_dbus(force=False), "DaemonStarting", "org.wicd.daemon") bus.add_signal_receiver(self._do_statusbar_update, 'StatusChanged', 'org.wicd.daemon') if standalone: bus.add_signal_receiver(handle_no_dbus, "DaemonClosing", "org.wicd.daemon") self._do_statusbar_update(*daemon.GetConnectionStatus()) self.wait_for_events(0.1) self.update_cb = misc.timeout_add(2, self.update_statusbar) self.refresh_clicked() def handle_connection_results(self, results): if results not in ['success', 'aborted'] and self.is_visible: error(self.window, language[results], block=False) def create_adhoc_network(self, widget=None): """ Shows a dialog that creates a new adhoc network. """ print "Starting the Ad-Hoc Network Creation Process..." dialog = gtk.Dialog(title = _('Create an Ad-Hoc Network'), flags = gtk.DIALOG_MODAL, buttons=(gtk.STOCK_CANCEL, 2, gtk.STOCK_OK, 1)) dialog.set_has_separator(False) dialog.set_size_request(400, -1) self.chkbox_use_encryption = gtk.CheckButton(_('Use Encryption (WEP only)')) self.chkbox_use_encryption.set_active(False) ip_entry = LabelEntry(_('IP') + ':') essid_entry = LabelEntry(_('ESSID') + ':') channel_entry = LabelEntry(_('Channel') + ':') self.key_entry = LabelEntry(_('Key') + ':') self.key_entry.set_auto_hidden(True) self.key_entry.set_sensitive(False) chkbox_use_ics = gtk.CheckButton( _('Activate Internet Connection Sharing')) self.chkbox_use_encryption.connect("toggled", self.toggle_encrypt_check) channel_entry.entry.set_text('3') essid_entry.entry.set_text('My_Adhoc_Network') ip_entry.entry.set_text('169.254.12.10') # Just a random IP vbox_ah = gtk.VBox(False, 0) self.wired_network_box = gtk.VBox(False, 0) vbox_ah.pack_start(self.chkbox_use_encryption, False, False) vbox_ah.pack_start(self.key_entry, False, False) vbox_ah.show() dialog.vbox.pack_start(essid_entry) dialog.vbox.pack_start(ip_entry) dialog.vbox.pack_start(channel_entry) dialog.vbox.pack_start(chkbox_use_ics) dialog.vbox.pack_start(vbox_ah) dialog.vbox.set_spacing(5) dialog.show_all() response = dialog.run() if response == 1: wireless.CreateAdHocNetwork(essid_entry.entry.get_text(), channel_entry.entry.get_text(), ip_entry.entry.get_text().strip(), "WEP", self.key_entry.entry.get_text(), self.chkbox_use_encryption.get_active(), False) #chkbox_use_ics.get_active()) dialog.destroy() def toggle_encrypt_check(self, widget=None): """ Toggles the encryption key entry box for the ad-hoc dialog. """ self.key_entry.set_sensitive(self.chkbox_use_encryption.get_active()) def switch_rfkill(self, widget=None): """ Switches wifi card on/off. """ wireless.SwitchRfKill() if wireless.GetRfKillEnabled(): self.rfkill_button.set_stock_id(gtk.STOCK_MEDIA_PLAY) self.rfkill_button.set_label(_('Switch On Wi-Fi')) else: self.rfkill_button.set_stock_id(gtk.STOCK_MEDIA_STOP) self.rfkill_button.set_label(_('Switch Off Wi-Fi')) def disconnect_all(self, widget=None): """ Disconnects from any active network. """ def handler(*args): gobject.idle_add(self.all_network_list.set_sensitive, True) self.all_network_list.set_sensitive(False) daemon.Disconnect(reply_handler=handler, error_handler=handler) def about_dialog(self, widget, event=None): """ Displays an about dialog. """ dialog = gtk.AboutDialog() dialog.set_name("Wicd") dialog.set_version(daemon.Hello()) dialog.set_authors([ "Adam Blackburn", "Dan O'Reilly", "Andrew Psaltis", "David Paleino"]) dialog.set_website("http://wicd.sourceforge.net") dialog.run() dialog.destroy() def key_event (self, widget, event=None): """ Handle key-release-events. """ if event.state & gtk.gdk.CONTROL_MASK and \ gtk.gdk.keyval_name(event.keyval) in ["w", "q"]: self.exit() def settings_dialog(self, widget, event=None): """ Displays a general settings dialog. """ if not self.pref: self.pref = PreferencesDialog(self, self.wTree) else: self.pref.load_preferences_diag() if self.pref.run() == 1: self.pref.save_results() self.pref.hide() def connect_hidden(self, widget): """ Prompts the user for a hidden network, then scans for it. """ dialog = gtk.Dialog(title=('Hidden Network'), flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_CONNECT, 1, gtk.STOCK_CANCEL, 2)) dialog.set_has_separator(False) lbl = gtk.Label(_('Hidden Network ESSID')) textbox = gtk.Entry() dialog.vbox.pack_start(lbl) dialog.vbox.pack_start(textbox) dialog.show_all() button = dialog.run() if button == 1: answer = textbox.get_text() dialog.destroy() self.refresh_networks(None, True, answer) else: dialog.destroy() def cancel_connect(self, widget): """ Alerts the daemon to cancel the connection process. """ #should cancel a connection if there #is one in progress cancel_button = self.wTree.get_object("cancel_button") cancel_button.set_sensitive(False) daemon.CancelConnect() # Prevents automatic reconnecting if that option is enabled daemon.SetForcedDisconnect(True) def pulse_progress_bar(self): """ Pulses the progress bar while connecting to a network. """ if not self.pulse_active: return False if not self.is_visible: return True try: gobject.idle_add(self.wTree.get_object("progressbar").pulse) except: pass return True def update_statusbar(self): """ Triggers a status update in wicd-monitor. """ if not self.is_visible: return True daemon.UpdateState() if self.connecting: # If we're connecting, don't wait for the monitor to send # us a signal, since it won't until the connection is made. self._do_statusbar_update(*daemon.GetConnectionStatus()) return True def _do_statusbar_update(self, state, info): if not self.is_visible: return True if state == misc.WIRED: return self.set_wired_state(info) elif state == misc.WIRELESS: return self.set_wireless_state(info) elif state == misc.CONNECTING: return self.set_connecting_state(info) elif state in (misc.SUSPENDED, misc.NOT_CONNECTED): return self.set_not_connected_state(info) return True def set_wired_state(self, info): if self.connecting: # Adjust our state from connecting->connected. self._set_not_connecting_state() self.set_status(_('Connected to wired network (IP: $A)').replace('$A', info[0])) return True def set_wireless_state(self, info): if self.connecting: # Adjust our state from connecting->connected. self._set_not_connecting_state() self.set_status(_('Connected to $A at $B (IP: $C)').replace ('$A', info[1]).replace ('$B', daemon.FormatSignalForPrinting(info[2])).replace ('$C', info[0])) return True def set_not_connected_state(self, info): if self.connecting: # Adjust our state from connecting->not-connected. self._set_not_connecting_state() self.set_status(_('Not connected')) return True def _set_not_connecting_state(self): if self.connecting: if self.update_cb: gobject.source_remove(self.update_cb) self.update_cb = misc.timeout_add(2, self.update_statusbar) self.connecting = False if self.pulse_active: self.pulse_active = False gobject.idle_add(self.all_network_list.set_sensitive, True) gobject.idle_add(self.status_area.hide_all) if self.statusID: gobject.idle_add(self.status_bar.remove_message, 1, self.statusID) def set_connecting_state(self, info): if not self.connecting: if self.update_cb: gobject.source_remove(self.update_cb) self.update_cb = misc.timeout_add(500, self.update_statusbar, milli=True) self.connecting = True if not self.pulse_active: self.pulse_active = True misc.timeout_add(100, self.pulse_progress_bar, milli=True) gobject.idle_add(self.all_network_list.set_sensitive, False) gobject.idle_add(self.status_area.show_all) if self.statusID: gobject.idle_add(self.status_bar.remove_message, 1, self.statusID) if info[0] == "wireless": stat = wireless.CheckWirelessConnectingMessage() gobject.idle_add(self.set_status, "%s: %s" % (info[1], stat)) elif info[0] == "wired": gobject.idle_add(self.set_status, _('Wired Network') + ': ' \ + wired.CheckWiredConnectingMessage()) return True def update_connect_buttons(self, state=None, x=None, force_check=False): """ Updates the connect/disconnect buttons for each network entry. If force_check is given, update the buttons even if the current network state is the same as the previous. """ if not DBUS_AVAIL: return if not state: state, x = daemon.GetConnectionStatus() if self.prev_state != state or force_check: apbssid = wireless.GetApBssid() for entry in chain(self.network_list, self.wired_network_box): if hasattr(entry, "update_connect_button"): entry.update_connect_button(state, apbssid) self.prev_state = state def set_status(self, msg): """ Sets the status bar message for the GUI. """ self.statusID = self.status_bar.push(1, msg) def dbus_scan_finished(self): """ Calls for a non-fresh update of the gui window. This method is called after a wireless scan is completed. """ if not DBUS_AVAIL: return gobject.idle_add(self.refresh_networks, None, False, None) def dbus_scan_started(self): """ Called when a wireless scan starts. """ if not DBUS_AVAIL: return self.network_list.set_sensitive(False) def _remove_items_from_vbox(self, vbox): for z in vbox: vbox.remove(z) z.destroy() del z def refresh_clicked(self, widget=None): """ Kick off an asynchronous wireless scan. """ if not DBUS_AVAIL or self.connecting: return self.refreshing = True # Remove stuff already in there. self._remove_items_from_vbox(self.wired_network_box) self._remove_items_from_vbox(self.network_list) label = gtk.Label("%s..." % _('Scanning')) self.network_list.pack_start(label) self.network_list.show_all() if wired.CheckPluggedIn() or daemon.GetAlwaysShowWiredInterface(): printLine = True # In this case we print a separator. wirednet = WiredNetworkEntry() self.wired_network_box.pack_start(wirednet, False, False) wirednet.connect_button.connect("clicked", self.connect, "wired", 0, wirednet) wirednet.disconnect_button.connect("clicked", self.disconnect, "wired", 0, wirednet) wirednet.advanced_button.connect("clicked", self.edit_advanced, "wired", 0, wirednet) state, x = daemon.GetConnectionStatus() wirednet.update_connect_button(state) self._wired_showing = True else: self._wired_showing = False wireless.Scan(False) def refresh_networks(self, widget=None, fresh=True, hidden=None): """ Refreshes the network list. If fresh=True, scans for wireless networks and displays the results. If a ethernet connection is available, or the user has chosen to, displays a Wired Network entry as well. If hidden isn't None, will scan for networks after running iwconfig essid . """ if fresh: if hidden: wireless.SetHiddenNetworkESSID(noneToString(hidden)) self.refresh_clicked() return print "refreshing..." self.network_list.set_sensitive(False) self._remove_items_from_vbox(self.network_list) self.wait_for_events() printLine = False # We don't print a separator by default. if self._wired_showing: printLine = True num_networks = wireless.GetNumberOfNetworks() instruct_label = self.wTree.get_object("label_instructions") if num_networks > 0: skip_never_connect = not daemon.GetShowNeverConnect() instruct_label.show() for x in xrange(0, num_networks): if skip_never_connect and misc.to_bool(get_wireless_prop(x,'never')): continue if printLine: sep = gtk.HSeparator() self.network_list.pack_start(sep, padding=10, fill=False, expand=False) sep.show() else: printLine = True tempnet = WirelessNetworkEntry(x) self.network_list.pack_start(tempnet, False, False) tempnet.connect_button.connect("clicked", self.connect, "wireless", x, tempnet) tempnet.disconnect_button.connect("clicked", self.disconnect, "wireless", x, tempnet) tempnet.advanced_button.connect("clicked", self.edit_advanced, "wireless", x, tempnet) else: instruct_label.hide() if wireless.GetKillSwitchEnabled(): label = gtk.Label(_('Wireless Kill Switch Enabled') + ".") else: label = gtk.Label(_('No wireless networks found.')) self.network_list.pack_start(label) label.show() self.update_connect_buttons(force_check=True) self.network_list.set_sensitive(True) self.refreshing = False def save_settings(self, nettype, networkid, networkentry): """ Verifies and saves the settings for the network entry. """ entry = networkentry.advanced_dialog opt_entlist = [] req_entlist = [] # First make sure all the Addresses entered are valid. if entry.chkbox_static_ip.get_active(): req_entlist = [entry.txt_ip, entry.txt_netmask] opt_entlist = [entry.txt_gateway] if entry.chkbox_static_dns.get_active() and \ not entry.chkbox_global_dns.get_active(): for ent in [entry.txt_dns_1, entry.txt_dns_2, entry.txt_dns_3]: opt_entlist.append(ent) # Required entries. for lblent in req_entlist: lblent.set_text(lblent.get_text().strip()) if not misc.IsValidIP(lblent.get_text()): error(self.window, _('Invalid address in $A entry.'). replace('$A', lblent.label.get_label())) return False # Optional entries, only check for validity if they're entered. for lblent in opt_entlist: lblent.set_text(lblent.get_text().strip()) if lblent.get_text() and not misc.IsValidIP(lblent.get_text()): error(self.window, _('Invalid address in $A entry.'). replace('$A', lblent.label.get_label())) return False # Now save the settings. if nettype == "wireless": if not networkentry.save_wireless_settings(networkid): return False elif nettype == "wired": if not networkentry.save_wired_settings(): return False return True def edit_advanced(self, widget, ttype, networkid, networkentry): """ Display the advanced settings dialog. Displays the advanced settings dialog and saves any changes made. If errors occur in the settings, an error message will be displayed and the user won't be able to save the changes until the errors are fixed. """ dialog = networkentry.advanced_dialog dialog.set_values() dialog.show_all() while True: if self.run_settings_dialog(dialog, ttype, networkid, networkentry): break dialog.hide() def run_settings_dialog(self, dialog, nettype, networkid, networkentry): """ Runs the settings dialog. Runs the settings dialog and returns True if settings are saved successfully, and false otherwise. """ result = dialog.run() if result == gtk.RESPONSE_ACCEPT: if self.save_settings(nettype, networkid, networkentry): return True else: return False return True def check_encryption_valid(self, networkid, entry): """ Make sure that encryption settings are properly filled in. """ # Make sure no entries are left blank if entry.chkbox_encryption.get_active(): encryption_info = entry.encryption_info for entry_info in encryption_info.itervalues(): if entry_info[0].entry.get_text() == "" and \ entry_info[1] == 'required': error(self.window, "%s (%s)" % (_('Required encryption information is missing.'), entry_info[0].label.get_label()) ) return False # Make sure the checkbox is checked when it should be elif not entry.chkbox_encryption.get_active() and \ wireless.GetWirelessProperty(networkid, "encryption"): error(self.window, _('This network requires encryption to be enabled.')) return False return True def _wait_for_connect_thread_start(self): self.wTree.get_object("progressbar").pulse() if not self._connect_thread_started: return True else: misc.timeout_add(2, self.update_statusbar) self.update_statusbar() return False def connect(self, widget, nettype, networkid, networkentry): """ Initiates the connection process in the daemon. """ def handler(*args): self._connect_thread_started = True def setup_interface_for_connection(): cancel_button = self.wTree.get_object("cancel_button") cancel_button.set_sensitive(True) self.all_network_list.set_sensitive(False) if self.statusID: gobject.idle_add(self.status_bar.remove_message, 1, self.statusID) gobject.idle_add(self.set_status, _('Disconnecting active connections...')) gobject.idle_add(self.status_area.show_all) self.wait_for_events() self._connect_thread_started = False if nettype == "wireless": if not self.check_encryption_valid(networkid, networkentry.advanced_dialog): self.edit_advanced(None, nettype, networkid, networkentry) return False setup_interface_for_connection() wireless.ConnectWireless(networkid, reply_handler=handler, error_handler=handler) elif nettype == "wired": setup_interface_for_connection() wired.ConnectWired(reply_handler=handler, error_handler=handler) gobject.source_remove(self.update_cb) misc.timeout_add(100, self._wait_for_connect_thread_start, milli=True) def disconnect(self, widget, nettype, networkid, networkentry): """ Disconnects from the given network. Keyword arguments: widget -- The disconnect button that was pressed. event -- unused nettype -- "wired" or "wireless", depending on the network entry type. networkid -- unused networkentry -- The NetworkEntry containing the disconnect button. """ def handler(*args): gobject.idle_add(self.all_network_list.set_sensitive, True) gobject.idle_add(self.network_list.set_sensitive, True) widget.hide() networkentry.connect_button.show() daemon.SetForcedDisconnect(True) self.network_list.set_sensitive(False) if nettype == "wired": wired.DisconnectWired(reply_handler=handler, error_handler=handler) else: wireless.DisconnectWireless(reply_handler=handler, error_handler=handler) def wait_for_events(self, amt=0): """ Wait for any pending gtk events to finish before moving on. Keyword arguments: amt -- a number specifying the number of ms to wait before checking for pending events. """ time.sleep(amt) while gtk.events_pending(): gtk.main_iteration() def exit(self, widget=None, event=None): """ Hide the wicd GUI. This method hides the wicd GUI and writes the current window size to disc for later use. This method normally does NOT actually destroy the GUI, it just hides it. """ self.window.hide() gobject.source_remove(self.update_cb) bus.remove_signal_receiver(self._do_statusbar_update, 'StatusChanged', 'org.wicd.daemon') [width, height] = self.window.get_size() try: daemon.SetGUIOpen(False) except DBusException: pass if self.standalone: sys.exit(0) self.is_visible = False return True def show_win(self): """ Brings the GUI out of the hidden state. Method to show the wicd GUI, alert the daemon that it is open, and refresh the network list. """ self.window.present() self.window.deiconify() self.wait_for_events() self.is_visible = True daemon.SetGUIOpen(True) self.wait_for_events(0.1) gobject.idle_add(self.refresh_clicked) self._do_statusbar_update(*daemon.GetConnectionStatus()) bus.add_signal_receiver(self._do_statusbar_update, 'StatusChanged', 'org.wicd.daemon') self.update_cb = misc.timeout_add(2, self.update_statusbar) if __name__ == '__main__': setup_dbus() app = appGui(standalone=True) mainloop = gobject.MainLoop() mainloop.run() wicd-1.7.2.4/gtk/prefs.py0000664000175000017500000004417111715676313015312 0ustar daviddavid00000000000000#!/usr/bin/python """ prefs -- Wicd Preferences Dialog. Displays the main settings dialog window for wicd and handles recieving/sendings the settings from/to the daemon. """ # # Copyright (C) 2008-2009 Adam Blackburn # Copyright (C) 2008-2009 Dan O'Reilly # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # import gtk import gobject #import pango import os from wicd import misc from wicd import wpath from wicd import dbusmanager from wicd.misc import checkboxTextboxToggle, noneToBlankString from wicd.translations import _ daemon = None wireless = None wired = None from wicd.translations import language USER_SETTINGS_DIR = os.path.expanduser('~/.wicd/') def setup_dbus(): global daemon, wireless, wired daemon = dbusmanager.get_interface('daemon') wireless = dbusmanager.get_interface('wireless') wired = dbusmanager.get_interface('wired') class PreferencesDialog(object): """ Class for handling the wicd preferences dialog window. """ def __init__(self, parent, wTree): setup_dbus() self.parent = parent self.wTree = wTree self.prep_settings_diag() self.load_preferences_diag() def _setup_external_app_radios(self, radio_list, get_method, set_method): """ Generic function for setting up external app radios. """ # Disable radios for apps that aren't installed. for app in radio_list[1:]: app.set_sensitive(daemon.GetAppAvailable(app.get_label())) selected_app = get_method() # Make sure the app we want to select is actually available. if radio_list[selected_app].get_property("sensitive"): radio_list[selected_app].set_active(True) else: # If it isn't, default to Automatic. set_method(misc.AUTO) radio_list[misc.AUTO].set_active(True) def load_preferences_diag(self): """ Loads data into the preferences Dialog. """ self.wiredcheckbox.set_active(daemon.GetAlwaysShowWiredInterface()) self.reconnectcheckbox.set_active(daemon.GetAutoReconnect()) self.debugmodecheckbox.set_active(daemon.GetDebugMode()) self.displaytypecheckbox.set_active(daemon.GetSignalDisplayType()) self.verifyapcheckbox.set_active(daemon.GetShouldVerifyAp()) self.preferwiredcheckbox.set_active(daemon.GetPreferWiredNetwork()) self.showneverconnectcheckbox.set_active(daemon.GetShowNeverConnect()) dhcp_list = [self.dhcpautoradio, self.dhclientradio, self.dhcpcdradio, self.pumpradio, self.udhcpcradio] self._setup_external_app_radios(dhcp_list, daemon.GetDHCPClient, daemon.SetDHCPClient) wired_link_list = [self.linkautoradio, self.ethtoolradio, self.miitoolradio] self._setup_external_app_radios(wired_link_list, daemon.GetLinkDetectionTool, daemon.SetLinkDetectionTool) flush_list = [self.flushautoradio, self.ipflushradio, self.routeflushradio] self._setup_external_app_radios(flush_list, daemon.GetFlushTool, daemon.SetFlushTool) sudo_list = [self.sudoautoradio, self.gksudoradio, self.kdesuradio, self.ktsussradio] self._setup_external_app_radios(sudo_list, daemon.GetSudoApp, daemon.SetSudoApp) auto_conn_meth = daemon.GetWiredAutoConnectMethod() if auto_conn_meth == 1: self.usedefaultradiobutton.set_active(True) elif auto_conn_meth == 2: self.showlistradiobutton.set_active(True) elif auto_conn_meth == 3: self.lastusedradiobutton.set_active(True) self.entryWirelessInterface.set_text(daemon.GetWirelessInterface()) self.entryWiredInterface.set_text(daemon.GetWiredInterface()) def_driver = daemon.GetWPADriver() try: self.wpadrivercombo.set_active(self.wpadrivers.index(def_driver)) except ValueError: self.wpadrivercombo.set_active(0) self.useGlobalDNSCheckbox.connect("toggled", checkboxTextboxToggle, (self.dns1Entry, self.dns2Entry, self.dns3Entry, self.dnsDomEntry, self.searchDomEntry)) dns_addresses = daemon.GetGlobalDNSAddresses() self.useGlobalDNSCheckbox.set_active(daemon.GetUseGlobalDNS()) self.dns1Entry.set_text(noneToBlankString(dns_addresses[0])) self.dns2Entry.set_text(noneToBlankString(dns_addresses[1])) self.dns3Entry.set_text(noneToBlankString(dns_addresses[2])) self.dnsDomEntry.set_text(noneToBlankString(dns_addresses[3])) self.searchDomEntry.set_text(noneToBlankString(dns_addresses[4])) if not daemon.GetUseGlobalDNS(): self.searchDomEntry.set_sensitive(False) self.dnsDomEntry.set_sensitive(False) self.dns1Entry.set_sensitive(False) self.dns2Entry.set_sensitive(False) self.dns3Entry.set_sensitive(False) cur_backend = daemon.GetSavedBackend() try: self.backendcombo.set_active(self.backends.index(cur_backend)) except ValueError: self.backendcombo.set_active(0) self.notificationscheckbox.set_active( os.path.exists( os.path.join(USER_SETTINGS_DIR, 'USE_NOTIFICATIONS') )) # if pynotify isn't installed disable the option try: import pynotify except ImportError: self.notificationscheckbox.set_active(False) self.notificationscheckbox.set_sensitive(False) # if notifications were disabled with the configure flag if wpath.no_use_notifications: self.notificationscheckbox.set_active(False) self.notificationscheckbox.hide() self.wTree.get_object('label2').hide() self.wTree.get_object("notebook2").set_current_page(0) def run(self): """ Runs the preferences dialog window. """ return self.dialog.run() def hide(self): """ Hides the preferences dialog window. """ self.dialog.hide() def destroy(self): self.dialog.destroy() def show_all(self): """ Shows the preferences dialog window. """ self.dialog.show() def save_results(self): """ Pushes the selected settings to the daemon. """ daemon.SetUseGlobalDNS(self.useGlobalDNSCheckbox.get_active()) # Strip whitespace from DNS entries for i in [self.dns1Entry, self.dns2Entry, self.dns3Entry, self.dnsDomEntry, self.searchDomEntry]: i.set_text(i.get_text().strip()) daemon.SetGlobalDNS(self.dns1Entry.get_text(), self.dns2Entry.get_text(), self.dns3Entry.get_text(), self.dnsDomEntry.get_text(), self.searchDomEntry.get_text()) daemon.SetWirelessInterface(self.entryWirelessInterface.get_text()) daemon.SetWiredInterface(self.entryWiredInterface.get_text()) daemon.SetWPADriver(self.wpadrivers[self.wpadrivercombo.get_active()]) daemon.SetAlwaysShowWiredInterface(self.wiredcheckbox.get_active()) daemon.SetAutoReconnect(self.reconnectcheckbox.get_active()) daemon.SetDebugMode(self.debugmodecheckbox.get_active()) daemon.SetSignalDisplayType(int(self.displaytypecheckbox.get_active())) daemon.SetShouldVerifyAp(bool(self.verifyapcheckbox.get_active())) daemon.SetPreferWiredNetwork(bool(self.preferwiredcheckbox.get_active())) daemon.SetShowNeverConnect(bool(self.showneverconnectcheckbox.get_active())) if self.showlistradiobutton.get_active(): daemon.SetWiredAutoConnectMethod(2) elif self.lastusedradiobutton.get_active(): daemon.SetWiredAutoConnectMethod(3) else: daemon.SetWiredAutoConnectMethod(1) daemon.SetBackend(self.backends[self.backendcombo.get_active()]) # External Programs Tab if self.dhcpautoradio.get_active(): dhcp_client = misc.AUTO elif self.dhclientradio.get_active(): dhcp_client = misc.DHCLIENT elif self.dhcpcdradio.get_active(): dhcp_client = misc.DHCPCD elif self.pumpradio.get_active(): dhcp_client = misc.PUMP else: dhcp_client = misc.UDHCPC daemon.SetDHCPClient(dhcp_client) if self.linkautoradio.get_active(): link_tool = misc.AUTO elif self.ethtoolradio.get_active(): link_tool = misc.ETHTOOL else: link_tool = misc.MIITOOL daemon.SetLinkDetectionTool(link_tool) if self.flushautoradio.get_active(): flush_tool = misc.AUTO elif self.ipflushradio.get_active(): flush_tool = misc.IP else: flush_tool = misc.ROUTE daemon.SetFlushTool(flush_tool) if self.sudoautoradio.get_active(): sudo_tool = misc.AUTO elif self.gksudoradio.get_active(): sudo_tool = misc.GKSUDO elif self.kdesuradio.get_active(): sudo_tool = misc.KDESU else: sudo_tool = misc.KTSUSS daemon.SetSudoApp(sudo_tool) [width, height] = self.dialog.get_size() not_path = os.path.join(USER_SETTINGS_DIR, 'USE_NOTIFICATIONS') if self.notificationscheckbox.get_active(): if not os.path.exists(not_path): open(not_path, 'w') else: if os.path.exists(not_path): os.remove(not_path) # if this GUI was started by a tray icon, # instantly change the notifications there if self.parent.tray: self.parent.tray.icon_info.use_notify = \ self.notificationscheckbox.get_active() def set_label(self, glade_str, label): """ Sets the label for the given widget in wicd.glade. """ self.wTree.get_object(glade_str).set_label(label) def prep_settings_diag(self): """ Set up anything that doesn't have to be persisted later. """ def build_combobox(lbl): """ Sets up a ComboBox using the given widget name. """ liststore = gtk.ListStore(gobject.TYPE_STRING) combobox = self.wTree.get_object(lbl) combobox.clear() combobox.set_model(liststore) cell = gtk.CellRendererText() combobox.pack_start(cell, True) combobox.add_attribute(cell, 'text', 0) return combobox def setup_label(name, lbl=""): """ Sets up a label for the given widget name. """ widget = self.wTree.get_object(name) # if lbl: # widget.set_label(lbl) if widget is None: raise ValueError('widget %s does not exist' % name) return widget # External Programs tab # self.wTree.get_object("gen_settings_label").set_label(_('General Settings')) # self.wTree.get_object("ext_prog_label").set_label(_('External Programs')) # self.wTree.get_object("dhcp_client_label").set_label(_('DHCP Client')) # self.wTree.get_object("wired_detect_label").set_label(_('Wired Link Detection')) # self.wTree.get_object("route_flush_label").set_label(_('Route Table Flushing')) # self.wTree.get_object("pref_backend_label").set_label(_('Backend') + ":") # entryWiredAutoMethod = self.wTree.get_object("pref_wired_auto_label") # entryWiredAutoMethod.set_label('Wired Autoconnect Setting:') # entryWiredAutoMethod.set_alignment(0, 0) # atrlist = pango.AttrList() # atrlist.insert(pango.AttrWeight(pango.WEIGHT_BOLD, 0, 50)) # entryWiredAutoMethod.set_attributes(atrlist) # self.set_label("pref_dns1_label", "%s 1" % _('DNS server')) # self.set_label("pref_dns2_label", "%s 2" % _('DNS server')) # self.set_label("pref_dns3_label", "%s 3" % _('DNS server')) # self.set_label("pref_search_dom_label", "%s:" % _('Search domain')) # self.set_label("pref_wifi_label", "%s:" % _('Wireless Interface')) # self.set_label("pref_wired_label", "%s:" % _('Wired Interface')) # self.set_label("pref_driver_label", "%s:" % _('WPA Supplicant Driver')) self.dialog = self.wTree.get_object("pref_dialog") self.dialog.set_title(_('Preferences')) if os.path.exists(os.path.join(wpath.images, "wicd.png")): self.dialog.set_icon_from_file(os.path.join(wpath.images, "wicd.png")) width = int(gtk.gdk.screen_width() / 2.4) if width > 450: width = 450 self.dialog.resize(width, int(gtk.gdk.screen_height() / 2)) self.wiredcheckbox = setup_label("pref_always_check", _('''Always show wired interface''')) self.preferwiredcheckbox = setup_label("pref_prefer_wired_check", "prefer_wired") self.reconnectcheckbox = setup_label("pref_auto_check", _('Automatically reconnect on connection loss')) self.showneverconnectcheckbox = setup_label("pref_show_never_connect_check", _('Show never connect networks')) self.debugmodecheckbox = setup_label("pref_debug_check", _('Enable debug mode')) self.displaytypecheckbox = setup_label("pref_dbm_check", _('Use dBm to measure signal strength')) self.verifyapcheckbox = setup_label("pref_verify_ap_check", _('Ping static gateways after connecting to verify association')) self.usedefaultradiobutton = setup_label("pref_use_def_radio", _('Use default profile on wired autoconnect')) self.showlistradiobutton = setup_label("pref_prompt_radio", _('Prompt for profile on wired autoconnect')) self.lastusedradiobutton = setup_label("pref_use_last_radio", _('Use last used profile on wired autoconnect')) self.notificationscheckbox = setup_label("pref_use_libnotify", _('Display notifications about connection status')) # DHCP Clients self.dhcpautoradio = setup_label("dhcp_auto_radio", _('Automatic (recommended)')) self.dhclientradio = self.wTree.get_object("dhclient_radio") self.pumpradio = self.wTree.get_object("pump_radio") self.dhcpcdradio = self.wTree.get_object("dhcpcd_radio") self.udhcpcradio = self.wTree.get_object("udhcpc_radio") # Wired Link Detection Apps self.linkautoradio = setup_label("link_auto_radio", _('Automatic (recommended)')) self.linkautoradio = setup_label("link_auto_radio") self.ethtoolradio = setup_label("ethtool_radio") self.miitoolradio = setup_label("miitool_radio") # Route Flushing Apps self.flushautoradio = setup_label("flush_auto_radio", _('Automatic (recommended)')) self.ipflushradio = setup_label("ip_flush_radio") self.routeflushradio = setup_label("route_flush_radio") # Graphical Sudo Apps self.sudoautoradio = setup_label("sudo_auto_radio", _('Automatic (recommended)')) self.gksudoradio = setup_label("gksudo_radio") self.kdesuradio = setup_label("kdesu_radio") self.ktsussradio = setup_label("ktsuss_radio") # Replacement for the combo box hack self.wpadrivercombo = build_combobox("pref_wpa_combobox") self.wpadrivers = wireless.GetWpaSupplicantDrivers() self.wpadrivers.append("ralink_legacy") self.wpadrivers.append('none') for x in self.wpadrivers: self.wpadrivercombo.append_text(x) self.entryWirelessInterface = self.wTree.get_object("pref_wifi_entry") self.entryWiredInterface = self.wTree.get_object("pref_wired_entry") # Set up global DNS stuff self.useGlobalDNSCheckbox = setup_label("pref_global_check", 'use_global_dns') self.searchDomEntry = self.wTree.get_object("pref_search_dom_entry") self.dnsDomEntry = self.wTree.get_object("pref_dns_dom_entry") self.dns1Entry = self.wTree.get_object("pref_dns1_entry") self.dns2Entry = self.wTree.get_object("pref_dns2_entry") self.dns3Entry = self.wTree.get_object("pref_dns3_entry") self.backendcombo = build_combobox("pref_backend_combobox") self.backendcombo.connect("changed", self.be_combo_changed) # Load backend combobox self.backends = daemon.GetBackendList() self.be_descriptions = daemon.GetBackendDescriptionDict() for x in self.backends: if x: if x == 'ioctl': x = 'ioctl NOT SUPPORTED' self.backendcombo.append_text(x) def be_combo_changed(self, combo): """ Update the description label for the given backend. """ self.backendcombo.set_tooltip_text( self.be_descriptions[self.backends[combo.get_active()]] ) wicd-1.7.2.4/cli/0000775000175000017500000000000011747563546013604 5ustar daviddavid00000000000000wicd-1.7.2.4/cli/wicd-cli.py0000775000175000017500000002301711713552220015633 0ustar daviddavid00000000000000#!/usr/bin/python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. import optparse import dbus import dbus.service import sys from wicd import misc misc.RenameProcess('wicd-cli') if getattr(dbus, 'version', (0, 0, 0)) < (0, 80, 0): import dbus.glib else: from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() try: daemon = dbus.Interface(bus.get_object('org.wicd.daemon', '/org/wicd/daemon'), 'org.wicd.daemon') wireless = dbus.Interface(bus.get_object('org.wicd.daemon', '/org/wicd/daemon/wireless'), 'org.wicd.daemon.wireless') wired = dbus.Interface(bus.get_object('org.wicd.daemon', '/org/wicd/daemon/wired'), 'org.wicd.daemon.wired') config = dbus.Interface(bus.get_object('org.wicd.daemon', '/org/wicd/daemon/config'), 'org.wicd.daemon.config') except dbus.DBusException: print 'Error: Could not connect to the daemon. Please make sure it is running.' sys.exit(3) if not daemon: print 'Error connecting to wicd via D-Bus. Please make sure the wicd service is running.' sys.exit(3) parser = optparse.OptionParser() parser.add_option('--network', '-n', type='int', default=-1) parser.add_option('--network-property', '-p') parser.add_option('--set-to', '-s') parser.add_option('--name', '-m') parser.add_option('--scan', '-S', default=False, action='store_true') parser.add_option('--save', '-w', default=False, action='store_true') parser.add_option('--list-networks', '-l', default=False, action='store_true') parser.add_option('--network-details', '-d', default=False, action='store_true') parser.add_option('--disconnect', '-x', default=False, action='store_true') parser.add_option('--connect', '-c', default=False, action='store_true') parser.add_option('--list-encryption-types', '-e', default=False, action='store_true') # short options for these two aren't great. parser.add_option('--wireless', '-y', default=False, action='store_true') parser.add_option('--wired', '-z', default=False, action='store_true') parser.add_option('--load-profile', '-o', default=False, action='store_true') options, arguments = parser.parse_args() op_performed = False if not (options.wireless or options.wired): print "Please use --wireless or --wired to specify " + \ "the type of connection to operate on." # functions def is_valid_wireless_network_id(network_id): if not (network_id >= 0 \ and network_id < wireless.GetNumberOfNetworks()): print 'Invalid wireless network identifier.' sys.exit(1) def is_valid_wired_network_id(network_id): num = len(wired.GetWiredProfileList()) if not (network_id < num and \ network_id >= 0): print 'Invalid wired network identifier.' sys.exit(4) def is_valid_wired_network_profile(profile_name): if not profile_name in wired.GetWiredProfileList(): print 'Profile of that name does not exist.' sys.exit(5) if options.scan and options.wireless: # synchronized scan wireless.Scan(True) op_performed = True if options.load_profile and options.wired: is_valid_wired_network_profile(options.name) wired.ReadWiredNetworkProfile(options.name) op_performed = True if options.list_networks: if options.wireless: print '#\tBSSID\t\t\tChannel\tESSID' for network_id in range(0, wireless.GetNumberOfNetworks()): print '%s\t%s\t%s\t%s' % (network_id, wireless.GetWirelessProperty(network_id, 'bssid'), wireless.GetWirelessProperty(network_id, 'channel'), wireless.GetWirelessProperty(network_id, 'essid')) elif options.wired: print '#\tProfile name' id = 0 for profile in wired.GetWiredProfileList(): print '%s\t%s' % (id, profile) id += 1 op_performed = True if options.network_details: if options.wireless: if options.network >= 0: is_valid_wireless_network_id(options.network) network_id = options.network else: network_id = wireless.GetCurrentNetworkID(0) is_valid_wireless_network_id(network_id) # we're connected to a network, print IP print "IP: %s" % wireless.GetWirelessIP(0) print "Essid: %s" % wireless.GetWirelessProperty(network_id, "essid") print "Bssid: %s" % wireless.GetWirelessProperty(network_id, "bssid") if wireless.GetWirelessProperty(network_id, "encryption"): print "Encryption: On" print "Encryption Method: %s" % \ wireless.GetWirelessProperty(network_id, "encryption_method") else: print "Encryption: Off" print "Quality: %s" % wireless.GetWirelessProperty(network_id, "quality") print "Mode: %s" % wireless.GetWirelessProperty(network_id, "mode") print "Channel: %s" % wireless.GetWirelessProperty(network_id, "channel") print "Bit Rates: %s" % wireless.GetWirelessProperty(network_id, "bitrates") op_performed = True # network properties if options.network_property: options.network_property = options.network_property.lower() if options.wireless: if options.network >= 0: is_valid_wireless_network_id(options.network) network_id = options.network else: network_id = wireless.GetCurrentNetworkID(0) is_valid_wireless_network_id(network_id) if not options.set_to: print wireless.GetWirelessProperty(network_id, options.network_property) else: wireless.SetWirelessProperty(network_id, \ options.network_property, options.set_to) elif options.wired: if not options.set_to: print wired.GetWiredProperty(options.network_property) else: wired.SetWiredProperty(options.network_property, options.set_to) op_performed = True if options.disconnect: daemon.Disconnect() if options.wireless: if wireless.GetCurrentNetworkID(0) > -1: print "Disconnecting from %s on %s" % (wireless.GetCurrentNetwork(0), wireless.DetectWirelessInterface()) elif options.wired: if wired.CheckPluggedIn(): print "Disconnecting from wired connection on %s" % wired.DetectWiredInterface() op_performed = True if options.connect: check = None if options.wireless and options.network > -1: is_valid_wireless_network_id(options.network) name = wireless.GetWirelessProperty(options.network, 'essid') encryption = wireless.GetWirelessProperty(options.network, 'enctype') print "Connecting to %s with %s on %s" % (name, encryption, wireless.DetectWirelessInterface()) wireless.ConnectWireless(options.network) check = lambda: wireless.CheckIfWirelessConnecting() status = lambda: wireless.CheckWirelessConnectingStatus() message = lambda: wireless.CheckWirelessConnectingMessage() elif options.wired: print "Connecting to wired connection on %s" % wired.DetectWiredInterface() wired.ConnectWired() check = lambda: wired.CheckIfWiredConnecting() status = lambda: wired.CheckWiredConnectingStatus() message = lambda: wired.CheckWiredConnectingMessage() else: check = lambda: False status = lambda: False message = lambda: False # update user on what the daemon is doing last = None if check: while check(): next = status() if next != last: # avoid a race condition where status is updated to "done" after the # loop check if next == "done": break print message() last = next print "done!" op_performed = True # pretty print optional and required properties def str_properties(prop): if len(prop) == 0: return "None" else: return ', '.join("%s (%s)" % (x[0], x[1].replace("_", " ")) for x in type['required']) if options.wireless and options.list_encryption_types: et = misc.LoadEncryptionMethods() # print 'Installed encryption templates:' print '%s\t%-20s\t%s' % ('#', 'Name', 'Description') id = 0 for type in et: print '%s\t%-20s\t%s' % (id, type['type'], type['name']) print ' Req: %s' % str_properties(type['required']) print '---' # don't print optionals (yet) #print ' Opt: %s' % str_properties(type['optional']) id += 1 op_performed = True if options.save and options.network > -1: if options.wireless: is_valid_wireless_network_id(options.network) config.SaveWirelessNetworkProfile(options.network) elif options.wired: config.SaveWiredNetworkProfile(options.name) op_performed = True if not op_performed: print "No operations performed." wicd-1.7.2.4/cli/README.cli0000664000175000017500000000354711635330115015217 0ustar daviddavid00000000000000wicd-cli is a scriptable command-line only "client" for wicd written by Ronuk Raval. Some usage examples for wicd-cli.py Scan for new wireless networks and display them: python wicd-cli.py --wireless --scan --list-networks or (same thing, short version) python wicd-cli.py -y -S -l Or, you can view the networks Wicd has in its cache: python wicd-cli.py --wireless --list-networks If you want to do anything with these networks, you''ll need to note the network ID listed on the left side of the above command. Get the channel number from network 0: python wicd-cli.py --wireless --network 0 --network-property channel Or get all available information for a certain network, do: python wicd-cli.py --wireless --network 0 --network-details Or do the same for the currently connected network, do: python wicd-cli.py --wireless --network-details View the available encryption templates Wicd can use: python wicd-cli.py --wireless --list-encryption-types Look under your chosen encryption scheme for a list of required properties (marked with "Req:"). These are additional properties that must be set before the encryption can be used. For example, the listing for WPA encryption looks as follows: 0 wpa WPA 1/2 (Passphrase) Req: key (Key) The list indicates that to use WPA encryption, the following properties must be set: 'enctype' => 'wpa' (from the name field) 'key' => YOUR_WPA_PASSKEY (from the required field) Use the WPA encryption scheme on network 0 by issuing the following two commands: python wicd-cli.py --wireless --network 0 \ --network-property enctype --set-to wpa python wicd-cli.py --wireless --network 0 \ --network-property key --set-to YOUR_WPA_PASSKEY Finally, we need to connect to the network: python wicd-cli.py --wireless --network 0 --connect wicd-1.7.2.4/CHANGES0000664000175000017500000003166611747563352014037 0ustar daviddavid00000000000000------------------------------------------------------------ revno: 767 fixes bug: https://launchpad.net/bugs/979221 committer: David Paleino branch nick: wicd timestamp: Mon 2012-04-30 21:20:47 +0200 message: Really fix the privilege escalation in a better way ------------------------------------------------------------ revno: 766 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Fri 2012-04-27 04:48:35 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 765 committer: David Paleino branch nick: wicd timestamp: Thu 2012-04-26 22:06:35 +0200 message: Re-integrate pt_BR, since it's different enough from pt to have a separate translation ------------------------------------------------------------ revno: 764 fixes bug: https://launchpad.net/bugs/989146 committer: David Paleino branch nick: wicd timestamp: Thu 2012-04-26 22:03:35 +0200 message: Remove unmaintained language variants, rename en_GB to en ------------------------------------------------------------ revno: 763 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Wed 2012-04-25 05:03:12 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 762 [merge] committer: David Paleino branch nick: wicd timestamp: Tue 2012-04-24 21:28:52 +0200 message: Merge translations by LP ------------------------------------------------------------ revno: 761 tags: 1.7.2.3 committer: David Paleino branch nick: wicd timestamp: Sun 2012-04-22 18:35:39 +0200 message: Prepare files for the release of 1.7.2.3 ------------------------------------------------------------ revno: 760 fixes bug: https://launchpad.net/bugs/986257 committer: David Paleino branch nick: wicd timestamp: Sun 2012-04-22 18:32:18 +0200 message: Fix 1.7.2.2 brokenness ------------------------------------------------------------ revno: 759 tags: 1.7.2.2 committer: David Paleino branch nick: wicd timestamp: Thu 2012-04-19 22:42:33 +0200 message: Prepare files for the release of 1.7.2.2 ------------------------------------------------------------ revno: 758 fixes bug: https://launchpad.net/bugs/985879 committer: David Paleino branch nick: wicd timestamp: Thu 2012-04-19 22:38:24 +0200 message: Fix bug caused by fix for CVE ------------------------------------------------------------ revno: 757 committer: David Paleino branch nick: wicd timestamp: Mon 2012-04-16 22:44:15 +0200 message: Better fix for the curses UTF-8 bug, thanks to Konrad Schöbel! ------------------------------------------------------------ revno: 756 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Mon 2012-04-16 04:50:12 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 755 tags: 1.7.2.1 committer: David Paleino branch nick: wicd timestamp: Thu 2012-04-12 22:03:49 +0200 message: Prepare for the release of 1.7.2.1 ------------------------------------------------------------ revno: 754 fixes bug: https://launchpad.net/bugs/980214 committer: David Paleino branch nick: wicd timestamp: Thu 2012-04-12 22:02:06 +0200 message: Fix crash with wicd-curses ------------------------------------------------------------ revno: 753 tags: 1.7.2 committer: David Paleino branch nick: wicd timestamp: Wed 2012-04-11 23:20:22 +0200 message: Fixed MANIFEST.in ------------------------------------------------------------ revno: 752 committer: David Paleino branch nick: wicd timestamp: Wed 2012-04-11 23:08:00 +0200 message: Prepare files for the release of 1.7.2 ------------------------------------------------------------ revno: 751 fixes bug: https://launchpad.net/bugs/979221 committer: David Paleino branch nick: wicd timestamp: Wed 2012-04-11 22:31:07 +0200 message: Fix CVE-2012-2095: local privilege escalation, setting arbitrary pre/post-connection scripts ------------------------------------------------------------ revno: 750 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Tue 2012-04-10 04:59:51 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 749 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Sat 2012-04-07 05:01:19 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 748 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Fri 2012-04-06 04:40:52 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 747 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Thu 2012-04-05 04:47:26 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 746 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Tue 2012-03-27 04:56:34 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 745 fixes bug: https://launchpad.net/bugs/965650 committer: David Paleino branch nick: wicd timestamp: Mon 2012-03-26 22:26:21 +0200 message: Initialize child_pid, thanks to David Cantrell ------------------------------------------------------------ revno: 744 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Tue 2012-03-13 05:11:15 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 743 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Sat 2012-03-10 04:58:44 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 742 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Thu 2012-03-08 05:02:54 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 741 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Wed 2012-03-07 05:37:05 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 740 fixes bug: https://launchpad.net/bugs/934165 committer: David Paleino branch nick: wicd timestamp: Tue 2012-03-06 12:11:45 +0100 message: Fixes in a more general way ------------------------------------------------------------ revno: 739 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Tue 2012-03-06 04:54:30 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 738 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Sun 2012-03-04 05:10:03 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 737 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Sat 2012-03-03 05:32:41 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 736 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Fri 2012-03-02 04:50:04 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 735 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Sun 2012-02-26 05:04:45 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 734 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Sun 2012-02-19 06:10:22 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 733 committer: David Paleino branch nick: wicd timestamp: Fri 2012-02-17 14:19:17 +0100 message: Start sanitizing from the very first character ------------------------------------------------------------ revno: 732 fixes bug: https://launchpad.net/bugs/934165 committer: David Paleino branch nick: wicd timestamp: Fri 2012-02-17 13:41:02 +0100 message: Fixed bug with wicd-curses and UTF-8 encryption types ------------------------------------------------------------ revno: 731 fixes bug: https://launchpad.net/bugs/513873 committer: David Paleino branch nick: wicd timestamp: Sun 2012-02-12 10:41:27 +0100 message: Support passing no driver to wpa_supplicant ------------------------------------------------------------ revno: 730 committer: David Paleino branch nick: wicd timestamp: Sat 2012-02-11 21:36:04 +0100 message: Fix spurious whitespacing and indentation ------------------------------------------------------------ revno: 729 [merge] fixes bug: https://launchpad.net/bugs/930711 committer: David Paleino branch nick: wicd timestamp: Sat 2012-02-11 21:32:10 +0100 message: Merge fix from Joe MacMahon ------------------------------------------------------------ revno: 728 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Thu 2012-02-09 07:24:15 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 727 fixes bug: https://launchpad.net/bugs/544120 committer: David Paleino branch nick: wicd timestamp: Wed 2012-02-08 20:34:21 +0100 message: Don't start the daemon if it's already running ------------------------------------------------------------ revno: 726 committer: David Paleino branch nick: wicd timestamp: Wed 2012-02-08 20:32:02 +0100 message: Added myself to the manpages as author ------------------------------------------------------------ revno: 725 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Wed 2012-02-08 06:17:50 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 724 committer: David Paleino branch nick: wicd timestamp: Sun 2012-02-05 21:47:24 +0100 message: Compile translations after configure has run ------------------------------------------------------------ revno: 723 fixes bug: https://launchpad.net/bugs/684773 committer: David Paleino branch nick: wicd timestamp: Sun 2012-02-05 20:12:29 +0100 message: Fix wicd-cli with wired networks ------------------------------------------------------------ revno: 722 fixes bug: https://launchpad.net/bugs/664937 committer: David Paleino branch nick: wicd timestamp: Sun 2012-02-05 20:08:31 +0100 message: Fallback to Mode:Master if None is parsed ------------------------------------------------------------ revno: 721 fixes bug: https://launchpad.net/bugs/477323 committer: David Paleino branch nick: wicd timestamp: Sun 2012-02-05 18:41:24 +0100 message: Renamed wpa templates to clarify usage ------------------------------------------------------------ revno: 720 fixes bug: https://launchpad.net/bugs/384340 committer: David Paleino branch nick: wicd timestamp: Sun 2012-02-05 18:16:45 +0100 message: Fixed typo preventing DHCP hostname from properly working ------------------------------------------------------------ revno: 719 fixes bug: https://launchpad.net/bugs/927174 committer: David Paleino branch nick: wicd timestamp: Sun 2012-02-05 16:49:39 +0100 message: Fix installation instructions ------------------------------------------------------------ revno: 718 committer: Launchpad Translations on behalf of wicd-devel branch nick: wicd timestamp: Sun 2012-02-05 05:01:52 +0000 message: Launchpad automatic translations update. ------------------------------------------------------------ revno: 717 tags: 1.7.1 committer: David Paleino branch nick: wicd timestamp: Thu 2012-02-02 20:15:03 +0100 message: Prepare files for the release of 1.7.1 ------------------------------------------------------------ Due to size, this file has been truncated. All revisions relevant to the 1.7.2 release (and sub-releases) have been included. For more information, please see the full log of changes at: https://code.launchpad.net/~wicd-devel/wicd/experimental For a short list of major changes, please see NEWS. wicd-1.7.2.4/encryption/0000775000175000017500000000000011747563546015227 5ustar daviddavid00000000000000wicd-1.7.2.4/encryption/templates/0000775000175000017500000000000011747563546017225 5ustar daviddavid00000000000000wicd-1.7.2.4/encryption/templates/peap-tkip0000664000175000017500000000101711635330115021015 0ustar daviddavid00000000000000name = PEAP with TKIP/MSCHAPV2 author = Fralaltro version = 1 require identity *Identity password *Password optional ca_cert *Path_to_CA_Cert protected password *Password ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" scan_ssid=$_SCAN proto=WPA key_mgmt=WPA-EAP pairwise=TKIP group=TKIP eap=PEAP identity="$_IDENTITY" password="$_PASSWORD" ca_cert="$_CA_CERT" phase1="peaplabel=0" phase2="auth=MSCHAPV2" } wicd-1.7.2.4/encryption/templates/psu0000664000175000017500000000047511635330115017741 0ustar daviddavid00000000000000name = PSU author = Alexander Anisimov version = 1 require identity *Identity password *Password protected password *Password ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" key_mgmt=IEEE8021X eap=PEAP phase2="auth=MSCHAPV2" identity="$_IDENTITY" password="$_PASSWORD" } wicd-1.7.2.4/encryption/templates/wep-passphrase0000664000175000017500000000050011635330115022061 0ustar daviddavid00000000000000name = WEP (Passphrase) author = Adam Blackburn version = 1 require passphrase *Passphrase protected passphrase *Passphrase ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" scan_ssid=$_SCAN key_mgmt=NONE wep_key0="$_PASSPHRASE" wep_tx_keyidx=0 priority=5 } wicd-1.7.2.4/encryption/templates/wpa2-peap0000664000175000017500000000056211635330115020723 0ustar daviddavid00000000000000name = WPA2-PEAP author = atiketemola version = 1 require identity *Username domain *Domain password *Password protected password *Password ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" proto=RSN key_mgmt=WPA-EAP pairwise=CCMP eap=PEAP identity="$_DOMAIN\$_IDENTITY" password="$_PASSWORD" phase2="auth=MSCHAPv2" } wicd-1.7.2.4/encryption/templates/wep-shared0000664000175000017500000000046511635330115021170 0ustar daviddavid00000000000000name = WEP Shared/Restricted author = Dan O'Reilly version = 1 require key *Key protected key *Key ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" scan_ssid=$_SCAN key_mgmt=NONE auth_alg=SHARED wep_key0=$_KEY wep_tx_keyidx=0 priority=5 } wicd-1.7.2.4/encryption/templates/peap0000664000175000017500000000046111635330115020052 0ustar daviddavid00000000000000name = PEAP with GTC author = Adam Blackburn version = 2 require identity *Identity password *Password protected password *Password ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" proto=RSN key_mgmt=WPA-EAP pairwise=CCMP eap=PEAP identity="$_IDENTITY" password="$_PASSWORD" } wicd-1.7.2.4/encryption/templates/ttls0000664000175000017500000000052611635330115020115 0ustar daviddavid00000000000000name = TTLS with WEP author = Adam Blackburn version = 1 require identity *Identity password *Password auth *Authentication protected password *Password ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" scan_ssid=$_SCAN eap=TTLS key_mgmt=IEEE8021X identity="$_IDENTITY" password="$_PASSWORD" phase2="auth=$_AUTH" } wicd-1.7.2.4/encryption/templates/wep-hex0000664000175000017500000000043611635330115020504 0ustar daviddavid00000000000000name = WEP (Hex [0-9/A-F]) author = Adam Blackburn version = 1 require key *Key protected key *Key ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" scan_ssid=$_SCAN key_mgmt=NONE wep_key0=$_KEY wep_tx_keyidx=0 priority=5 } wicd-1.7.2.4/encryption/templates/wpa0000664000175000017500000000047511713537415017732 0ustar daviddavid00000000000000name = WPA 1/2 (Hex [0-9/A-F]) author = Adam Blackburn version = 1 require key *Key protected key *Key ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" scan_ssid=$_SCAN proto=WPA RSN key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk=$_PSK } wicd-1.7.2.4/encryption/templates/leap0000664000175000017500000000045311635330115020047 0ustar daviddavid00000000000000name = LEAP with WEP author = Adam Blackburn version = 1 require username *Username password *Password protected password *Password ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" scan_ssid=$_SCAN eap=LEAP key_mgmt=IEEE8021X identity="$_USERNAME" password="$_PASSWORD" } wicd-1.7.2.4/encryption/templates/active0000664000175000017500000000016411635330115020400 0ustar daviddavid00000000000000wpa wpa-peap wpa-psk wpa2-leap wpa2-peap wep-hex wep-passphrase wep-shared leap ttls eap peap peap-tkip eap-tls psu wicd-1.7.2.4/encryption/templates/wired_8021x0000664000175000017500000000056011712536002021100 0ustar daviddavid00000000000000name = 802.1x author = Joe MacMahon version = 1 require identity *Identity password *Password protected password *Password ----- ctrl_interface=/var/run/wpa_supplicant eapol_version=1 fast_reauth=0 network={ key_mgmt=IEEE8021X eap=PEAP phase1="peaplabel=1" phase2="auth=MSCHAPV2" identity="$_IDENTITY" password="$_PASSWORD" } wicd-1.7.2.4/encryption/templates/active_wired0000664000175000017500000000001411712536002021563 0ustar daviddavid00000000000000wired_8021x wicd-1.7.2.4/encryption/templates/wpa-peap0000664000175000017500000000056111635330115020640 0ustar daviddavid00000000000000name = WPA-PEAP author = atiketemola version = 1 require identity *Username domain *Domain password *Password protected password *Password ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" proto=WPA key_mgmt=WPA-EAP pairwise=CCMP eap=PEAP identity="$_DOMAIN\$_IDENTITY" password="$_PASSWORD" phase2="auth=MSCHAPv2" } wicd-1.7.2.4/encryption/templates/eap-tls0000664000175000017500000000112411635330115020467 0ustar daviddavid00000000000000name = EAP-TLS author = Dan O'Reilly version = 1 require identity *Identity private_key *Private_Key private_key_passwd *Private_Key_Password optional ca_cert *Path_to_CA_Cert client_cert *Path_to_Client_Cert protected identity *Identity private_key *Private_Key private_key_passwd *Private_Key_Password ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" key_mgmt=WPA-EAP pairwise=TKIP group=TKIP eap=TLS identity="$_IDENTITY" ca_cert="$_CA_CERT" client_cert="$_CLIENT_CERT" private_key="$_PRIVATE_KEY" private_key_passwd="$_PRIVATE_KEY_PASSWD" } wicd-1.7.2.4/encryption/templates/wpa-psk0000664000175000017500000000052311713537434020520 0ustar daviddavid00000000000000name = WPA 1/2 (Passphrase) author = Adam Blackburn version = 1 require apsk *Preshared_Key protected apsk *Preshared_Key ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" scan_ssid=$_SCAN proto=WPA RSN key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk="$_APSK" } wicd-1.7.2.4/encryption/templates/eap0000664000175000017500000000066211635330115017675 0ustar daviddavid00000000000000name = EAP-FAST author = Adam Blackburn version = 2 require username *Username password *Password optional pac_file *Path_To_PAC_File protected password *Password ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" scan_ssid=$_SCAN proto=RSN WPA pairwise=CCMP TKIP group=CCMP TKIP key_mgmt=WPA-EAP eap=FAST identity="$_USERNAME" password="$_PASSWORD" phase1="fast_provisioning=1" pac_file="$_PAC_FILE" } wicd-1.7.2.4/encryption/templates/wpa2-leap0000664000175000017500000000060011635330115020710 0ustar daviddavid00000000000000name = WPA2-LEAP author = atiketemola version = 1 require username *Username password *Password protected password *Password ----- ctrl_interface=/var/run/wpa_supplicant network={ ssid="$_ESSID" scan_ssid=$_SCAN auth_alg=LEAP key_mgmt=WPA-EAP proto=WPA2 pairwise=CCMP TKIP group=CCMP TKIP eap=LEAP identity="$_USERNAME" password="$_PASSWORD" } wicd-1.7.2.4/README0000664000175000017500000000676011635330115013702 0ustar daviddavid00000000000000THEORY OF OPERATION: Wicd is designed to give the user as much control over behavior of network connections as possible. Every network, both wired and wireless, has its own profile with its own configuration options and connection behavior. Wicd will try to automatically connect only to networks the user specifies it should try, with a preference first to a wired network, then to wireless. For wired connections, users have many options for determining what network settings to use. Wicd allows creation of an unlimited number of wired profiles, each of which has its own unique settings. The user can choose to automatically connect to a selected default profile, choose a profile from a pop-up window every time wicd connects, or have wicd automatically choose the last profile used to manually connect. For wireless connections, users can select any number of wireless networks to automatically connect; wicd will choose the one with the highest signal strength to try to connect. If the user chooses, wicd will try to automatically reconnect when it detects that a connection is lost. If the last known connection state is wired, wicd will first try to reconnect to the wired network, and if it is not available, wicd will try any available wireless networks which have automatic connection enabled. If the last known connection state is wireless, wicd will first try to reconnect to the previously connected network (even if that network does not have automatic connection enabled), and should that fail, it will try both a wired connection and any available wireless networks which have automatic connection enabled. Wicd uses built-in linux wireless-tools, such as ifconfig and iwconfig, to get and configure network info. There is some flexibility in its use of DHCP, providing support for dhclient, dhcpcd, and pump. Wicd uses wpa_supplicant to handle all wireless encryption settings, and uses a template-based system to create the configuration files used by wpa_supplicant. These templates can be edited, and new templates can be created by the user and imported into wicd, allowing connection to networks with uncommon encryption settings. STRUCTURE: Wicd has two major parts: the daemon, which runs with root privileges; and the user interface, which runs with normal user privileges. The two parts run as separate processes and make use of D-Bus to communicate. The daemon is responsible for making and configuring connections, reading and writing configuration files and logs, and monitoring the connection status. The daemon's job is split between two processes: daemon.py and monitor.py. All the connection status monitoring, as well as the auto-reconnection logic, takes place in monitor.py. Everthing else is done by wicd-daemon.py. The user interface (stored in wicd-client.py), which is made up of a tray icon, a main GUI window, and its child dialogs, gets configuration and network info from the daemon either by querying it using the methods in the daemon's dbus interface or by receiving signals emitted from the daemon over D-Bus. Any configuration changes made in the user interface are passed back to the daemon, which actually applies the changes and writes them to configuration files. Since the user interface just queries for connection and configuration info from the daemon, it is possible to run wicd without the GUI at all. Also, the daemon is started by wicd's init script during system startup (before any user logs in), making it possible to use wicd with "headless" machines. wicd-1.7.2.4/icons/0000775000175000017500000000000011747563546014150 5ustar daviddavid00000000000000wicd-1.7.2.4/icons/32px/0000775000175000017500000000000011747563546014744 5ustar daviddavid00000000000000wicd-1.7.2.4/icons/32px/wicd-gtk.png0000664000175000017500000000233011635330115017135 0ustar daviddavid00000000000000PNG  IHDR szzsRGBbKGD pHYs B(xtIME/3|&XIDATX[lus-BBov[%E(-EECI1ZcBQyИ6Fó!5PH! "Z e{f;,0/7gΜh̏TqI:0"|GY6 ÜsqXoж=Mi513?*-lKl)N5:h'=8 0KD1OVlnơUY'|B3<ﴏ=Cy\sܟd tX F]!>\!]9Fk0P"dd.W, ) `Bs1ήeCwA˄uI`,`4";txX? /J~q 3r^@m-ļ'[.3G'4ۼqnyzIIENDB`wicd-1.7.2.4/icons/64px/0000775000175000017500000000000011747563546014751 5ustar daviddavid00000000000000wicd-1.7.2.4/icons/64px/wicd-gtk.png0000664000175000017500000000514711635330115017153 0ustar daviddavid00000000000000PNG  IHDR@@iqsRGBbKGD pHYs B(xtIME-& IDATx{pT?{$$,5 "B;A22}chm*NGQaheDb[B(LA Bxa?#{.l 3w;sw<~Yh@!`gP0njRH ۀ@\`o@0@蹏? zrb;] &zB:X4aJ`CB + *az]vq^xnt*M+\&q}'1Y@˱5^4Q`:~[ES|V  Lf愸X#ܞMa4#be N.x;ڳI&Bs 6fZ#tuI_ Yaf`vN<=~2&%9fTeKxY`mmUDDdQ8+> g3$&zlli=x'[|D㽐2+؀qԸ!?*;a~V+dS׀ LP6UY|}8x<  q"_Ta>TEvd>>koX{WцJ'LTY|R]VPbN gg-&̴Hmq_XBO*2BWO'{+ek"=&ˆ ZȤ>%0uӟ@aS)beqpLic<_2Q@qXbMkRKw>t!ߝbڦ$rSÈ btW}d{ G]ҕtbTn3aI5,C ;N]iei^˳95' slv ׏I7-b+& mZLHcQlǼDFJ8^f7Z1^}?D%wQz9,% 8 .skh'I@Õȯj#$f+bF ⶙hL`E>:W5r 34o':od?Ӗ>QN<9ޱ4 yc1 mq/p(]jѾgpLE`pb+~ਦ F PePxy{S)f4 4tMa #lop7:eNlj{Ӝ Ϡg^"4W:7HoehL'37|:uAa>;j.vStCwcYBQ9^t^D5M4ƺdDT v/lT-L.P튗V0z jZCr"pka *C /[T8a& dT ϴzqQr |n!MsuNS 6uQ=Fj ̍~&zD e4XA'p+ 5)|L&@+͔:|TɐHz1Akmh4G~PctG0[x щd4`+6&҄^nV`GT-,Eq4agEl\w$$V@-g[D5v>&EUKt p2Bt0S_y;zs0!@+Wכ@<4f隫83e؀n~ve4p aaQC>aNŒ= O 4ZLPZʥw[jO2!…2a۠&z# J#ʝƤ~A^e@(rN0WRUz ٽy|t$ۄ¤ 5 zz< _2,B-\V9ەߠ'Cᴡ)GЧ>) G}+cS p_G]UX9z~g} S@Kfp|6: w-VSIENDB`wicd-1.7.2.4/icons/24px/0000775000175000017500000000000011747563546014745 5ustar daviddavid00000000000000wicd-1.7.2.4/icons/24px/wicd-gtk.png0000664000175000017500000000163211635330115017142 0ustar daviddavid00000000000000PNG  IHDRw=sRGBbKGD pHYs B(xtIME0 H@WIDATHǵKhYzt*yVg;h{ZYP" ( FAg1 ..H4CtTڦ;m(usϽ6: l"Zc#a ·c6qQpի*JsL%no/,.%ʙ8L'cTz:Ar&V< 9܏=u$`5p8$,O>\N&A5++"+6}AAbž* 8t+xRzn %Z/d>Gb-* LJ?۫cF?^YꯒUc9H`( j_ @ƍ&Zl$34M޼{R6UjT|Yo+&6_Ng`US$])Zh5n!5+Q`P h2]c=ITI<q͈z¿.1T7&-m!1c.yLE^?ӡ7>萍ŋ";  vWq ^#Lk7p]B{B!nAe;ܭPBX(Y܎#Q!f<9 1eɻyf7vL81}Mkra rzr;rS翙*L0`0G@2(N+P3;EJ C H]/^`XD1L"8.IENDB`wicd-1.7.2.4/icons/36px/0000775000175000017500000000000011747563546014750 5ustar daviddavid00000000000000wicd-1.7.2.4/icons/36px/wicd-gtk.png0000664000175000017500000000254311635330115017147 0ustar daviddavid00000000000000PNG  IHDR$$sRGBbKGD pHYs B(xtIME0J<IDATXkle;;lK-Ъ`B@E$HQ4!QbF%h0Q1DDŀ"D[4 `GPICWJގ?fvw:KwD&swޙ=wf5 @7~`6p(675 x|d!eZ]8[b\1>GBo7NwX9ǢBAh a & 'rX0ifxc6!$M&L;AZ8NU$\"k+H]L# ¯L[2W(o_Ur:6ӽ_qTzec N :`'fW#"5h p6-xޝ9OTv \dd3$qRfs2Үa 9Cs&M밶l5Po )*0[WsHO]Ē"_-1V"c-#}!+jLV 5Δ!<h=D,Xj+3"8R7F(D(28UtЇ;*l;aWWbFhj7Bb04*t1z \@(4#HDD5QZbOa:4%zL^U:#ܑMZBC t8eu-P}G>Oh"Z0=:Wk2pZ8G842Lv4ۂ'~r,˽Җ> |k63٢CDEzc7 m<~6`&0*Y?-cҦD5W Fp@ \N4ۂ)HHMcGTR: xPFZZr>mɀjTP;,BLpE8 =ZДL7U,JX%Y.VVt^*j׆fz`{5y>N;WҶۀ|l692D }0ifS @8g &M*`9ߥ@^:N:MU[ to֯x=p>=DK~π%)njN8C/aFfy.k~ Xi:A,H#7,`72zGԒ_N: \%V( 5g,}LK|u`75>z9}4K'kz9CEdfɹu&!oY4(o5&4lI8ZGHb2A#Ll~g*Mѥ rELޞa4G%`~lt]&Ԙ,nb3kr`ۂ.j eS&g^}<:ʌ \0ˌN'KLbdA{皜>m!5m&xP02G̜gLSf@Ř5y`||cLmp#`ɢ rO5Iۿ^ ZŽJ8 5Q;֙l.p_' OiZPm~^5ֹ=sMnl0`xE7⤨SS f3hذj5 8f5L6YKf|.mW$hqH`%韛j 3dCCQ!6FL\mɅ̦Tv|TY1uX#: p;:UbL~7U$ eUN*drw7gIR_&""ܳ3L&Eܘ`90;H4(80<< ruG ^ }LЀ8#SMuatu^8j5ݭt%a$xfjfyiM HLj~IӢTأRTI`9噟No37̯^Mg%YHuz` >WK5j'tl@K--DΓ)'qTB4Jn zo3> O7.H p6m8dOO@omT}K$Wcp :6-1(e+BpL <:5⑩%;S3* X0%Ms,rnt Ӗ"Qaxk:Lf^1vC1$[ԈDĀ;s#~?*M2U!׷Qxt F$[m@~Lw|rAc:hG mV}pAw>̱$g+5)ثpproy͝k1ś~T\{M0ᨚܞC|OH 0N?U#'#tpZ8*|EGc@=ݥ=Z}ytC$*h"P9pCw5 䊇[Uס \9TSJGMyPLPL(&|n|:-TgBĪ14’R񛭪3q*e#pSD)H:\j2$\vQi+MdӅStWSv"Bb{$zY7OL$6jx ܾY2$Nc1wyyp8VXy` R`6k<.T܍.=aZzc*>Q'j0@0\;6[.M+C8-?kuʥ@} ET!U#H нr\{8 EtȜ%\E*y渊̔|t;ϪtO 8 x7.dMDB}gZFېr2گCF>Djo4CYcL]=.ӎZ O8DMHO>`OoU>?^( |5E\Ҁ#M!ZJ`=X _ _> ȺGe~dWUY_n2R*exF~fOXˠa~ lоytjə+,!=r(`< _H0_&gƉkAH݂Tkz}.?<ۡ"~$g`X|z}EABJJ0_T~i\q%uxt[aOtG#U=@v|oZN)l*%,{@<{=ow E$|EcjjHB1@cܦ e*gcl 0ò:QH,P|G*>[d8x8Vᾉ3A0eY[>o)v^_0E!Q1؝5(~N%O!=+-O8pY`kA)~>Qů@~S+*8 w KtdNȤ5bUxp׶ž|Zggu31@uBW`Q6 i\,#Vpa=*UH`b q/st ,'r3;ql[X*j+,>b9THA`TULF @R{ $bx ~Oz7'nk,H}W:.ESO'lkUy88Μ2ػmw}H]WEdz`S?(ԌBJ -]nh׭}?w[QUr޹[bQa+Rqc:KJWj #-r$]yŭ"kaUHe 2" ȳGݍo%|=L<Rv0E rm{MQ[" }(ICjN7ܑ}^AC 7>O)!B<3peo/iƈΏˇrrW^^t2T#A! "ba|{x!~$avHA+ZTH¤pE`Jy8A9ޟwsXܥnE:{6P0>~- noff\8ZSPFmS =$8XQʈ#8-Ē׸dn > l,q̑v":`/ʑfrH Jg2 ?,w̛.׈t W>&>!BdˑLxaXe\?8*pPpҞx,V Cy0vBeڷ( YIUv+%GV>\`"L3DaSett:g$~X!>rv i #0Cxs[\P5?OFRkƯx pc lĥ h,Imr vQ{fbl o^rt{ǫxKji/űT }$cvQXRi#~c3̭e=ޞ736OP(р*q*ss%F5@b06:~C $ i)F zK4xú!k&K/zdZq=Mxz: tD=DI_#5VY&^`roX&r!;NT8=`}"YFQm[Y <ؐ0Fڐar11r-neLx+QNbM cbcL2ɸwʗ?ftB|bb GYWc>84Ƈ,9(Y*hP8>QZ> `L%7ٛ,q<2q{EpYkC|ګʮS9ib}(30LڱszȪ;f8pf'o?ECJǏ `~Hb=' eb!\b]wPi'MTP6}86)~xgTdVnT4iJ^41aħ}D<,,$Q5FH)yO\33ǀVxSɸ Z/lp(p=]ΆS)՜؏lfچpɰVTs7% XF'l{Oe,V S5Hp9Ń\" ,VԵ;8F)1oOQK PajH>\T1§gNX]2)Pr?Ob)FTz˰J_);yf$lK [@XdqY,JXPwxdꐛ42swqY_jBʄM j'aK>.++~3J+WJ nT40W/pD~"kro7»!ytgٚ]F!g*H*n1) V12ɮ~oP+ (š "J'H~^5C}9Jd5|&4aj?+KSɵ( qq/xɽIZ񪀸P*~gL~0`?PÞY+3@  rU;BV?!r&#Gw!Ğ|HŨ,5f {)ʣg=vvXEL{I1٤ԏ6$g1qYqڎMxtmvR*t^0j]?gBhٔ>06bt?97jƿ|v6, [|aG-=CNh*fߚJ$[$qGs{쎲}&<2~ ep 0WZV|^[Y !¿>~cE wcH\8{teߵv@Mí+ w[X+jagsSv۲P!O$yϝC Dr/wlTJe4uyŭqR%}YS'3[fFi㛖H7^DUOs>̔Kmb/g&T>Kݫ }sQل  #B}\@'u}ZAM(.VĺN05MLPW_[,4711OdtNV Oé?]9v{rJmH;~0** :ĦOj 3E5{?`3▰l%fKaZitKW2&Tʼn85/@KXaHqK?;b3@AB7?zQ< K{2S1@WcǼ ҙ~iq-Q lՂs{+'j9HwJ^mHb3&٪.oӍn!M}xǶe0,:8p2$"r;DfHcKzsUȻ4[Y]7-NҾTӵm19ql|0dgHl{衦)Qoq@1~W_oŠ 3TR 7% %ϣ* 6tI0A9n@|A`i&wls-B GELH$w ̄!j$Rss``?"nI~81ؘN7K s\0LA^)k@| D8%.-m4AY O%ͮ$-ATrS𖆈Scπ-WDŽpnf"5:vLX>_@nhn >X7QCYdV1sܷ]UGح* "&;XuY9.m'Kr\:ZpSBt\ <`q,3dcM[sP=걐Ӹ{b_*hlXPgUQ|U{N_w u_EU?xgJoEk`(\Ǚh <8R|H3g]`ZuvK)X~nBTpb}&t{0(*} ?N䅏x.=tc7ŸsmX/)nҹ H7ỳ}m%v -R`;N 'g ! 0+:r+yc2.6P+Îw*IOWruC?hB9nMj%jE>\C i&\~1*;CJjfǽqad:y8ZcnUn8L9hN)kCVªT1q;dO g:}%'Mpc?ў*EU]qK{%-,AUv-_aR 85` \!_SF}?cF.J(?>ow+_ѵE1=6=/!~YE[P=/Elyt[rqS=4k;`aAFہS DŽ[`ǻ x k5PJm#Ǐcm*rYŞ<-L|7H6C햒K[p4_z%3.OL҃rEQlNB|E*rƒ[e81:TCC0^Wh3#r2\*ԏ$0xp]j6C\YfҋneL*jK靋DN^d)RJĻ)(D=6#B~l,`س5̞FȡMg%=iҀwgVv8\Y\kJQDʹZH]3Jf#YrU~XAo励5t[HeW. L$ꄔkӄm'o$&*K- $6 Џ$T8k< Wl])u *T$]cp$Tyr+^-d|WF$N雾n۔;T֮kHFicp#ؤ(\GuH¾ߋD`s}pܞ6gTf(p$(MH b`L˝p,? ^ަ$6Lc1zM'R<P+cg"!Mk%_ /t|ntN"0/mhpKG6+g+ṎԺ=ߛ%L{#%FH߃RŮHT!1L-qA`YAcb~:v몊9ġﮗB& Q!wnɠ)E_ة;ǫ,{γޭGbHFԥOnl7ߛ]Wr(5 8"H]!g,*[?Run=} ,mZրo~^! 2጑p2qfRLjT=+,}kc"NEl /\bgݰ )ؔ2A 8q|*108o;N)K6{$' Ų1iIc$Ӽڬ{X3NՅeq?w5DLCB&*5+^`Yc^I޴lgq&Ӣ*ڟ >θXU!SGq|p#<-ʭkJ9)W a3@%RVdk[HhH!3 ߂8mb9\ק|j:H9Nݖr R KTB _X8cEuHxgۿ[bMi8E , afߛCd#cS 4MS444hhh @CC3f 444hhh @CC3f 444hhh @CC3f Ad͵M Nf90HC y f?GJQoGR|XCHWگBZJf 444hhh @CC3f 444hhh @CC3f A/T>4\&X@hIENDB`wicd-1.7.2.4/icons/48px/0000775000175000017500000000000011747563546014753 5ustar daviddavid00000000000000wicd-1.7.2.4/icons/48px/wicd-gtk.png0000664000175000017500000000355311635330115017154 0ustar daviddavid00000000000000PNG  IHDR00WsRGBbKGD pHYs B(xtIME/sIDATh{lTu?{:mRhvh ԪKd]wQW|ŷ>v&Y1gt `"jZ7!DA#*,L7󸷝>ors~%@+3'ٺ2!`0.S>`;^i aaI n9 hfXX81M8'^ ;)skBdPtpb0#[%x4#l$l<}<, Y)x($DTy+8P D dY=Q`*B.Tq;3xY Urs2}+rL> -TA?̳ JeO0P1˳]v.'L˓hS]@`tSpWLG>Y |ў⣐pYv3px'):z'DM,KX* Ov@ʟ"yWd㓹@W}Yjvjo:ڃPPwx@ڟNxp^6r{_@6sSn8pU^ 6/ ld^gc+Lwò| xsA;Y!`aps o]> Q˼Y}^,3|q+s<511B'9:PLeS=GZl%Ug OEחͲ[X.e<jO%j6櫶 DsQcCBОyNB~>45hZ~$rSG)S:Lj)yܴ}}<K@FMw I68wqEӽu`كGTU.+lTeX‰]4FDO^^c:p#+v[JmtT '>iQln+"L/2Eu`?1`_W]^iGnS2"<k9 XT(. {TW<@#pm)ҋMco*^m Pm':ogi6 [-T\L\޶d!֗F_恦w8 ț\> wo B@:ו@`8ꟓǀU9 :0xOj'Ռ1@F;0?.Ňlk]-rr$n&'bvCIENDB`wicd-1.7.2.4/icons/16px/0000775000175000017500000000000011747563546014746 5ustar daviddavid00000000000000wicd-1.7.2.4/icons/16px/wicd-gtk.png0000664000175000017500000000114011635330115017135 0ustar daviddavid00000000000000PNG  IHDRasRGBbKGD pHYs B(xtIME1~4HIDAT8˵OKQ<3NfH  p[."lYP zAD )AAEcpFG3j{Ϲ?9BdpB؉q Z-/WT 3 6O=CM1ptăN{QDEzHM,ڕƼO[H^BJyG0\y־&ڔW΃G߇mӕ4[d01? :=n|n|,]{<oPԑHbJ|ˤD6vh$x8)@ka=\rlF0Wa*=v)>=IYPjT* E#MxFSjcA_O͡MѓP\[CutY`霣ݺ 3HfkZec( Lko׷|VmftuYr #k3/ܽampl=ȭlco x5IENDB`wicd-1.7.2.4/icons/scalable/0000775000175000017500000000000011747563546015716 5ustar daviddavid00000000000000wicd-1.7.2.4/icons/scalable/wicd-gtk.svg0000664000175000017500000001632311635330115020131 0ustar daviddavid00000000000000 image/svg+xml wicd-1.7.2.4/icons/128px/0000775000175000017500000000000011747563546015032 5ustar daviddavid00000000000000wicd-1.7.2.4/icons/128px/wicd-gtk.png0000664000175000017500000001421211635330115017225 0ustar daviddavid00000000000000PNG  IHDR>asRGBbKGD pHYs B(xtIME,#7>  IDATxyU̾Ʉ!@1D$" Qd9,F JFH  d!d2{w{nVU3sNtO} <xz` Chl@FsejP= [\ۀ&-5`ߡ*yqBeWnrCڷ~` p0W}wcI&<äߟU=U+?0ItO&eD_ ͱŎ7qhFbkW\ (YeBbvtptNZ"X5Nj|@!hcpBs`DrAggry[}ZÏ(<>Fifj{(=D-8BVx8)) S}k=MCYC5(zc͂G$Vcrc׵0hl$ ;Ѫ$:ꕓHKOX}M(}`z.6j ["5Y@UEsX3!_6E)/VXIz0 ]P)m.X~7q6FWƏcY:TmNƎF -{5c~m(([Ro*+c VOf%<ΣC˷,ڴ'{sA$9^S h\33F1t"4c niHl> 6vobw.PY \$3 " XL-? k?49C5͵ qZbW:VNEN$<]s} ' -;[1Oo~"~J@$SJnTع]Ԫ}_jJj$0} IDڂX̔"b -_:oڹ܆9JwK}Xv<x'O{n6y 2>V W%n2vzs!=wBoȏeڼ\).WG8^wr/ͧc_>ãiqa=ϳ*BdRĵ0.//swCt?LCuk_k ApeuK[qĉj7y?nXߗgI%\LXRieЦeo/`MH[jB=2{Z]2=W a!=7-FsA(:Csf`|ˀ7,g*ˀ, \T |{5姟,ˌu!7%1ZYmaXiߔ_]L/<ڀytvp|xBmEق>7mxz_cV֣|cgN̔YZdZZ0F˽nO58#iL·Z?juDUktY'[";9xae,uxgqu g| yf!^큕cP;,kWYѧ ZO߄c{?(|B,=Y怩V/3zELk Kv^s{l| |}KOVK{"(Ύ}:FPp7Vm>_ϲi ] _aiuYE3vXJo^ S!ͳ< Q `=s̭Uf΍u0Ԇ큐*`v@776U(iLo>i`*J3S`~qEPo3]?_ -sJ |td^G}]X.b^>2LK.J53p|W=BOW5n%wq.zh L]޵isY)L'$~Ig/Gpy=D?Gyܞa.x49a]vMӴ޶7)b"gK05- WQZN肽ǯ YhRW=و<{l>/(H"̈VE6tߗiq`2W@E0<_Xy}pE5@EnCX\ >B%h&@>(tZ#"OU D#@P) V*Qf)˴F^%^vr^E4|[ˣ54D}Ј9ud ťyVֆJO}z8O.dnϔ+銜u]. G;Q &~_ԇtoJڗ"5kvv z/vf1w@}n0!TܗҞ\ ^m'SlM1.qsm&a[9e~n&e[f}d5Q'˯3&[~7 WP1-c=m70Z ,Td蝋]lKȀ]Bv%E+qces`ǩdqM}fG:h! %[dvMkxI#߱w} a%0ep#~8gYe ˠc9(^2n]ބ>~U k+q|Ѹ/]6*SN\%@jnloTޙgj[oMaduy>vc>z/4j3+!.٩~<f_05'qyD\}ZE=Z)&D|Y[ hL; YBy s!$Ly'Gu3)ZK97x *]"{-96OuZSb]BL- EVdR<X@u\> Pw,~KW#նՖ}N̿l: KvJE0Xa;u ٽ!FS9o|@?h=8 ŵ5{_`}\gh~=c5 TeV"&aNZjnN"$^⊝S_U,wrA.`~)\W+3tm W2\ ۭYٽcDKU$͂kZEM24O+M*@iLGuKe\<֦F&s{'- a&kzINy4Kc{e.S7K/tB]h)s'w-19+F*IjDeM ɲ~l LIϺw'g{& fOd2~k?tM 0UyѬ7,@vgƦp`V-TT]S߳!Nv0yAjuD>tAut C.8dNY2uZzYeCf8[S>>|i|FkiAd&NuM/P+ r3A'c.IV 8zYBےd)ľ)qF5Ir 7bJ]l?OH]sϧ9+d7sk7Tp$pz["]?dpħxj0tҹr̶||3٘pNsFw4/S!V/\f+7ʒcP1/(O_Vk?J*i8o2F.ŲpNu!ހzN_!duj|p]ʕV:!j da]r?,Rʖcԍ WRAg W*.֋qP*mU["IfŕֶFP|DF5xds$&[=!X6 7o2M_=5df`[--k~ 31{ApcRk"-$CA%5/Q " nDAFr: + no{}MSKu\&ʪ;@fF#͂%kV91:dy%-,P5~!Hcgh 6Ljd@ڵw%'7+ڱ-VH/j_׷͞&]#5q]9r _?2(L>^L_q. 49&Me%2n,d #5%ޜ vQTaF|h)Tg`+c~[.uzO"&`%!M DP^j*{w#P0 Gĵ:.'dD8 lfs@|.n`2n>]s>PL%23pWn PHMqEEď5 +U{$d:u^}j_|!+!d2g颯vՆo$â+K<#<x#<x#<x#%9ܶR̕3#<{qw+pœY:<x#<x#<xax#g?ў NσqOLIENDB`wicd-1.7.2.4/icons/96px/0000775000175000017500000000000011747563546014756 5ustar daviddavid00000000000000wicd-1.7.2.4/icons/96px/wicd-gtk.png0000664000175000017500000001050311635330115017150 0ustar daviddavid00000000000000PNG  IHDR``w8sRGBbKGD pHYs B(xtIME-9GIDATxyt\ŕuK$KYx`vC0>!!0p!0a!p@ @p2@$ 81  al% xAxm?Z.9-uZV5$eTEҀ@P  [6`/?kv}_jƐ%: ӈХ4H}L cM}u> \Ƣ=r]qЉ.ZcXQ 5&)[ӌGYQ@!6Kp$>F{ޣOԅ7*+mep5*_P~2Sj!4|OB \'hT KƱ#1_2'PcVfۻ_WfU@X8xx{=̠/oT_Bk |pN9A8ow@9wOʁm@%>xrcuGFe/Ė --V?ʌB=h ȘN< m%럡OI Gb`7f6> mVAՇ!(O J_m߶~b5>UW;)x~2eAG r&*IA0q:]L r |fy۩@|;H"Oj30v͊_hso`&Z0 `H:l5^sm@ng^UK&tЧ^#!cҌ6[Y&p x0NWrT]onV#ĺ6(P_dΥ x 7;/ϦMQ6T.MaIRsи_A]@{Mf#k7i_Cnʻi}QoLR#楱CfNHoux+2}|YSR;G!zwE RlM_]O`^Y2Bp~ZbbG}^N@'=5R| [䢜mΙH.4 j lf%BH`'`Nz}D)moyOSslY`I skqACc^̗\͇6?Ly}0ddHъ;,4pEӍc'hpEϽ8CQNXG'"wZ -]YY/H?u\w~NMl)IVYrC3 sZI\ȡEO[̒I |k7{A,ӽI(  tVFyī*&AkM3;4L9;=n3 m01A;*;\O3k26\Z G l:T0;ʵ ox .xst]F,4dzR-aj@֠I&Np\^ ʣ=H& Y<H6pAM0a=w6Dlݒ"͆"oBQe| 046Hڢ 瓺;86/~|FToX2 S z1!Ev]RP.Z]|'Zx!a # 1vN`H$:A͎®[K=@nR=֞t0ey $%|Yfl: 찞g7XlA;8Z=j*YDwxkdx`4aȴXCi1)d:Tn kO| /8xn*Q^r;rw63 CUTFix·Ay;VBj+yY̌rdY1usH3h30U:t4ݲJq61*ljRAewn|ΎRAſJ1 nJE66^_v*W:ᤂTAJ9/kX IyL!2rzL&D: q#Ow @ggZ JR??áPx#;b zw?f_ܺ]9E^Ϫր+ x5*eX>.ls*ii;*#ql3 p+W E+8 ,@c+vx+|E9HslKmU XC*{ EsU35ngOTgthmaXyi &[u#R=]qT^xߛ\s02}{ yI&9K7/ttQXhzu}hsnPC+C^Hzކ MUMkM\9s,HgZZ .ʚo.VեX4`cG"%. XB}sC<(~>SCf@<5u]b.H7x 0 se]}ؒdt ny85-{8o N_F LP['|#ѯ+bZ V<}Ȝ> #Ev|; xq}ِ/x%zO~Fr7 "ỳCGm e^Fђ<&TDvU'5¦ï-E#u^sXΕz@&pi yxyz 7 ,aqwjDF}DE[üxf jڬ3V'ď ( bW[+}jxܩsĶjAqve~"aPfU#Il=$Q5wȅԛ8CV^\o1VeXAt:MZ :mJ͚ʄhI)q1V@~ǝ=p6 y,8AOшsQ3&(8i_ǘU [.,d<*8 #XAS_`xMт 7.{oڐɭfW"h1nQ{=h,7˾,zQ|*U6+) 6,Csw4 u?s !@6D!Azy vPqD@l9 e)^/a\p!jVVQ'X_&j X{n#\Xo#(bܥ '<^('-p7V7]{:AVXNv#/IAnF~+/i Rё#kXV cJt1d*\) MU y6FX3yAd7sBs2[/m ~p0=CǺd 7BNiPpη3j8"ɿJd$\NӐW e^p!HJzf}j@nl{~R[2C&$I$% @$H$I @RFNFljS"?E82Z&2hu~Gl ~܎?{87@k@rNJ$II )I$eb-''Fyz IENDB`wicd-1.7.2.4/icons/22px/0000775000175000017500000000000011747563546014743 5ustar daviddavid00000000000000wicd-1.7.2.4/icons/22px/wicd-gtk.png0000664000175000017500000000155511635330115017144 0ustar daviddavid00000000000000PNG  IHDRĴl;sRGBbKGD pHYs B(xtIME1 IDAT8˵Mh\eޙdLCDc@mtZ'O TӍ[7Pqc)+AʿMQJ7Ū-RKRBbښ|.rǶ =ܔh ķXi8Ex"4ćߨl(x>-+3hqhᴯ' g]7?1lm<9ں^F*VeY> ʅ=uc^o;:z\%O>gѹݎMUod{hڅe`|ԉ"dib7ezdcJ0 rյ?y8ڍp oO[Y5՛pFD2=\6@0m:}1 b*),h;_qp)32[oҘx2ezxkK?NW 7oՅQ+_&kp|z$VvS4~v^%o>EGyhMtlsmutb80+W*$]C&Ҝ]ɺWSjP}n/ OH&z-]W%~^9ϙ2.ODt**2}؜ٚyYgg !M^=%/(1hzС5" jS>pe#BGbgmt 9#;E^_+")n׆L{t3NF5\*?wXTZ=fq:hrQ=. Q`NrߜNº ўd-P7^`f{'^T߫ͪ\G,1 SL. (L,T "{@]VryhpeɈA @LKLpSV9#/sK0!F,nGP&n[/)օxG-/ϏƷnu55ܓtW)w >`E@Дg(v_aI\Yq&ksˏ.aCXE%޹Љ,.q^ }Ү&#l>;Li7p~/jDnWߎ`<-viAj/rNY-C=sA( P*::{)>|%b3h^ ЅJ}1Z*p|k }9JozGuBkG)0LesY P֫ V",l䆿g$ Tf8egvߤ.@ !`y̏V%O5o>2oج(` ;aJvoXuU/W<Lj\t F-k)v #m7xRt~rZ7\ J]I܇iu61lj>4gOqeH"@3[2IW!j%UCb[F;  )4%X(d-%T [?>vAu/A0ՠdU(vD\:(#?cn&>Lwc(Տ]~7/swgj3%G>ۊ @==:].&TT`@LJffy[༊q,mƭdiЁJˊnt`; lr_zB E bN@(sHآ(bjȾ}E놠ҕ. 5YOɃNv&6GjP0^d>,|jAmaK])E YfXE빘%'?x  RiM/Fi+kuq˩ @@%Ī*em!'24O!uF`Lyj'gv;p?V QC"zRDMIB}'BK0Z wTaG76NnM˅GX;=}GїYG ƠZ@>]A,LQDLhڑ &eJGԆA]Eo8emB=:lAy5\i-+:h0L}(=Y7 3(sVw3"Phw7(7Z_ vgYٷObjycuaIÖlO|7 :H0EW8Iߐ~% a/@!;ŀi{h}*N10KZ  lKj cxOj`BxYd|jkZ*o