diff --git a/CHANGES b/CHANGES index f40c805..c386e9b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,35 +1,6778 @@ -1.5.0 - * Added support for pump and dhcpcd - * Added wep-hex, wep-passphrase, eap-tls, and wep-shared encryption templates - * Autoconnect falls back to wireless if wired connection fails for any reason - * Fixed a memory leak - * Added ability to put interfaces up/down via the GUI - * Reduced number of external program calls for improved memory usage - * Added support for using one set of settings for all networks with an ESSID - * Made debugging output less spammy and more helpful - * Made GUI more responsive - * Added README and INSTALL - * Added setup.py install script - * Improved automatic reconnection - * Added option to disable tray animations - * Added distro-specific init scripts when installed from source - * Added PID file that is created on daemon start and destroyed on SIGTERM - * Allow resizing of Preference window and main window - * Added support for getting interface names from /proc/net/wireless - * Added a Disconnect button - * Added MAC address to network information that is always visible - * Requires root permissions to edit pre/post/disconnection scripts - * Daemon process is now renamed "wicd" and GUI is renamed "wicd-client" - * Added support for kdesu and ktsuss as well as gksudo - * Added ability to restart and print usage to init file - * Renamed desktop file "wicd.desktop" - * Change directory structure to be FHS compliant and customizable - * Added desktop file for autostarting - * Rewrote init file for Debian from /etc/init.d/skeleton - * Added manpages for the configuration files and daemon - * Added INSTALL, LICENSE, AUTHORS, README, and CHANGELOG - * Created new SVG icon and updated PNG icons accordingly - * Added --no-poll option to daemon which prevents polling of data - * Fixed various permissions issues - * Added wired-default profile for automatic DHCP on ethernet by default - * Changed log file permissions to 0600 +------------------------------------------------------------ +revno: 434 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sun 2009-07-05 08:51:39 -1000 +message: + updated translations.py +------------------------------------------------------------ +revno: 433 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Sun 2009-07-05 14:42:39 -0400 +message: + Actually tell the user that he may need to be in wpath.wicd_group if wicd-clientgets an access-denied error. +------------------------------------------------------------ +revno: 432 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sun 2009-07-05 08:16:59 -1000 +message: + check to see if the interface exists in the decorator +------------------------------------------------------------ +revno: 431 +committer: Dan O'Reilly +branch nick: trunk +timestamp: Thu 2009-07-02 18:26:37 -0400 +message: + Make sure we run to_unicode on all properties we read from disk or get from the user (bug 390680). + Don't try to run global scripts of the global script directory doesn't exist (bug 386244). +------------------------------------------------------------ +revno: 430 +committer: Dan O'Reilly +branch nick: trunk +timestamp: Thu 2009-07-02 16:50:48 -0400 +message: + Fix crash when trying to create an ad-hoc network. +------------------------------------------------------------ +revno: 429 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Tue 2009-06-30 22:58:44 -0400 +message: + Merged r353 of 1.6-nacl. + ------------------------------------------------------------ + revno: 202.2.62 + committer: Andrew Psaltis + branch nick: 1.6-nacl + timestamp: Tue 2009-06-30 22:43:17 -0400 + message: + Background wicd's startup in Slackware's initscript. + ------------------------------------------------------------ + revno: 202.2.61 + committer: Andrew Psaltis + branch nick: 1.6-nacl + timestamp: Tue 2009-06-30 21:51:33 -0400 + message: + Fix a small unicode problem in wicd-curses that caused a crash in Debian Lenny. +------------------------------------------------------------ +revno: 428 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Wed 2009-06-24 19:14:43 -0400 +message: + Merge bugfixes from r351 of 1.6-nacl, thanks to comfrey in #wicd for noticing them. + ------------------------------------------------------------ + revno: 202.2.60 + committer: Andrew Psaltis + branch nick: 1.6-nacl + timestamp: Wed 2009-06-24 19:10:30 -0400 + message: + Do nothing if the user makes a connection attempt while scanning. + ------------------------------------------------------------ + revno: 202.2.59 + committer: Andrew Psaltis + branch nick: 1.6-nacl + timestamp: Wed 2009-06-24 18:44:29 -0400 + message: + Do nothing in wicd-curses if there are no networks present. + ------------------------------------------------------------ + revno: 202.2.58 + committer: Andrew Psaltis + branch nick: 1.6-nacl + timestamp: Wed 2009-06-24 18:43:58 -0400 + message: + Merged r417 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.57 + committer: Andrew Psaltis + branch nick: 1.6-nacl + timestamp: Sun 2009-06-21 14:07:22 -0400 + message: + Merged r426 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.56 + committer: Andrew Psaltis + branch nick: 1.6-nacl + timestamp: Fri 2009-06-19 23:20:29 -0400 + message: + Merge r417 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.55 + committer: Andrew Psaltis + branch nick: 1.6-nacl + timestamp: Wed 2009-06-17 20:52:59 -0400 + message: + Merge r416 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.54 + committer: Andrew Psaltis + branch nick: 1.6-nacl + timestamp: Sun 2009-06-07 14:53:04 -0400 + message: + Merge 411 of mainline 1.6. +------------------------------------------------------------ +revno: 427 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Sun 2009-06-21 14:45:44 -0400 +message: + Fix typo that crashes wicd-curses on attempting to bring up the help dialog. +------------------------------------------------------------ +revno: 426 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sat 2009-06-20 23:02:23 -0500 +message: + updated setup.py version and CHANGES +------------------------------------------------------------ +revno: 425 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Sat 2009-06-20 23:46:38 -0400 +message: + Fix the log file chmodding (os.chmod() can't accept a string, apparently). +------------------------------------------------------------ +revno: 424 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sat 2009-06-20 21:59:45 -0500 +message: + updated translations.py +------------------------------------------------------------ +revno: 423 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sat 2009-06-20 21:44:32 -0500 +message: + merged lp:~nacl/wicd/1.6-access-denied to display an error message if access to the daemon via DBus is denied + ------------------------------------------------------------ + revno: 417.2.6 + committer: Andrew Psaltis + branch nick: 1.6-access-denied + timestamp: Sat 2009-06-20 21:41:17 -0400 + message: + Restore python 2.5 compatibility in both clients. + ------------------------------------------------------------ + revno: 417.2.5 + committer: Andrew Psaltis + branch nick: 1.6-access-denied + timestamp: Fri 2009-06-19 23:03:42 -0400 + message: + Made the wicd-curses "access denied" string translatable, and updated wicd-curses.py to use it. + ------------------------------------------------------------ + revno: 417.2.4 + committer: Andrew Psaltis + branch nick: 1.6-access-denied + timestamp: Fri 2009-06-19 20:07:10 -0400 + message: + Use the ANSI escape sequences to print colors instead of fetching them using tput(1) in wicd-curses. + ------------------------------------------------------------ + revno: 417.2.3 + committer: Andrew Psaltis + branch nick: 1.6-access-denied + timestamp: Fri 2009-06-19 18:59:30 -0400 + message: + Fixed wicd-client to actually show the error dialog, by checking e.get_dbus_name() instead of just e. + ------------------------------------------------------------ + revno: 417.2.2 + committer: Andrew Psaltis + branch nick: 1.6-access-denied + timestamp: Fri 2009-06-19 18:48:39 -0400 + message: + Updated wicd-curses to use DBusException.get_dbus_name() instead of the exception arguments. + ------------------------------------------------------------ + revno: 417.2.1 + committer: Andrew Psaltis + branch nick: 1.6-access-denied + timestamp: Fri 2009-06-19 17:29:25 -0400 + message: + Made wicd-curses.py spit out an error if a dbus access denied error appears on startup. +------------------------------------------------------------ +revno: 422 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sat 2009-06-20 19:25:10 -0500 +message: + merged lp:~adamblackburn/wicd/1.6-return-101-if-no-strength to allow cards that don't report signal strength to work with Wicd's default settings + ------------------------------------------------------------ + revno: 418.1.2 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Sat 2009-06-20 14:40:30 -0500 + message: + update FormatSignalForPrinting to return ??% instead of 101% + ------------------------------------------------------------ + revno: 418.1.1 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Sat 2009-06-20 13:42:21 -0500 + message: + return 101 as the signal strength if altstrenth_pattern fails to find the strength +------------------------------------------------------------ +revno: 421 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sat 2009-06-20 19:24:07 -0500 +message: + merged lp:~dpaleino/wicd/pre-post-down to allow having pre/post disconnection scripts + ------------------------------------------------------------ + revno: 415.2.1 + committer: David Paleino + branch nick: wicd + timestamp: Tue 2009-06-16 17:13:41 +0200 + message: + Provide a pre-/post-down script mechanism + + WICD currently only provides pre-/post-connection scripts, and + only one disconnection script, that is run before actually + disconnecting. This provides pre-/post-disconnection scripts, + thus increasing configuration flexibility. +------------------------------------------------------------ +revno: 420 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sat 2009-06-20 19:22:36 -0500 +message: + merged lp:~adamblackburn/wicd/loggroup to allow passing the preferred log group and permissions to setup.py configure -- thanks to David Paleino + ------------------------------------------------------------ + revno: 412.3.6 + committer: Adam Blackburn + branch nick: loggroup + timestamp: Fri 2009-06-19 22:08:32 -0500 + message: + seperated chmod and chown try/excepts + ------------------------------------------------------------ + revno: 412.3.5 + committer: Adam Blackburn + branch nick: loggroup + timestamp: Tue 2009-06-16 23:57:02 +0800 + message: + added forgotten underscores + ------------------------------------------------------------ + revno: 412.3.4 + committer: Adam Blackburn + branch nick: loggroup + timestamp: Tue 2009-06-16 23:22:40 +0800 + message: + removed wicd-daemon.py from .bzrignore + ------------------------------------------------------------ + revno: 412.3.3 + committer: Adam Blackburn + branch nick: loggroup + timestamp: Tue 2009-06-16 23:15:05 +0800 + message: + merge 1.6 r415 + ------------------------------------------------------------ + revno: 412.3.2 + committer: Adam Blackburn + branch nick: loggroup + timestamp: Tue 2009-06-16 23:08:52 +0800 + message: + moved wicd-daemon.py back to wicd/ and changed wpath replacement values to use the wpath module + ------------------------------------------------------------ + revno: 412.3.1 + committer: David Paleino + branch nick: wicd + timestamp: Sat 2009-06-13 22:59:03 +0200 + message: + Support --loggroup and --logperms arguments to setup.py +------------------------------------------------------------ +revno: 419 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sat 2009-06-20 19:20:42 -0500 +message: + merged lp:~adamblackburn/wicd/1.6-cancel-edit-settings to allow canceling the edit settings dialog that appears when attempting to connect to an encrypted network without entering the encryption details + ------------------------------------------------------------ + revno: 417.1.2 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Sat 2009-06-20 07:58:15 -0500 + message: + fix crash resulting from encryption info missing when connecting + ------------------------------------------------------------ + revno: 417.1.1 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Thu 2009-06-18 15:16:29 +0800 + message: + allow user to cancel preferences dialog if they chose not to connect after clicking connect and showing the preferences dialog +------------------------------------------------------------ +revno: 418 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sat 2009-06-20 10:33:23 -0500 +message: + merged David Paleino's Debian init script that includes a status command + ------------------------------------------------------------ + revno: 415.1.1 + committer: David Paleino + branch nick: wicd + timestamp: Tue 2009-06-16 17:56:21 +0200 + message: + Add "status" to /etc/init.d/wicd (Debian/Ubuntu) +------------------------------------------------------------ +revno: 417 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Thu 2009-06-18 14:56:25 +0800 +message: + fixed crash that occured when clicking to connect to a secured network but without entering the security information +------------------------------------------------------------ +revno: 416 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Tue 2009-06-16 23:36:58 +0800 +message: + fix a small typo in misc.py -- thanks to David Paleino +------------------------------------------------------------ +revno: 415 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Tue 2009-06-16 07:44:27 +0800 +message: + disable automatically disconnecting when Automatically reconnect is False +------------------------------------------------------------ +revno: 414 +committer: Dan O'Reilly +branch nick: trunk +timestamp: Sun 2009-06-14 14:27:21 -0400 +message: + Merge. + ------------------------------------------------------------ + revno: 412.2.1 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Sun 2009-06-14 12:27:36 +0800 + message: + merged David's Debian patches branch + ------------------------------------------------------------ + revno: 412.1.3 + committer: David Paleino + branch nick: wicd + timestamp: Sat 2009-06-13 22:07:49 +0200 + message: + Support udhcpc, this is needed to smoothly run on the OpenMoko FreeRunner. + + Thanks to Luca Capello for porting the patch to 1.5.9, and + to "madmo" from the linked forum for making the patch. + + Patch originally taken from http://wicd.net/punbb/viewtopic.php?id=132 + + Patch ported to 1.6.0 code by David Paleino . + ------------------------------------------------------------ + revno: 412.1.2 + committer: David Paleino + branch nick: wicd + timestamp: Sat 2009-06-13 22:06:08 +0200 + message: + Update manpage with an appropriate WHATIS entry + ------------------------------------------------------------ + revno: 412.1.1 + committer: David Paleino + branch nick: wicd + timestamp: Sat 2009-06-13 22:05:10 +0200 + message: + Remove deprecated Encoding field +------------------------------------------------------------ +revno: 413 +committer: Dan O'Reilly +branch nick: trunk +timestamp: Sun 2009-06-14 14:25:06 -0400 +message: + Convert strings being prints out by dhclients to utf-8 before trying to log them. + When iwscan displays two entries for a hidden network, only display the one with the essid included. +------------------------------------------------------------ +revno: 412 +committer: Adam Blackburn +branch nick: wicd +timestamp: Tue 2009-06-09 13:25:02 +0800 +message: + display the ESSID/Wired Network in the title of the settings dialog +------------------------------------------------------------ +revno: 411 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Fri 2009-06-05 16:13:38 +0800 +message: + Updated translations.py +------------------------------------------------------------ +revno: 410 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Fri 2009-06-05 15:20:58 +0800 +message: + updated CHANGES +------------------------------------------------------------ +revno: 409 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Fri 2009-06-05 15:08:47 +0800 +message: + merged experimental-nacl + ------------------------------------------------------------ + revno: 202.2.53 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-06-04 22:19:33 -0400 + message: + If a network dialog is up when a scan is initiated externally, drop the dialog. + ------------------------------------------------------------ + revno: 202.2.52 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-06-04 22:10:05 -0400 + message: + Merge r408 of mainline 1.6. +------------------------------------------------------------ +revno: 408 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Thu 2009-06-04 22:24:14 +0800 +message: + add .sourceforge.net to the URLs in the translator +------------------------------------------------------------ +revno: 407 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Thu 2009-06-04 21:39:36 +0800 +message: + updated CHANGES, setup.py version, and NEWS +------------------------------------------------------------ +revno: 406 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Sat 2009-05-30 23:18:22 -0400 +message: + Merge r342 of experimental-nacl. + ------------------------------------------------------------ + revno: 202.2.51 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-05-30 23:12:53 -0400 + message: + Increased time between wireless scans to 2 seconds. + ------------------------------------------------------------ + revno: 202.2.50 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-05-30 23:11:37 -0400 + message: + Merged with r405 of mainline 1.6 +------------------------------------------------------------ +revno: 405 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Thu 2009-05-28 11:10:10 +0800 +message: + updated CHANGES and setup.py version +------------------------------------------------------------ +revno: 404 +committer: Dan O'Reilly +branch nick: 1.6 +timestamp: Wed 2009-05-27 22:25:32 -0400 +message: + Merge 1.6-dan + ------------------------------------------------------------ + revno: 401.1.3 + committer: Dan O'Reilly + branch nick: experimental + timestamp: Sun 2009-05-24 17:11:14 -0400 + message: + Try to recover if we attempt to load a non-existent backend. + ------------------------------------------------------------ + revno: 401.1.2 + committer: Dan O'Reilly + branch nick: experimental + timestamp: Fri 2009-05-22 15:43:14 -0400 + message: + Merge + ------------------------------------------------------------ + revno: 401.2.1 + committer: Dan O'Reilly + branch nick: experimental + timestamp: Fri 2009-05-22 15:33:03 -0400 + message: + - Make the GUI behave better when a disconnect button is pushed. + - Move some of the libnotify logic to guiutil.py and add support for displaying some error messages in a libnotify pop-up. + - Apply some patches provided by sunseraph. Tweak to the channel regex and checking for a valid AP bssid when monitoring a wireless connection. Set essid, bssid, and channel in separate calls to iwconfig. + - Add caching for ifconfig and iwconfig results in wnettools.py. That way we're not needlessly calling the same command a bunch of times in a short period of time (2 seconds). This removes the need for us to pass around iwconfig/ifconfig output elsewhere, though I've left it in for now. + - Remove unneeded BackendManager instance from networking.py + ------------------------------------------------------------ + revno: 401.1.1 + committer: Dan O'Reilly + branch nick: experimental + timestamp: Fri 2009-05-22 15:40:35 -0400 + message: + - Make the GUI behave better when a disconnect button is pushed. + - Move some of the libnotify logic to guiutil.py and add support for displaying some error messages in a libnotify pop-up. + - Apply some patches provided by sunseraph. Tweak to the channel regex and checking for a valid AP bssid when monitoring a wireless connection. Set essid, bssid, and channel in separate calls to iwconfig. + - Add caching for ifconfig and iwconfig results in wnettools.py. That way we're not needlessly calling the same command a bunch of times in a short period of time (2 seconds). This removes the need for us to pass around iwconfig/ifconfig output elsewhere, though I've left it in for now. + - Remove unneeded BackendManager instance from networking.py + - Fix last used wired networking autoconnection method +------------------------------------------------------------ +revno: 403 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sat 2009-05-23 12:51:02 +0800 +message: + Updated version numbers and CHANGES +------------------------------------------------------------ +revno: 402 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Sat 2009-05-23 00:40:52 -0400 +message: + Merged r340 of experimental-nacl. + ------------------------------------------------------------ + revno: 202.2.49 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-05-23 00:36:54 -0400 + message: + Merged r401 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.48 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-05-23 00:32:29 -0400 + message: + Made M^ and C^ into Alt+ and Ctrl+ respectively in OptCols. + Rearranged the OptCols for the preferences dialog to match those in the others. + ------------------------------------------------------------ + revno: 202.2.47 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-05-23 00:23:11 -0400 + message: + Removed some comments from wicd-curses.py. + ------------------------------------------------------------ + revno: 202.2.46 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-05-23 00:02:58 -0400 + message: + Really fixed bug 355693. :) +------------------------------------------------------------ +revno: 401 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Fri 2009-05-22 11:29:12 +0800 +message: + Buttons are now activated correctly when using the keyboard +------------------------------------------------------------ +revno: 400 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Thu 2009-05-21 23:18:48 +0800 +message: + merged 1.6-rworkman + ------------------------------------------------------------ + revno: 365.1.15 + committer: Robby Workman + branch nick: 1.6-rworkman + timestamp: Thu 2009-05-21 10:12:03 -0500 + message: + Clarify intent of INSTALL with respect to pm-utils version. + ------------------------------------------------------------ + revno: 365.1.14 + committer: Robby Workman + branch nick: 1.6-rworkman + timestamp: Tue 2009-05-19 23:40:13 -0500 + message: + Merged mainline back in; no other changes. +------------------------------------------------------------ +revno: 399 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Tue 2009-05-19 21:25:09 -0400 +message: + Merged r336 of experimental-nacl. + ------------------------------------------------------------ + revno: 202.2.45 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-05-19 21:20:29 -0400 + message: + Added wrap_exceptions to wicd-curses.py's run() function. + ------------------------------------------------------------ + revno: 202.2.44 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-05-19 21:18:30 -0400 + message: + Flipped the order of the dhcp clients in the prefs dialog and fixed a syntax + error in wicd-curses.py. + ------------------------------------------------------------ + revno: 202.2.43 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-05-19 21:06:38 -0400 + message: + Merge r398 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.42 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-05-15 01:05:36 -0400 + message: + Merge r395 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.41 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-05-15 01:05:04 -0400 + message: + Added some deactivated options for enabling debug logs. +------------------------------------------------------------ +revno: 398 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Wed 2009-05-20 07:12:58 +0800 +message: + Merged 1.6-rworkman + ------------------------------------------------------------ + revno: 365.1.13 + committer: Robby Workman + branch nick: 1.6-rworkman + timestamp: Tue 2009-05-19 15:44:52 -0500 + message: + Make sure the /sys/class/net/whatever is actually a directory in + GetWiredInterfaces() (similar to the check in GetWireless) + ------------------------------------------------------------ + revno: 365.1.12 + committer: Robby Workman + branch nick: 1.6-rworkman + timestamp: Fri 2009-05-15 12:25:58 -0500 + message: + Merged mainline. No other changes to this branch; no need to merge + into mainline. + ------------------------------------------------------------ + revno: 365.1.11 + committer: Robby Workman + branch nick: 1.6-rworkman + timestamp: Fri 2009-05-08 14:27:46 -0500 + message: + Merged mainline; no other changes. + ------------------------------------------------------------ + revno: 365.1.10 + committer: Robby Workman + branch nick: 1.6-rworkman + timestamp: Sat 2009-05-02 20:25:25 -0500 + message: + Merged mainline back in to sync up this branch. + No need to re-merge into mainline, as there are no other changes + at this point. + ------------------------------------------------------------ + revno: 365.1.9 + committer: Robby Workman + branch nick: 1.6-rworkman + timestamp: Fri 2009-05-01 09:15:18 -0500 + message: + Merged mainline. +------------------------------------------------------------ +revno: 397 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Wed 2009-05-20 07:10:49 +0800 +message: + merge + ------------------------------------------------------------ + revno: 395.1.2 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Wed 2009-05-20 07:01:31 +0800 + message: + Changed DHCP client order to dhcpcd -> pump -> dhclient + ------------------------------------------------------------ + revno: 395.1.1 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Sat 2009-05-16 20:50:20 +0800 + message: + Apply .desktop file patch from Debian (remove deprecated encoding line) +------------------------------------------------------------ +revno: 396 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Wed 2009-05-20 07:09:42 +0800 +message: + changed DHCP client order in preferences dialog +------------------------------------------------------------ +revno: 395 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Thu 2009-05-14 21:55:59 +0800 +message: + update CHANGES and NEWS +------------------------------------------------------------ +revno: 394 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Thu 2009-05-14 09:44:28 -0400 +message: + Merged typo fix from r331 of experimental-nacl. + ------------------------------------------------------------ + revno: 202.2.40 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2009-05-13 19:03:29 -0400 + message: + Fixed typo in wicd-curses.py. +------------------------------------------------------------ +revno: 393 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Thu 2009-05-14 19:37:20 +0800 +message: + Fix / tags +------------------------------------------------------------ +revno: 392 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Tue 2009-05-12 00:06:38 -0400 +message: + Merged r330 of experimental-nacl. + ------------------------------------------------------------ + revno: 202.2.39 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-05-12 00:04:43 -0400 + message: + If the screen in wicd-curses is not up and an ui update is requested, abort the + program. + ------------------------------------------------------------ + revno: 202.2.38 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Mon 2009-05-11 23:52:43 -0400 + message: + Merged with r391 of mainline 1.6. +------------------------------------------------------------ +revno: 391 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-05-10 13:53:54 -0400 +message: + Don't use dbusmanager.DBusException--it doesn't exist. +------------------------------------------------------------ +revno: 390 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sun 2009-05-10 22:51:49 +0800 +message: + Made the GUI look better with dark themes +------------------------------------------------------------ +revno: 389 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sun 2009-05-10 22:03:52 +0800 +message: + Removed italicized text from the GTK GUI +------------------------------------------------------------ +revno: 388 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Sun 2009-05-10 09:51:01 -0400 +message: + Merged with r328 of experimental-nacl. + ------------------------------------------------------------ + revno: 202.2.37 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-05-10 09:40:38 -0400 + message: + Hopefully fixed bug 355693, related to focus positioning. + ------------------------------------------------------------ + revno: 202.2.36 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-05-07 00:38:18 -0400 + message: + Redid the decorator to look like the other exception-catching decorators in wicd. + ------------------------------------------------------------ + revno: 202.2.35 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-05-07 00:37:28 -0400 + message: + Remerge with mainline, doing nothing. + ------------------------------------------------------------ + revno: 202.2.34 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-05-07 00:30:25 -0400 + message: + Added support for manual distro detection in setup.py. + ------------------------------------------------------------ + revno: 202.2.33 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2009-05-06 15:33:12 -0400 + message: + Made scans asynchronous so that users can actually access preferences while the daemon is scanning. + ------------------------------------------------------------ + revno: 202.2.32 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2009-05-06 15:19:46 -0400 + message: + Merged r385 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.31 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-05-02 18:45:36 -0400 + message: + Merged r379 of mainline 1.6. +------------------------------------------------------------ +revno: 387 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-05-09 20:53:49 -0400 +message: + Make bitrates regex work when it's the last entry in a cell. +------------------------------------------------------------ +revno: 386 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Wed 2009-05-06 18:13:29 -0400 +message: + Fixed missing endquote in wicd-client.py. +------------------------------------------------------------ +revno: 385 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Tue 2009-05-05 12:56:09 +0800 +message: + Updated translations.py +------------------------------------------------------------ +revno: 384 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Tue 2009-05-05 12:55:35 +0800 +message: + Added code to debug why pynotify fails +------------------------------------------------------------ +revno: 383 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Tue 2009-05-05 12:00:22 +0800 +message: + updated CHANGES/NEWS +------------------------------------------------------------ +revno: 382 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Tue 2009-05-05 11:58:36 +0800 +message: + merged notifications branch + ------------------------------------------------------------ + revno: 371.1.13 + committer: Adam Blackburn + branch nick: libnotify-support-ng + timestamp: Tue 2009-05-05 10:34:44 +0800 + message: + added support for disabling notifications in setup.py + ------------------------------------------------------------ + revno: 371.1.12 + committer: Adam Blackburn + branch nick: libnotify-support-ng + timestamp: Tue 2009-05-05 10:17:10 +0800 + message: + merged latest 1.6 + ------------------------------------------------------------ + revno: 371.1.11 + committer: Adam Blackburn + branch nick: libnotify-support-ng + timestamp: Sun 2009-05-03 17:31:18 +0800 + message: + Added icons for wireless networks and disconnect states + ------------------------------------------------------------ + revno: 371.1.10 + committer: Adam Blackburn + branch nick: libnotify-support-ng + timestamp: Sun 2009-05-03 17:27:31 +0800 + message: + merge latest 1.6 + ------------------------------------------------------------ + revno: 371.1.9 + committer: Adam Blackburn + branch nick: libnotify-support-ng + timestamp: Sun 2009-05-03 17:26:29 +0800 + message: + added images to wired network connection notifications + ------------------------------------------------------------ + revno: 371.1.8 + committer: Adam Blackburn + branch nick: libnotify-support-ng + timestamp: Sun 2009-05-03 10:32:10 +0800 + message: + Added support for instantly enabling/disabling notifications when the preference is changed + ------------------------------------------------------------ + revno: 371.1.7 + committer: Adam Blackburn + branch nick: libnotify-support-ng + timestamp: Sun 2009-05-03 09:50:09 +0800 + message: + Fixed the libglade warnings when loading the GTK GUI + ------------------------------------------------------------ + revno: 371.1.6 + committer: Adam Blackburn + branch nick: libnotify-support-ng + timestamp: Sun 2009-05-03 09:33:32 +0800 + message: + Merge latest 1.6 + ------------------------------------------------------------ + revno: 371.1.5 + committer: Adam Blackburn + branch nick: libnotify-support-ng + timestamp: Sat 2009-05-02 14:01:30 +0800 + message: + Disable the enable notification option if pynotify isn't installed + ------------------------------------------------------------ + revno: 371.1.4 + committer: Adam Blackburn + branch nick: libnotify-support-ng + timestamp: Sat 2009-05-02 12:47:05 +0800 + message: + Merge latest 1.6 + ------------------------------------------------------------ + revno: 371.1.3 + committer: Adam Blackburn + branch nick: libnotify-support-ng + timestamp: Sat 2009-05-02 12:43:43 +0800 + message: + Reworded notifications and added new entries to translations.py + ------------------------------------------------------------ + revno: 371.1.2 + committer: Adam Blackburn + branch nick: libnotify-support-ng + timestamp: Fri 2009-05-01 14:32:09 +0800 + message: + added support for enabling/disabling notifications + ------------------------------------------------------------ + revno: 371.1.1 + committer: Adam Blackburn + branch nick: libnotify-support-ng + timestamp: Fri 2009-05-01 13:46:21 +0800 + message: + Initial notification support +------------------------------------------------------------ +revno: 381 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sun 2009-05-03 22:00:24 +0800 +message: + print wicd's version number on daemon start + ------------------------------------------------------------ + revno: 379.1.1 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Sun 2009-05-03 17:20:02 +0800 + message: + Updated translations.py to include all translations from old translations.py +------------------------------------------------------------ +revno: 380 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sun 2009-05-03 21:58:11 +0800 +message: + print wicd's version number on daemon start +------------------------------------------------------------ +revno: 379 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Sat 2009-05-02 14:08:07 -0400 +message: + Merged bugfixes from r321 of experimental-nacl. + ------------------------------------------------------------ + revno: 202.2.30 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-05-01 22:23:40 -0400 + message: + Merge r375 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.29 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-05-01 22:13:15 -0400 + message: + Some more bugfixes... + Fixed unencrypted network support in both UIs. + Fixed marking the Static IP checkbox in wicd-curses. + Made the checkboxes in the the network properties dialogs in wicd-curses act + like those in wicd-client. + Filter the urwid popen2 warning in wicd-curses. + ------------------------------------------------------------ + revno: 202.2.28 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-05-01 13:02:44 -0400 + message: + Merged with r272 of mainline 1.6. +------------------------------------------------------------ +revno: 378 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sat 2009-05-02 15:32:58 +0800 +message: + Updated INSTALL to use update_translations_py before get_translations +------------------------------------------------------------ +revno: 377 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sat 2009-05-02 15:30:09 +0800 +message: + Added automatically generated translations.py +------------------------------------------------------------ +revno: 376 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sat 2009-05-02 15:24:50 +0800 +message: + added support for automatically retrieving translations.py +------------------------------------------------------------ +revno: 375 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-05-01 20:26:46 -0400 +message: + Fix bug where shared essid settings couldn't be disabled once they were turned on. +------------------------------------------------------------ +revno: 374 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-05-01 20:20:40 -0400 +message: + Fix crash when saving settings for unencrypted networks. + Remove unneeded function in prefs.py +------------------------------------------------------------ +revno: 373 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Fri 2009-05-01 21:58:53 +0800 +message: + Merge 1.6-rworkman (thanks!) + ------------------------------------------------------------ + revno: 365.1.8 + committer: Robby Workman + branch nick: 1.6-rworkman + timestamp: Tue 2009-04-28 10:51:16 -0500 + message: + Tweaks to NEWS file. + ------------------------------------------------------------ + revno: 365.1.7 + committer: Robby Workman + branch nick: 1.6-rworkman + timestamp: Tue 2009-04-28 10:50:23 -0500 + message: + Merged mainline. This will require one more change to the NEWS file + to handle conflicts. + ------------------------------------------------------------ + revno: 365.1.6 + committer: Robby Workman + branch nick: 1.6-rworkman + timestamp: Sun 2009-04-26 21:38:10 -0500 + message: + Clarified some required versions in INSTALL + ------------------------------------------------------------ + revno: 365.1.5 + committer: Robby Workman + branch nick: 1.6-rworkman + timestamp: Sat 2009-04-25 23:17:33 -0500 + message: + Use set_icon_name() instead of set_icon_from_file() in gui.py ; this + allows gtk to use the themed icons (and presumably the correct size + and all that good stuff). + ------------------------------------------------------------ + revno: 365.1.4 + committer: Robby Workman + branch nick: 1.6-rworkman + timestamp: Sat 2009-04-25 22:55:12 -0500 + message: + Synced CHANGES file with mainline. + Minor tweaks to NEWS file (mostly formatting). + ------------------------------------------------------------ + revno: 365.1.3 + committer: Robby Workman + branch nick: 1.6-rworkman + timestamp: Wed 2009-04-22 19:53:08 -0500 + message: + Added NEWS file with major changes since 1.5.x. + Updated CHANGES file with 'bzr log' output as of r367. +------------------------------------------------------------ +revno: 372 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Fri 2009-05-01 13:41:13 +0800 +message: + Also catch AttributeErrors when guessing data types +------------------------------------------------------------ +revno: 371 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2009-04-27 19:17:01 -0400 +message: + Correctly handle case where a key is all digits and starts with a '0'. + Remove some unused imports. + Simplfy code that checks for valid wpa_supplicant drivers. +------------------------------------------------------------ +revno: 370 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sun 2009-04-26 08:03:59 +0900 +message: + Updated version numbers +------------------------------------------------------------ +revno: 369 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sun 2009-04-26 08:00:33 +0900 +message: + Redirected bzr output to /dev/null +------------------------------------------------------------ +revno: 368 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sun 2009-04-26 07:53:24 +0900 +message: + Fixed setup.py translations installation and made wicd-daemon.py +x +------------------------------------------------------------ +revno: 367 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Thu 2009-04-23 19:41:10 +0800 +message: + Merged + ------------------------------------------------------------ + revno: 365.1.2 + committer: Andrew Psaltis + branch nick: 1.6 + timestamp: Wed 2009-04-22 17:40:07 -0400 + message: + Merged r318 of experimental-nacl, fixing yet another wicd-curses bug. + ------------------------------------------------------------ + revno: 202.2.27 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2009-04-22 17:37:50 -0400 + message: + Made the network preferences dialogs save whether they are using static IPs or not. Thanks to Adam for finding this one. + ------------------------------------------------------------ + revno: 202.2.26 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2009-04-22 14:06:26 -0400 + message: + Merged r366 of mainline 1.6. + ------------------------------------------------------------ + revno: 365.1.1 + committer: Andrew Psaltis + branch nick: 1.6 + timestamp: Wed 2009-04-22 12:13:06 -0400 + message: + Set the SVG wicd icon as the window icon in wicd-client. +------------------------------------------------------------ +revno: 366 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Thu 2009-04-23 19:38:48 +0800 +message: + Updated CHANGES and added NEWS +------------------------------------------------------------ +revno: 365 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Wed 2009-04-22 22:17:39 +0800 +message: + fixed another typo +------------------------------------------------------------ +revno: 364 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Wed 2009-04-22 22:11:33 +0800 +message: + fixed a typo +------------------------------------------------------------ +revno: 363 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Wed 2009-04-22 22:02:31 +0800 +message: + Updated version number +------------------------------------------------------------ +revno: 362 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Wed 2009-04-22 21:45:51 +0800 +message: + Updated vcsinfo.py generation logic +------------------------------------------------------------ +revno: 361 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2009-04-21 21:25:59 -0400 +message: + Refactor monitor.py polling code to remove reliance on globals. + Make sure we update the polling rate in wicd-monitor when the backend changes. +------------------------------------------------------------ +revno: 360 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2009-04-21 20:30:40 -0400 +message: + Use atexit instead of catching SIGTERM in wicd-daemon. + Use Popen to launch wicd-monitor instead of gobject.spawn_async. +------------------------------------------------------------ +revno: 359 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Tue 2009-04-21 17:47:46 -0400 +message: + Merged r316 of experimental-nacl, providing some small feature additions and bufixes. + ------------------------------------------------------------ + revno: 202.2.25 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-04-21 14:09:29 -0400 + message: + Fixed a problem where if a scan is initiated externally, and wicd-curses doesn't see it, wicd-curses will half-drop a running big dialog. + ------------------------------------------------------------ + revno: 202.2.24 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-04-21 13:34:01 -0400 + message: + Fix bug introduced in r356 where wicd would crash upon not finding dhclient. + ------------------------------------------------------------ + revno: 202.2.23 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-04-21 13:16:44 -0400 + message: + Added support for disabling nonexistent external tools in the pref_curses.py. + Added a DynRadioButton in curses_misc.py. + ------------------------------------------------------------ + revno: 202.2.22 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-04-21 13:15:30 -0400 + message: + Merged with r358 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.21 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-04-17 08:04:02 -0400 + message: + Merged r355 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.20 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-04-12 12:12:38 -0400 + message: + Merge r352 of mainline 1.6 +------------------------------------------------------------ +revno: 358 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Tue 2009-04-21 22:33:29 +0800 +message: + Updated CHANGES +------------------------------------------------------------ +revno: 357 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Mon 2009-04-20 01:02:20 -0400 +message: + Set the "Required-Stop" field in the openSUSE initscript to $null to get the OBS to stop complaining. +------------------------------------------------------------ +revno: 356 +committer: Dan O'Reilly +branch nick: hiddenfixes +timestamp: Sun 2009-04-19 21:13:58 -0400 +message: + Use the -v option if dhclient is 4.x + Simplify sorting method for WAPs. +------------------------------------------------------------ +revno: 355 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Fri 2009-04-17 14:38:12 +0900 +message: + Made wicd-daemon.py executable +------------------------------------------------------------ +revno: 354 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Thu 2009-04-16 21:49:42 -0400 +message: + Remove pointless assignment in be-ioctl + Set wireless mode before putting interface up. + Put wireless interfaces up before trying to authenticate. +------------------------------------------------------------ +revno: 353 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Tue 2009-04-14 01:06:36 -0400 +message: + Updated wicd-curses.8.in, made the date in wicd-client.1 accurate, fixed a typo in setup.py, and added a bdist_rpm option in setup.cfg. +------------------------------------------------------------ +revno: 352 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Sun 2009-04-12 02:50:57 -0400 +message: + Added my name to setup.py. +------------------------------------------------------------ +revno: 351 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sun 2009-04-12 14:48:52 +0800 +message: + vcsinfo.py is regenerated when setup.py is run +------------------------------------------------------------ +revno: 350 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-04-11 22:45:13 -0400 +message: + Fix duplicate GetOperationalMode() methods. + Switch misc.get_gettext() to translations.get_gettext() in configscript.py +------------------------------------------------------------ +revno: 349 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-04-11 22:41:34 -0400 +message: + Add missing print statement to ExecuteScripts() +------------------------------------------------------------ +revno: 348 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-04-11 19:57:02 -0400 +message: + Make sure we fall back to wpa_cli if wpactrl isn't available when stopping wpa_supplicant. +------------------------------------------------------------ +revno: 347 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-04-11 18:53:30 -0400 +message: + Only check for wireless tools in the ioctl backend if wpactrl isn't available. + Fix up error handling when there is no graphical sudo program installed. +------------------------------------------------------------ +revno: 346 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-04-11 18:37:51 -0400 +message: + Make sure we check for wirelesstools in the ioctl backend. +------------------------------------------------------------ +revno: 345 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-04-11 18:04:22 -0400 +message: + Don't build C extensions modules in main setup.py + Give WirelessInformationDialog a parent. +------------------------------------------------------------ +revno: 344 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Fri 2009-04-10 22:46:57 -0400 +message: + Merged some more wicd-curses changes, experimental-nacl r310. + ------------------------------------------------------------ + revno: 202.2.19 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-04-10 22:33:40 -0400 + message: + Made it possible to enter 'q' and 'Q' into dialog edit fields. +------------------------------------------------------------ +revno: 343 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Fri 2009-04-10 22:13:48 -0400 +message: + Merged wicd-curses changes from r309 of experimental-nacl. + ------------------------------------------------------------ + revno: 202.2.18 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-04-10 22:07:14 -0400 + message: + Fixed network DNS input bug found by Brandon Hartshorn. + ------------------------------------------------------------ + revno: 202.2.17 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-04-05 11:35:36 -0400 + message: + Merged with r342 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.16 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2009-04-01 19:01:00 -0400 + message: + Generic updates and a bugfix. + curses/README,curses/TODO: Cleaned up and updated respectively + curses/curses_misc.py: added a get_caption() method to MaskingEdit + curses/netentry_curses.py: Actually made the error dialogs work instead of crashing the program. + curses/wicd-curses.py: Changed some capitalization in the help. + ------------------------------------------------------------ + revno: 202.2.15 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Mon 2009-03-30 15:41:37 -0400 + message: + Merge r340 of mainline 1.6. +------------------------------------------------------------ +revno: 342 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-04-04 13:43:29 -0400 +message: + Fix crash with hidden essids if it was stored in wireless-settings.conf as None. + Only trigger a wpa_supplicant rescan once when connecting. +------------------------------------------------------------ +revno: 341 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-04-03 19:07:00 -0400 +message: + Always use the "C" local when running external commands. +------------------------------------------------------------ +revno: 340 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-03-27 23:14:19 -0400 +message: + Merge. + ------------------------------------------------------------ + revno: 338.1.1 + committer: Andrew Psaltis + branch nick: 1.6 + timestamp: Fri 2009-03-27 10:24:59 -0400 + message: + Merged r305 of experimental-nacl. + ------------------------------------------------------------ + revno: 202.2.14 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-03-27 00:25:59 -0400 + message: + Changed some of the colors in wicd-curses.py and added the About to the OptCols on the main screen. + ------------------------------------------------------------ + revno: 202.2.13 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2009-03-25 12:36:57 -0400 + message: + Various fixes. + curses/curses_misc.py: + Simplified changing the "arrow" on the ComboBox, if I decide to do so. + curses/prefs_curses.py: Added a docstring + curses/wicd-curses.py: + 'q' or 'Q' quits a dialog without saving now. + Fixed a bug where a scan run while a dialog is up would lock the screen and + half-close the dialog when it is done. +------------------------------------------------------------ +revno: 339 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-03-27 23:13:16 -0400 +message: + Fix another issue with integer keys. +------------------------------------------------------------ +revno: 338 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Wed 2009-03-25 20:19:11 -0400 +message: + Add a workaround for an issue where large integers got mishandled by python-dbus on 64-bit systems. + Fix potential issue if encryption key is a number + Close all open fd's in the daemonize code. +------------------------------------------------------------ +revno: 337 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Tue 2009-03-24 12:30:25 -0400 +message: + Merged in curses-uimod changes from experimental-nacl. + ------------------------------------------------------------ + revno: 202.2.12 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-03-24 09:01:02 -0400 + message: + Merge 336 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.11 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-03-24 08:12:07 -0400 + message: + Made the help in wicd-curses.py all read out on one line. per entry + ------------------------------------------------------------ + revno: 202.2.10 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Mon 2009-03-23 12:32:03 -0400 + message: + Merged r335 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.9 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-03-22 21:00:40 -0400 + message: + Improved the timing in general. + Decreased the clock update time to 500 ms. + Ensured that the wheel when connecting doesn't alternate weirdly. + Fixing this may also improve performance. + ------------------------------------------------------------ + revno: 202.2.8 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-03-22 19:25:19 -0400 + message: + Changed the clock in wicd-curses.py to update every 0.9 seconds. + ------------------------------------------------------------ + revno: 202.2.7 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-03-22 00:22:07 -0400 + message: + Merged in r331 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.6 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-03-21 23:21:31 -0400 + message: + Merged curses-uimod. It works well enough for me at the moment. + ------------------------------------------------------------ + revno: 202.3.26 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Sat 2009-03-21 23:18:03 -0400 + message: + Updated docs to note that enter results in connecting. + ------------------------------------------------------------ + revno: 202.3.25 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Sat 2009-03-21 17:33:41 -0400 + message: + Merged in enctemplates error handling fixes. + ------------------------------------------------------------ + revno: 202.3.24 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Thu 2009-03-19 12:48:28 -0400 + message: + Re-enabled "enter" in wicd-curses.py. + ------------------------------------------------------------ + revno: 202.3.23 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Wed 2009-03-18 23:37:28 -0400 + message: + Merged in Dan's enctemplates branch, and repaired two code merge conflicts. + ------------------------------------------------------------ + revno: 202.3.22 + committer: Andrew Psaltis + branch nick: curses-uimod-old + timestamp: Wed 2009-03-18 23:00:32 -0400 + message: + Merged r295 of experimental-nacl + ------------------------------------------------------------ + revno: 202.3.21 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Sat 2009-03-14 20:54:45 -0400 + message: + Fixed some keypress shenanigans + curses/wicd-curses.py: Fixed mouse events being passed to keypress functions (again) + curses/prefs_curses.py: Fixed some translations + curses/curses_misc.py: + Fixed mouse handling in TabColumns + Fixed callbacks to non-global keypresses in OptCols + ------------------------------------------------------------ + revno: 202.3.20 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Sat 2009-03-14 16:56:06 -0400 + message: + Merged setup.py changes from experimental-nacl, r293. + ------------------------------------------------------------ + revno: 202.3.19 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Wed 2009-03-11 20:34:52 -0400 + message: + Merged with experimental-nacl, r292 + ------------------------------------------------------------ + revno: 202.3.18 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Wed 2009-03-11 10:21:20 -0400 + message: + Fixed some bugs/usability issues + Enter is no longer mapped to anything + Arrow left is no longer mapped to anything + Edit text when it is unfocusable is now brown. + Fixed problem where scrolling up on the Preferences Dialog would somehow shift the dab over one. + ------------------------------------------------------------ + revno: 202.3.17 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Sat 2009-03-07 19:53:10 -0500 + message: + Fixed most keypresses not working. + ------------------------------------------------------------ + revno: 202.3.16 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Sat 2009-03-07 16:26:41 -0500 + message: + Added mouse support to OptCols. Everything works :-). + + This branch will be merged into experimental-nacl once I'm sure that everything works, and I update the documentation. + ------------------------------------------------------------ + revno: 202.3.15 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Sat 2009-03-07 14:49:51 -0500 + message: + Merged r294 of experimental-nacl + ------------------------------------------------------------ + revno: 202.3.14 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Fri 2009-03-06 15:41:19 -0500 + message: + Fixed the "left does not quit the preferences dialog" problem in wicd-curses. + ------------------------------------------------------------ + revno: 202.3.13 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Fri 2009-03-06 12:49:27 -0500 + message: + curses/prefs_curses.py: Adapted widgets for integration into the main UI + curses/curses_misc.py: + Removed the "bottom_part" from the TabColumns + curses/wicd-curses.py: + Added support for editing preferences directly in the main UI w/o a dialog + 'left' now only quits with saving for the NetworkSettingsDialogs + (suggestions as for what to do here would be appreciated) + ------------------------------------------------------------ + revno: 202.3.12 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Thu 2009-03-05 23:13:29 -0500 + message: + Made the keymappings displayed in the OptCols actually do what they say they're suppoed to do. + Updated the README + ------------------------------------------------------------ + revno: 202.3.11 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Thu 2009-03-05 23:09:17 -0500 + message: + More htoppish ui changes + curses/prefs_curses.py: changed save_results to save_settings + curses/curses_misc.py: + M^[ and M^] shift the tabs left and right respectively. The curses module + has trouble picking up M^left and M^right + curses/netentry_curses.py: + Removed the buttons and button-related code from the interface. + Removed the overlay code. + Adapted the code for direct insertion into the wicd-curses interface + curses/wicd-curses.py: + Teaked the wireless header. + Added support for sticking the network config dialog into the interface, and + changing the current OptCols when it is activated. + Added new OptCols for other large dialogs + ------------------------------------------------------------ + revno: 202.3.10 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Thu 2009-03-05 11:20:43 -0500 + message: + Actually made window resizing not drop the help screen. + ------------------------------------------------------------ + revno: 202.3.9 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Thu 2009-03-05 10:09:23 -0500 + message: + Modified the help dialog in wicd-curses so that it fills up the entire screen. + There may still a formatting issue, will wait on user opinion before changing. + ------------------------------------------------------------ + revno: 202.3.8 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Wed 2009-03-04 17:01:00 -0500 + message: + Fixed the wireless network header when we are only seeing wireless networks. + ------------------------------------------------------------ + revno: 202.3.7 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Wed 2009-03-04 16:54:26 -0500 + message: + curses/curses_misc.py: + Added a non-selectable listbox for the wireless network header + curses/wicd-curses.py: + Updated the wireless list-header generating function and activated it. + Removed/deactivated some unused code. + ------------------------------------------------------------ + revno: 202.3.6 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Wed 2009-03-04 00:56:17 -0500 + message: + curses/curses_misc.py: + added support for Meta and Ctrl being applied to keys in OptCols + curses/wicd-curses.py + Changed the colors slightly, colorized the clock. + ------------------------------------------------------------ + revno: 202.3.5 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Mon 2009-03-02 14:05:25 -0500 + message: + curses/wicd-curses.py: + Replaced idle_incr with a clock that counts seconds. + Streamlined some of the footer functions + The connecting progress-wheel now updates independently of any other counter. + Increased status updating time to 2 seconds (from 1.5) + ------------------------------------------------------------ + revno: 202.3.4 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Sun 2009-03-01 23:53:59 -0500 + message: + curses/curses_misc.py: Added a colon to each entry in OptCols + curses/wicd-curses.py: + Removed the 'print ""' from the end of the main entry point + Changed the infobar colors to grey on dark blue + ------------------------------------------------------------ + revno: 202.3.3 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Sun 2009-03-01 20:47:08 -0500 + message: + Things are coming along... + curses/netentry_curses.py: Realigned some text + curses/curses_misc.py: + Added support for clicking stuff (doesn't do anything except change a label + for now) + The keys 'left' and 'right' now accepted, and translated into fake arrows + Added a debug mode for the OptCols + curses/wicd-curses.py: + Removed if loop in locals() from the exception wrapper, this was causing bugs + in OptCols to spam my console + Debug mode on the optcols is set to default (for now) + Cleaned up idle_incr + Removed some of the exception wrappers + ------------------------------------------------------------ + revno: 202.3.2 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Sat 2009-02-28 18:58:12 -0500 + message: + curses/curses_misc.py: Added a htop-like OptCols + curses/wicd-curses.py: + Added support for OptCols. Some of the keys in there are not valid as of yet. + ------------------------------------------------------------ + revno: 202.3.1 + committer: Andrew Psaltis + branch nick: curses-uimod + timestamp: Sat 2009-02-28 11:32:29 -0500 + message: + Merged with r291 of experimental-nacl + ------------------------------------------------------------ + revno: 202.2.5 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-03-21 22:28:05 -0400 + message: + Merged r329 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.4 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Mon 2009-03-16 21:12:36 -0400 + message: + Dump descriptions of error messages to stderr instead of stdout. + ------------------------------------------------------------ + revno: 202.2.3 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Mon 2009-03-16 20:59:06 -0400 + message: + Merged in resolvconf support from mainline 1.6, r325. + ------------------------------------------------------------ + revno: 202.2.2 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-03-12 14:40:58 -0400 + message: + Merged r324 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.2.1 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2009-03-11 20:32:36 -0400 + message: + Merge with mainline 1,6, r323. +------------------------------------------------------------ +revno: 336 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2009-03-23 17:53:59 -0400 +message: + Remove some unneeded imports. + Remove unused variable. +------------------------------------------------------------ +revno: 335 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2009-03-23 01:30:16 -0400 +message: + Merge to import lines. +------------------------------------------------------------ +revno: 334 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2009-03-23 01:28:50 -0400 +message: + Make the ioctl backends use of python-iwscan and python-wpactrl optional. + Don't use __all__ in wnettools.py, and make the backends explicitly import the methods/classes they need from wnettools.py. +------------------------------------------------------------ +revno: 333 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-03-22 18:39:44 -0400 +message: + Update docstrings. +------------------------------------------------------------ +revno: 332 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-03-22 17:36:55 -0400 +message: + Update copyrights and some docstrings. + Make trayicon network menu scan-triggering behave better. +------------------------------------------------------------ +revno: 331 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-03-22 00:13:42 -0400 +message: + Fix decorators. +------------------------------------------------------------ +revno: 330 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-03-21 22:38:33 -0400 +message: + Merge enctemplates branch. + ------------------------------------------------------------ + revno: 312.3.7 + committer: Dan O'Reilly + branch nick: enctemplates + timestamp: Sat 2009-03-21 16:37:21 -0400 + message: + Merge 1.6 branch. + ------------------------------------------------------------ + revno: 312.3.6 + committer: Dan O'Reilly + branch nick: enctemplates + timestamp: Sat 2009-03-21 15:30:26 -0400 + message: + Fix some issues in the template error handling code. + ------------------------------------------------------------ + revno: 312.3.5 + committer: Dan O'Reilly + branch nick: enctemplates + timestamp: Mon 2009-03-16 23:19:06 -0400 + message: + Merge from 1.6 branch. + ------------------------------------------------------------ + revno: 312.3.4 + committer: Dan O'Reilly + branch nick: enctemplates + timestamp: Fri 2009-03-13 18:55:18 -0400 + message: + Merge + ------------------------------------------------------------ + revno: 312.3.3 + committer: Dan O'Reilly + branch nick: enctemplates + timestamp: Sun 2009-03-08 18:38:16 -0400 + message: + Merge encryption template changes for curses. + ------------------------------------------------------------ + revno: 312.4.1 + committer: Andrew Psaltis + branch nick: enctemplates + timestamp: Sun 2009-03-08 17:45:38 -0400 + message: + Fixed wicd-curses to support the new template backend. + Made the cacert and clcert fields optional in the eap-tls template. + ------------------------------------------------------------ + revno: 312.3.2 + committer: Dan O'Reilly + branch nick: enctemplates + timestamp: Sun 2009-03-08 18:32:48 -0400 + message: + Merge. + ------------------------------------------------------------ + revno: 312.3.1 + committer: Dan O'Reilly + branch nick: enctemplates + timestamp: Sat 2009-02-28 21:52:27 -0500 + message: + Tweak encryption template code so that optional parameters can be supplied. Tweak UI code to reflect that new functionality. + Allow for slightly more variation in template formatting. +------------------------------------------------------------ +revno: 329 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-03-21 22:22:04 -0400 +message: + Added a neediface decorator to replace using "if not self.iface return..." in every method that needs it. +------------------------------------------------------------ +revno: 328 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-03-21 19:41:13 -0400 +message: + Add missing check for no interface to GetIP. +------------------------------------------------------------ +revno: 327 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-03-21 16:28:40 -0400 +message: + - Replace some tabs that snuck in with spaces. + - Try to validate successful association with static IPs by pinging the gateway specified. +------------------------------------------------------------ +revno: 326 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-03-15 20:54:16 -0400 +message: + Apply Debian initscript patch from David Paleino. +------------------------------------------------------------ +revno: 325 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-03-15 15:54:14 -0400 +message: + Merge in resolvconf support. + ------------------------------------------------------------ + revno: 322.1.5 + committer: Dan O'Reilly + branch nick: resolvconf2 + timestamp: Sun 2009-03-15 13:47:55 -0400 + message: + Only print "Setting DNS" message if debug mode is on. + ------------------------------------------------------------ + revno: 322.1.4 + committer: Dan O'Reilly + branch nick: resolvconf2 + timestamp: Sat 2009-03-14 17:41:51 -0400 + message: + Fix how we set nameserver entries after code review. + ------------------------------------------------------------ + revno: 322.1.3 + committer: Dan O'Reilly + branch nick: resolvconf2 + timestamp: Thu 2009-03-12 20:54:33 -0400 + message: + Merge. + ------------------------------------------------------------ + revno: 322.1.2 + committer: Dan O'Reilly + branch nick: resolvconf2 + timestamp: Mon 2009-03-09 01:49:33 -0400 + message: + Merge. + ------------------------------------------------------------ + revno: 322.1.1 + committer: Dan O'Reilly + branch nick: resolvconf2 + timestamp: Mon 2009-03-09 00:07:39 -0400 + message: + Add support for using resolvconf instead of directly editing resolv.conf if possible. +------------------------------------------------------------ +revno: 324 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Thu 2009-03-12 17:55:16 +0800 +message: + Fixed get_translations and renamed cleargenerated to clear_generated +------------------------------------------------------------ +revno: 323 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2009-03-09 01:46:31 -0400 +message: + Add lunar init directory. +------------------------------------------------------------ +revno: 322 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-03-08 23:39:41 -0400 +message: + Still trying to fix this... + ------------------------------------------------------------ + revno: 298.3.7 + committer: Dan O'Reilly + branch nick: global-scripts + timestamp: Sun 2009-03-08 23:14:35 -0400 + message: + Merge. + ------------------------------------------------------------ + revno: 321.1.1 + committer: Dan O'Reilly + branch nick: experimental + timestamp: Sun 2009-03-08 23:09:12 -0400 + message: + Merge. + ------------------------------------------------------------ + revno: 312.1.2 + committer: Dan O'Reilly + branch nick: 1.6 + timestamp: Sun 2009-03-08 23:07:38 -0400 + message: + Merging/removing accidently commit. + ------------------------------------------------------------ + revno: 312.2.2 + committer: Dan O'Reilly + branch nick: resolvconf + timestamp: Sun 2009-03-08 22:45:24 -0400 + message: + Merge. + ------------------------------------------------------------ + revno: 319.1.3 + committer: Andrew Psaltis + branch nick: 1.6 + timestamp: Sun 2009-03-08 18:31:36 -0400 + message: + Fixed the fix. + ------------------------------------------------------------ + revno: 319.1.2 + committer: Andrew Psaltis + branch nick: 1.6 + timestamp: Sun 2009-03-08 18:02:44 -0400 + message: + Fixed the Lunar init script. + ------------------------------------------------------------ + revno: 319.1.1 + committer: Andrew Psaltis + branch nick: 1.6 + timestamp: Sun 2009-03-08 17:38:47 -0400 + message: + Added an init script for Lunar Linux. + ------------------------------------------------------------ + revno: 312.2.1 + committer: Dan O'Reilly + branch nick: resolvconf + timestamp: Sat 2009-02-28 16:01:26 -0500 + message: + Add support for using resolvconf instead of directly editing /etc/resolv.conf if it's available. + ------------------------------------------------------------ + revno: 312.1.1 + committer: Dan O'Reilly + branch nick: 1.6 + timestamp: Sun 2009-03-08 23:03:04 -0400 + message: + Undoing accidental commit. +------------------------------------------------------------ +revno: 321 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-03-08 22:49:24 -0400 +message: + Merge in Dario Freddi's additions, with some modifications. + ------------------------------------------------------------ + revno: 311.1.10 + committer: Dario Freddi + branch nick: wicd + timestamp: Sat 2009-03-07 12:51:11 +0100 + message: + Merges + ------------------------------------------------------------ + revno: 311.1.9 + committer: Dario Freddi + branch nick: wicd + timestamp: Sat 2009-03-07 12:16:45 +0100 + message: + Forgot to add a definition + ------------------------------------------------------------ + revno: 311.1.8 + committer: Dario Freddi + branch nick: wicd + timestamp: Fri 2009-03-06 23:53:09 +0100 + message: + Merging last changes + ------------------------------------------------------------ + revno: 311.1.7 + committer: Dario Freddi + branch nick: wicd + timestamp: Tue 2009-03-03 11:40:34 +0100 + message: + Removing placeholders, and fixing issues pointed out by Dan + ------------------------------------------------------------ + revno: 311.1.6 + committer: Dario Freddi + branch nick: wicd + timestamp: Mon 2009-03-02 11:44:57 +0100 + message: + Fixing implementation in ioctl + ------------------------------------------------------------ + revno: 311.1.5 + committer: Dario Freddi + branch nick: wicd + timestamp: Sun 2009-03-01 20:19:16 +0100 + message: + Adding available auth methods + ------------------------------------------------------------ + revno: 311.1.4 + committer: Dario Freddi + branch nick: wicd + timestamp: Sun 2009-03-01 19:31:34 +0100 + message: + Adding GetOperationalMode() to determine op mode of an interface + ------------------------------------------------------------ + revno: 311.1.3 + committer: Dario Freddi + branch nick: wicd + timestamp: Sun 2009-03-01 19:22:30 +0100 + message: + Adding the possibility of a custom iwconfig + ------------------------------------------------------------ + revno: 311.1.2 + committer: Dario Freddi + branch nick: wicd + timestamp: Sun 2009-03-01 16:46:58 +0100 + message: + Adding per-channel bitrate information as a string + ------------------------------------------------------------ + revno: 311.1.1 + committer: drf + branch nick: wicd + timestamp: Sun 2009-03-01 16:01:21 +0100 + message: + Starting implementation of current bitrate retrieval +------------------------------------------------------------ +revno: 320 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-03-08 20:38:54 -0400 +message: + Create an error dialog when we get a DBus access denied error. +------------------------------------------------------------ +revno: 319 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-03-08 15:58:44 -0400 +message: + Fix suse init script. +------------------------------------------------------------ +revno: 318 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Sat 2009-03-07 11:38:37 -0500 +message: + Merged wicd-curses changes from experimental-nacl, r294 + ------------------------------------------------------------ + revno: 202.1.92 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-03-07 11:34:22 -0500 + message: + Fixed translations.py support in wicd-curses. + ------------------------------------------------------------ + revno: 202.1.91 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-03-06 19:40:10 -0500 + message: + Merged r317 of mainline 1.6 + ------------------------------------------------------------ + revno: 202.1.90 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2009-03-04 00:41:28 -0500 + message: + Merged in translations.py changes (r315) from mainline 1.6. + ------------------------------------------------------------ + revno: 202.1.89 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-02-28 08:48:21 -0500 + message: + Merge r311 of mainline 1.6 + ------------------------------------------------------------ + revno: 202.1.88 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-02-28 08:40:02 -0500 + message: + curses/netentry_curses.py: + Made the password field actually keep its "passwordiness" when we go to the + buttons. + in/scripts=wicd-client.in: + Added support for X being off and wicd-curses not being there + ------------------------------------------------------------ + revno: 202.1.87 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-02-21 19:36:57 -0500 + message: + curses/wicd-curses.py: + Console display defaults to raw_display now, added -c argument to select curses_display + curses/README,in/man=wicd-curses.8.in: + Updated stuff done in wicd-curses.py +------------------------------------------------------------ +revno: 317 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Fri 2009-03-06 19:28:09 -0500 +message: + Made the wicd-curses script add WHEREAREMYFILES + Moved WHEREAREMYFILES to /var/lib/wicd, and adapted setup.py, wpath.py, and + the wicd-client script to support it + Fixed a typo in setup.py +------------------------------------------------------------ +revno: 316 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Wed 2009-03-04 18:34:35 -0500 +message: + Merge + ------------------------------------------------------------ + revno: 314.1.2 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Wed 2009-03-04 19:44:55 +0800 + message: + Removed old images + ------------------------------------------------------------ + revno: 314.1.1 + committer: Andrew Psaltis + branch nick: 1.6 + timestamp: Wed 2009-03-04 00:02:14 -0500 + message: + Added translations.py, and adapted all gtk and curses ui files to use it. + Moved the language dict functions and get_gettext to translations.py. Also + killed the functions and laid the dict bare in the file + Removed all instances of language[number] from wicd. +------------------------------------------------------------ +revno: 315 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Wed 2009-03-04 18:32:15 -0500 +message: + Fix setup.py bug where - was getting turned into _ in paths. +------------------------------------------------------------ +revno: 314 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-03-01 23:15:34 -0500 +message: + Apply lang patch from David Paleino +------------------------------------------------------------ +revno: 313 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-03-01 23:00:22 -0500 +message: + Merge in global script support. + ------------------------------------------------------------ + revno: 298.3.6 + committer: Dan O'Reilly + branch nick: global-scripts + timestamp: Sun 2009-03-01 22:43:28 -0500 + message: + Don't provide separate options for pre/post/disconnect scripts. Just a parent scripts directory. + ------------------------------------------------------------ + revno: 298.3.5 + committer: Dan O'Reilly + branch nick: global-scripts + timestamp: Sun 2009-03-01 21:50:18 -0500 + message: + Merge. + ------------------------------------------------------------ + revno: 298.3.4 + committer: Dan O'Reilly + branch nick: global-scripts + timestamp: Sat 2009-02-28 15:16:45 -0500 + message: + Merge + ------------------------------------------------------------ + revno: 298.3.3 + committer: Dan O'Reilly + branch nick: global-scripts + timestamp: Fri 2009-02-27 00:40:19 -0500 + message: + Initial crack at global scripts support. Also includes some setup.py tweaks. + ------------------------------------------------------------ + revno: 298.3.2 + committer: Dan O'Reilly + branch nick: global-scripts + timestamp: Fri 2009-02-27 00:20:37 -0500 + message: + Merge. + ------------------------------------------------------------ + revno: 298.3.1 + committer: Dan O'Reilly + branch nick: global-scripts + timestamp: Fri 2009-02-27 00:13:00 -0500 + message: + Get rid of unneeded "use_tray" variable being passed around in wicd-client. + Add some methods for executing multiple scripts to be use for global scripts later. + Remove some rogue extra whitespace in networking.py +------------------------------------------------------------ +revno: 312 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-02-28 15:34:34 -0500 +message: + Don't use the thread module in networking.py. +------------------------------------------------------------ +revno: 311 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-02-27 00:38:09 -0500 +message: + Merge. + ------------------------------------------------------------ + revno: 203.1.87 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Fri 2009-02-13 10:07:40 -0600 + message: + Merged mainline r297. + ------------------------------------------------------------ + revno: 203.1.86 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Thu 2009-02-12 18:41:12 -0600 + message: + Merged r295 of mainline. + ------------------------------------------------------------ + revno: 308.1.1 + committer: Andrew Psaltis + branch nick: 1.6 + timestamp: Tue 2009-02-24 10:28:03 -0500 + message: + Made the Slackware init script look more like the rest of the Slackware init scripts. +------------------------------------------------------------ +revno: 310 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-02-27 00:35:53 -0500 +message: + Get rid of unneeded "use_tray" variable being passed around in wicd-client. + Remove some extra whitespace in networking.py +------------------------------------------------------------ +revno: 309 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-02-27 00:08:31 -0500 +message: + Fix issue where signal strength wouldn't be reported correctly if the first link quality regex didn't match. + Add some helper methods that will eventually be used for encryption template parsing. + Use more specific exception checking in a few places. +------------------------------------------------------------ +revno: 308 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-02-21 13:11:55 -0500 +message: + Fix typo +------------------------------------------------------------ +revno: 307 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Sat 2009-02-21 01:37:38 -0500 +message: + Merged experimental-nacl r288, and updated wicd-curses revno. + ------------------------------------------------------------ + revno: 202.1.86 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-02-21 01:23:29 -0500 + message: + Added the translations to .bzrignore (hopefully that is all of it). + ------------------------------------------------------------ + revno: 202.1.85 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-02-21 01:17:59 -0500 + message: + Force utf8 encoding in wicd-curses.py. Hopefully this won't break compat on non-utf8 consoles. + ------------------------------------------------------------ + revno: 202.1.84 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-02-21 01:17:22 -0500 + message: + Merged r306 of mainline 1.6 +------------------------------------------------------------ +revno: 306 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-02-21 01:00:40 -0500 +message: + merge + ------------------------------------------------------------ + revno: 304.1.1 + committer: Andrew Psaltis + branch nick: 1.6 + timestamp: Fri 2009-02-20 22:06:59 -0500 + message: + Merged misc.py and .bzrignore changes from experimental-nacl r285. + ------------------------------------------------------------ + revno: 202.1.83 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-02-20 21:54:30 -0500 + message: + .bzrignore: Added some stuff that I missed. + ------------------------------------------------------------ + revno: 202.1.82 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-02-20 21:44:16 -0500 + message: + .bzrignore: Added files generated from the build to .bzrignore + wicd/misc.py: + Decode all unicode fonts before a client handles them. Prevents wicd-curses + from dying due to having to display non-latin characters. + ------------------------------------------------------------ + revno: 202.1.81 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-02-20 00:36:51 -0500 + message: + Merged with r304 of mainline 1.6. +------------------------------------------------------------ +revno: 305 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-02-21 00:57:40 -0500 +message: + Create the wpactrl interface connection in a less bizarre way. +------------------------------------------------------------ +revno: 304 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Thu 2009-02-19 18:14:40 -0500 +message: + Fixed regex problem in wicd/misc.py. +------------------------------------------------------------ +revno: 303 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Thu 2009-02-19 22:59:40 -0600 +message: + Added check for loop before exiting loop +------------------------------------------------------------ +revno: 302 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Thu 2009-02-19 22:22:12 -0600 +message: + Fixed the dhcp_object error. +------------------------------------------------------------ +revno: 301 +committer: Andrew Psaltis +branch nick: 1.6 +timestamp: Wed 2009-02-18 07:42:48 -0500 +message: + Merged with experimental-nacl, r282. + ------------------------------------------------------------ + revno: 202.1.80 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-02-17 20:04:50 -0500 + message: + curses/curses_misc.py: + Fixed some of the arguments in MaskingEdit + curses/netentry_curses.py: + Added an autoconnect switch to the WirelessSettingsDialog + Reformatted some code + Ensured that the buttons are glued to the bottom of the dialog + AUTHORS: + Changed Adam's e-mail to match the ones in the man page. + AUTHORS, in/man=wicd.8.in: + Added/updated my e-mail + in/man=wicd-curses.8.in: + Removed mention of the keymap modification (too difficult/potentially + problematic) + Removed mention of my branch, bugs can be tagged with "wicd-curses" or something + like that +------------------------------------------------------------ +revno: 300 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Wed 2009-02-18 16:15:50 +0800 +message: + Merge + ------------------------------------------------------------ + revno: 298.1.2 + committer: Dan O'Reilly + branch nick: experimental + timestamp: Tue 2009-02-17 23:44:25 -0500 + message: + Merge. + ------------------------------------------------------------ + revno: 298.2.1 + committer: Andrew Psaltis + branch nick: 1.6 + timestamp: Mon 2009-02-16 10:46:54 -0500 + message: + Merged with experimental-nacl, r281. + ------------------------------------------------------------ + revno: 202.1.79 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Mon 2009-02-16 10:43:57 -0500 + message: + curses/wicd-curses.py: Removed the redraw_tag, since I discovered that I don't need it. + ------------------------------------------------------------ + revno: 202.1.78 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Mon 2009-02-16 10:39:19 -0500 + message: + Merged r298 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.1.77 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-02-13 13:27:38 -0500 + message: + Merged mainline r297 of 1.6. + ------------------------------------------------------------ + revno: 298.1.1 + committer: Dan O'Reilly + branch nick: experimental + timestamp: Tue 2009-02-17 23:29:14 -0500 + message: + Refactor wnettools/backend code so that most external tool functionality exists in wnettools, and it just inherited by the external backends. This simplifies creating new backends that just override selected methods. + Rewrite encryption template parsing code to allow blank entries (though the GUI still doesn't), and be more permissive of slightly incorrect formatting. + Fix bug in wicd-monitor error handling code. +------------------------------------------------------------ +revno: 299 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Wed 2009-02-18 16:13:31 +0800 +message: + Updated copyright, setup.py version number, and AUTHORS +------------------------------------------------------------ +revno: 298 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-02-13 18:54:27 -0500 +message: + Fix bug where GUI could get stuck in the connecting state if the GUI was first opened while a connection was in progress. +------------------------------------------------------------ +revno: 297 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Thu 2009-02-12 20:07:12 -0500 +message: + Merge experimental-rworkman + ------------------------------------------------------------ + revno: 203.1.85 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-02-11 22:04:44 -0600 + message: + Removed a relic from 1.4.x :) + ------------------------------------------------------------ + revno: 203.1.84 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-02-11 22:03:24 -0600 + message: + Removed date ; added reference to wicd-curses(8). + Minor formatting fixes. + Documented the backend=, prefer_wired=, and global_dns_dom= parameters + in manager-settings.conf + ------------------------------------------------------------ + revno: 203.1.83 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-02-11 22:01:58 -0600 + message: + Removed date ; added references to wicd-curses(8). + ------------------------------------------------------------ + revno: 203.1.82 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-02-11 22:01:24 -0600 + message: + Removed date ; added references to wicd-curses(8). + ------------------------------------------------------------ + revno: 203.1.81 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-02-11 22:00:10 -0600 + message: + Removed the date, as it's pointless. + Added NaCl to the AUTHORS list (still needs email addy). + Something else minor that I forgot :/ + ------------------------------------------------------------ + revno: 203.1.80 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-02-11 21:38:38 -0600 + message: + Merged mainline. + ------------------------------------------------------------ + revno: 203.1.79 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Mon 2009-02-09 20:40:35 -0600 + message: + Merged mainline. + ------------------------------------------------------------ + revno: 203.1.78 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sat 2009-02-07 16:51:03 -0600 + message: + Merged r285 upstream + ------------------------------------------------------------ + revno: 203.1.77 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-02-04 15:00:40 -0600 + message: + Merged mainline. + ------------------------------------------------------------ + revno: 203.1.76 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Tue 2009-02-03 21:18:35 -0600 + message: + Merged back with mainline. +------------------------------------------------------------ +revno: 296 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Thu 2009-02-12 18:48:10 -0500 +message: + Merged curses changes. + ------------------------------------------------------------ + revno: 202.1.76 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-02-12 00:38:24 -0500 + message: + Merged with r294 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.1.75 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2009-02-11 10:44:57 -0500 + message: + Some minor code cleanup and fixes + curses/wicd-curses.py: Fixed lag upon completing connections + curses/wicd-curses.py,curses/prefs_curses.py,curses/curses_misc.py: + Cleaned up some code, removed/reformatted some comments + ------------------------------------------------------------ + revno: 202.1.74 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-02-10 20:55:11 -0500 + message: + Merged with r291 of mainline 1.6. + ------------------------------------------------------------ + revno: 202.1.73 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-02-08 12:26:50 -0500 + message: + curses/wicd-curses.py: + Added a mention of the About dialog in the help + curses/prefs_curses.py: + Fixed mouse support + in/man=wicd-curses.8.in + Added a mention of the about dialog + ------------------------------------------------------------ + revno: 202.1.72 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-02-07 23:24:08 -0500 + message: + Merged r285 of mainline 1.6 + The last commit should have read: + curses/netentry_curses.py: + Fixed a bug where we are unable to save any individual network information. + curses/wicd-curses.py + Added information to the uppermost footer text telling how the user can + display the help dialog. + The last commit fixed the removal of a blank string in prefs_curses from the + backends list, that no longer has a blank string in it any more. + ------------------------------------------------------------ + revno: 202.1.71 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-02-05 16:33:45 -0500 + message: + curses/wicd-curses.py: ListBox focus-maintaining code completely debugged +------------------------------------------------------------ +revno: 295 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Thu 2009-02-12 18:38:40 -0500 +message: + Fix issue where GetForcedDisconnect was returning True when we had just connected. + Fix issues with auto-switch to wired. + Change to how the gui handles changing state from connecting to not-connecting to be nicer. + Make the gui trigger monitor state updates while in the connecting state. + Make sure the monitor logs a warning when it catches a D-Bus exception. + Make sure cancelling a wired connection attempt kills DHCP. + Fix issue where DHCP wouldn't get run if automatic dhcp tool was enabled. +------------------------------------------------------------ +revno: 294 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Wed 2009-02-11 22:44:38 -0500 +message: + Make default init script executable. +------------------------------------------------------------ +revno: 293 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Wed 2009-02-11 21:01:12 -0500 +message: + Fix possible crash when handling D-Bus exceptions in monitor.py +------------------------------------------------------------ +revno: 292 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Wed 2009-02-11 20:55:02 -0500 +message: + Make sure it's possible to stop a dhcp client that's in the process of getting a lease. + Have gui.py trigger connection status updates every .5 seconds if in a connecting state. + Fix typo in wicd-client.py +------------------------------------------------------------ +revno: 291 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2009-02-10 01:08:12 -0500 +message: + Don't convert to milliseconds in misc.timeout_add if milli is True. +------------------------------------------------------------ +revno: 290 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2009-02-10 00:58:11 -0500 +message: + Change "Advanced Settings" to "Properties" + Remove some unneeded debugging output. + Replace gobject.timeout_add_seconds / gobject.timeout_add if/else logic with calls to a misc.timeout_add method that does it internally. + Only display the dbus lost error message if dbus has been gone for 5 seconds without coming back. +------------------------------------------------------------ +revno: 289 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-02-08 19:59:53 -0500 +message: + Tweak algorithm for searching for sudo progs so we search every directory in $PATH for a particular app before moving on to the next one. +------------------------------------------------------------ +revno: 288 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-02-08 18:42:05 -0500 +message: + Fix crashing bug in daemon. + Dont have wicd-monitor inherit stdin from the daemon. +------------------------------------------------------------ +revno: 287 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-02-08 16:14:17 -0500 +message: + Applied LC_MESSAGES patch from David Paleino +------------------------------------------------------------ +revno: 286 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-02-08 16:09:55 -0500 +message: + Enforce only one scan being allowed to happen at a time in the daemon. +------------------------------------------------------------ +revno: 285 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-02-07 01:50:49 -0500 +message: + Always updated the network list if we get a scan finished signal. +------------------------------------------------------------ +revno: 284 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-02-07 01:22:42 -0500 +message: + Fix some issues with the GUI statusbar being incorrect. + Make wicd-client more tolerant of dbus exceptions. + Disconnect from both managed interfaces before making a connection. +------------------------------------------------------------ +revno: 283 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-02-06 19:26:09 -0500 +message: + Fix bug where interface name was being passed to the dhcp client executable twice. + Tweak connect/disconnect to not kill any processes. Instead it releases leases and terminates the wpa_supplicant instance through its ctrl interface. This should make wicd handle multiple connections better. +------------------------------------------------------------ +revno: 282 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Wed 2009-02-04 23:05:05 -0500 +message: + If the monitor loses contact with the daemon for an extended period, die instead of ignoring the errors. +------------------------------------------------------------ +revno: 281 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Wed 2009-02-04 19:13:06 -0500 +message: + More tweaking of how the GUI updates the status bar. Should be more efficient now. +------------------------------------------------------------ +revno: 280 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Wed 2009-02-04 18:32:58 -0500 +message: + Merge experimental-nacl. + ------------------------------------------------------------ + revno: 202.1.70 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2009-02-04 17:28:43 -0500 + message: + curses/prefs_curses.py: + Removed the external entry point + Removed the removing of a blank string that caused + wicd/misc.py: + Made sure that "advanced_settings" in get_language_list_gui() actually is + "Advanced Settings" + ------------------------------------------------------------ + revno: 202.1.69 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2009-02-04 17:13:04 -0500 + message: + Merged with mainline 1.6, r279 +------------------------------------------------------------ +revno: 279 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Wed 2009-02-04 00:26:13 -0500 +message: + Rather than polling for network status in the GUI, just have the monitor run an on-demand pull and get the results from the daemon. Should reduce iwconfig/ifconfig calls while the GUI is open and make for nicer looking code. +------------------------------------------------------------ +revno: 278 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2009-02-03 23:48:58 -0500 +message: + Fix bug where link detection tool value wasn't get propogated down the stack. +------------------------------------------------------------ +revno: 277 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2009-02-03 21:21:40 -0500 +message: + Merge experimental-rworkman + ------------------------------------------------------------ + revno: 203.1.75 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Tue 2009-02-03 10:14:34 -0600 + message: + Bugfix to prevent creation of $HOME/~/ directory + ------------------------------------------------------------ + revno: 203.1.74 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Tue 2009-02-03 00:26:28 -0600 + message: + More INSTALL tweaks. + ------------------------------------------------------------ + revno: 203.1.73 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Tue 2009-02-03 00:12:39 -0600 + message: + Tweaked INSTALL to note dbus and friends deps. + ------------------------------------------------------------ + revno: 203.1.72 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Tue 2009-02-03 00:08:42 -0600 + message: + Merged mainline, which includes NaCl's curses stuff and all fixes and + such from this branch. + ------------------------------------------------------------ + revno: 203.1.71 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sun 2009-02-01 21:05:04 -0600 + message: + Merged r265..r266 from mainline. +------------------------------------------------------------ +revno: 276 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2009-02-03 19:59:53 -0500 +message: + Add a .bzrignore file. +------------------------------------------------------------ +revno: 275 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2009-02-03 19:38:07 -0500 +message: + Remove unneeded parameter from PreferencesDialog constructor. +------------------------------------------------------------ +revno: 274 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2009-02-03 19:35:57 -0500 +message: + Make sure we try each external app in order if selection is set to be automatic. +------------------------------------------------------------ +revno: 273 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2009-02-03 00:05:11 -0500 +message: + Make sure debug settings are propogated down the stack as soon a the daemon loads. +------------------------------------------------------------ +revno: 272 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2009-02-02 23:47:54 -0500 +message: + Make GetWirelessInterfaces() return a list instead of the first interface. Also make the networking.py layer pull the first entry from the list. + Some documentation cleanup. +------------------------------------------------------------ +revno: 271 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2009-02-02 23:39:52 -0500 +message: + Minor formatting tweak +------------------------------------------------------------ +revno: 270 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2009-02-02 23:05:29 -0500 +message: + Simplify the inheritance of static wnettools functions in the backends. + Make sure we select a default route flushing tool. +------------------------------------------------------------ +revno: 269 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-02-01 23:32:55 -0500 +message: + Merge NaCl's curses frontend and rworkman's experimental branch. + ------------------------------------------------------------ + revno: 265.1.2 + committer: Adam Blackburn + branch nick: 1.6-clean + timestamp: Sat 2009-01-31 15:58:28 +0800 + message: + Merged rworkman's experimental branch + ------------------------------------------------------------ + revno: 203.1.70 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sat 2009-01-31 01:16:34 -0600 + message: + Merged latest from NaCl. + ------------------------------------------------------------ + revno: 203.1.69 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sat 2009-01-31 01:00:03 -0600 + message: + Merged mainline r265 + ------------------------------------------------------------ + revno: 203.1.68 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sat 2009-01-31 00:38:59 -0600 + message: + Added some more salinity here... + ------------------------------------------------------------ + revno: 203.1.67 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Fri 2009-01-30 22:48:56 -0600 + message: + Merged some salty stuff... + ------------------------------------------------------------ + revno: 203.1.66 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Fri 2009-01-30 21:48:59 -0600 + message: + Fix a harmless typo. + ------------------------------------------------------------ + revno: 203.1.65 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Fri 2009-01-30 20:22:38 -0600 + message: + Merged mainline for a bugfix. + ------------------------------------------------------------ + revno: 203.1.64 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Fri 2009-01-30 07:58:37 -0600 + message: + Merged latest salty branch. + ------------------------------------------------------------ + revno: 203.1.63 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Thu 2009-01-29 22:37:58 -0600 + message: + Merged NaCl's branch. + ------------------------------------------------------------ + revno: 203.1.62 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Thu 2009-01-29 11:33:40 -0600 + message: + This merges from the selinux branch (I accidentally edited the wrong + branch) with a note in INSTALL about pm-utils optional dep. + ------------------------------------------------------------ + revno: 203.1.61 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Thu 2009-01-29 11:12:32 -0600 + message: + Removed references to "Tray" from other/wicd.desktop + ------------------------------------------------------------ + revno: 203.1.60 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Thu 2009-01-29 11:06:27 -0600 + message: + Removed an unneeded wicd.png from other/ and fixed up the wicd.desktop + file in there (for users who want to just start the client without + the tray icon, and have a menu entry to do so). + ------------------------------------------------------------ + revno: 203.1.59 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Thu 2009-01-29 10:55:57 -0600 + message: + Merge mainline with some removals and bugfixes. + ------------------------------------------------------------ + revno: 203.1.58 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-01-28 21:40:40 -0600 + message: + Quote some values in the wicd-client.in script, in case some insane + person passes a VERSION string with spaces in it. I can't imagine + who would have done such a thing ;-) + ------------------------------------------------------------ + revno: 203.1.57 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-01-28 20:54:31 -0600 + message: + Updated Gentoo's init script from portage. + Thanks to Jeremy Olexa (darkside_). + ------------------------------------------------------------ + revno: 203.1.56 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-01-28 19:28:05 -0600 + message: + Merged changes from svenstaro to the Arch init script, and then + did some cleanup edits in this tree. + ------------------------------------------------------------ + revno: 203.1.55 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-01-28 15:49:30 -0600 + message: + Merged latest from NaCl's branch. + ------------------------------------------------------------ + revno: 203.1.54 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Tue 2009-01-27 15:59:41 -0600 + message: + Merged mainline fixes. + ------------------------------------------------------------ + revno: 203.1.53 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Mon 2009-01-26 18:49:43 -0600 + message: + Merge mainline with some bugfixes. + ------------------------------------------------------------ + revno: 203.1.52 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Mon 2009-01-26 10:37:06 -0600 + message: + Updated INSTALL with some dependency information. + ------------------------------------------------------------ + revno: 203.1.51 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Mon 2009-01-26 09:02:43 -0600 + message: + Merged latest changes in NaCl's branch. + ------------------------------------------------------------ + revno: 203.1.50 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sun 2009-01-25 21:55:12 -0600 + message: + Merged latest mainline with several bugfixes. + ------------------------------------------------------------ + revno: 203.1.49 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sun 2009-01-25 18:00:08 -0600 + message: + Merged NaCl's branch, which resulted in no changes. :) + ------------------------------------------------------------ + revno: 203.1.48 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sun 2009-01-25 15:25:58 -0600 + message: + Merged mainline experimental changes. + ------------------------------------------------------------ + revno: 203.1.47 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sat 2009-01-24 22:11:33 -0600 + message: + Merged bugfix from mainline experimental. + ------------------------------------------------------------ + revno: 203.1.46 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sat 2009-01-24 20:36:55 -0600 + message: + s/subversion/bzr/ in INSTALL file. Possibly more changes coming... + ------------------------------------------------------------ + revno: 203.1.45 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sat 2009-01-24 11:27:41 -0600 + message: + Merged latest changes from NaCl's branch. + ------------------------------------------------------------ + revno: 265.1.1 + committer: Adam Blackburn + branch nick: 1.6-clean + timestamp: Sat 2009-01-31 15:58:07 +0800 + message: + Merged NaCl's curses branch + ------------------------------------------------------------ + revno: 202.1.68 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-01-31 02:13:18 -0500 + message: + Merged with r265 of mainline 1.6, providing PyLintish fixes + ------------------------------------------------------------ + revno: 202.1.67 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-01-31 02:07:50 -0500 + message: + curses/wicd-curses.py: + Made the tagged wireless network actually show the network we're connected to, + or not, as the case may be. + Added ' -- ' to the upper statusbar + + Also, in the last commit, configscript_curses should be netentry_curses + ------------------------------------------------------------ + revno: 202.1.66 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-01-31 01:33:11 -0500 + message: + curses/configscript_curses.py: + Added translations + Removed the redundant run() function in WirelessSettingsDialog + curses/wicd-curses.py: + Added translations, some still missing. + wicd/misc.py: + Added some translations that are not in the database, but are in the translator + ------------------------------------------------------------ + revno: 202.1.65 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-01-30 23:48:44 -0500 + message: + Merged with r264 of the mainline, providing a bugfix. + ------------------------------------------------------------ + revno: 202.1.64 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-01-30 23:46:07 -0500 + message: + curses/configscript_curses.py: + Fixed the typo that rworkman noticed. + curses/wicd-curses.py: + Ensured that the upper status bar updates itself immediately after a + connection is made, as opposed to a second or two after the fact + curses/README: Added a FAQ and added the new keybindings + in/man=wicd-curses.8.in: Added the new keybindings + ------------------------------------------------------------ + revno: 202.1.63 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-01-30 00:30:33 -0500 + message: + curses/wicd-curses.py: + Added some stuff to the help dialog. + '?' and 'h' now raise the help dialog + 'q' now quits the client. + Keymaps are now colored white in the help dialog. + ------------------------------------------------------------ + revno: 202.1.62 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-01-29 23:29:58 -0500 + message: + Merged with r263 of the mainline 1.6 branch, which (somehow) contains more changes than what I originally had in "r265". + ------------------------------------------------------------ + revno: 202.1.61 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-01-29 23:25:02 -0500 + message: + curses/wicd-curses.py: + Applied some typographical changes from rworkman + Fixed the script showing dialog for wireless networks. + ------------------------------------------------------------ + revno: 202.1.60 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-01-29 15:55:32 -0500 + message: + Merged in (only) r261 of rworkman's branch, which quotes the strings in the wicd-client script. + + Also, the revision numbers of the mainline have changed on me. r263 contained all of the translations that I requested. + ------------------------------------------------------------ + revno: 202.1.59 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-01-27 21:50:24 -0500 + message: + Merged with r265 of mainline 1.6, giving me most of the remaining translations that I need. + ------------------------------------------------------------ + revno: 202.1.58 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-01-27 21:46:52 -0500 + message: + wicd/misc.py: + Fixed a typo in get_language_list_gui + (%CURSES_REVNO%) + curses/wicd-curses.py: + Added in some translations (not done yet) + curses/prefs_curses.py: + Added all of the translations + Removed the warning about changing the backends (since it is useless) + ------------------------------------------------------------ + revno: 202.1.57 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Mon 2009-01-26 23:43:40 -0500 + message: + Merged with r262 of mainline 1.6, which adds some bugfixes and the translations I need for my next commit. + ------------------------------------------------------------ + revno: 202.1.56 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-01-25 23:07:47 -0500 + message: + Merged with r260 of the mainline 1.6 branch. + ------------------------------------------------------------ + revno: 202.1.55 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-01-25 23:05:46 -0500 + message: + curses/prefs_curses.py: Added support for the "Prefer Wired Networks" function. + ------------------------------------------------------------ + revno: 202.1.54 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-01-25 17:37:23 -0500 + message: + Merged with r254 of mainline 1.6 branch. + ------------------------------------------------------------ + revno: 202.1.53 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-01-23 22:18:18 -0500 + message: + Merged with r247 of rworkman's branch, which: + Adds ~crux support to setup.py + Slightly reformats the wicd-client.1 man page, and fixes a spelling error + Fixes some stuff in the wicd-client script. I just accepted the other "nitpicks", too. + + I do not know why the wicd.glade file was changed. + There were conflicts in merging of the wicd-client script and man page. + ------------------------------------------------------------ + revno: 203.1.44 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Fri 2009-01-23 16:06:53 -0600 + message: + Fix a misspelling in wicd-client.1, and add linewraps at <80 chars + in the raw text. + ------------------------------------------------------------ + revno: 203.1.43 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Fri 2009-01-23 16:04:07 -0600 + message: + Some nitpick edits to wicd-client's section that checks for X and offers + to launch the curses client. This is largely personal preference, so + no offense will be taken by merge refusal, but I'm not convinced that + "friendliness" belongs in the file comments :-) + ------------------------------------------------------------ + revno: 203.1.42 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Fri 2009-01-23 15:45:25 -0600 + message: + Merged r250 of mainline. + ------------------------------------------------------------ + revno: 203.1.41 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Thu 2009-01-22 23:58:32 -0600 + message: + Merged Dan's latest commit to mainline. + ------------------------------------------------------------ + revno: 203.1.40 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-01-21 22:35:46 -0600 + message: + Added crux support to setup.py + ------------------------------------------------------------ + revno: 203.1.39 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-01-21 22:12:51 -0600 + message: + Merged latest changes from NaCl's branch. + ------------------------------------------------------------ + revno: 203.1.38 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Thu 2009-01-15 00:14:24 -0600 + message: + Merged latest from NaCl's branch. + ------------------------------------------------------------ + revno: 203.1.37 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Mon 2009-01-12 13:49:47 -0600 + message: + Merged networking.py patch from experimental to address bug 315238. + ------------------------------------------------------------ + revno: 203.1.36 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Mon 2009-01-12 00:21:09 -0600 + message: + Merged NaCl's latest revision (used bzr merge --weave as it handled the + conflicts much better) (and no, I'm not even sure *why* there were + conflicts). + ------------------------------------------------------------ + revno: 203.1.35 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Mon 2009-01-12 00:17:20 -0600 + message: + Merged Adam's latest 1.6-noexpander branch. There was a conflict in + data/wicd.glade around line 450-something -- the y_options flag was + removed in the noexpander branch. I wasn't sure whether that was + intentional or not, so I left it in to resolve the conflict. If that + was the wrong decision, it can be fixed later :) + ------------------------------------------------------------ + revno: 203.1.34 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Mon 2009-01-12 00:16:34 -0600 + message: + Merged upstream experimental branch. + ------------------------------------------------------------ + revno: 203.1.33 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2009-01-07 22:26:31 -0600 + message: + Merged r238 of NaCl's branch. + ------------------------------------------------------------ + revno: 202.1.52 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-01-23 22:13:27 -0500 + message: + setup.py: + Added support for keeping track of the revisions of the curses client + (%CURSES_REVNO%) + curses/wicd-curses.py: + Added the ad-hoc controls to the Help dialog + Set wireless scans to be synchronous (True), to adapt to an API change in mainline + Added support for OptionParser, added and implemented the option that was + described in the man page (and -h (help) and --version) + in/wicd=wpath.py.in: Added a curses_revision flag + in/man=wicd-curses.8.in: + Option parsing has been implemented. Added the %CURSES_REVNO% flag to the man page. + Fixed an accidental " added to one of the headers + ------------------------------------------------------------ + revno: 202.1.51 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-01-23 21:13:36 -0500 + message: + Ad-hoc network support is added ("O"). + This commit is should be the last one containing new interface elements. :-D + This also may not work directly from the install. I need to change some stuff + first. + curses/curses_misc.py: + Fixed bug in Dialog2 where mouse clicks would cause the program to crash + Added DynEdit and DynIntEdit, Simple DynWrapped widgets, nothing special + about them + curses/wicd-curses.py: + Added support for Ad-Hoc network controls (I don't know exactly how this + works) + curses/README,TODO,in/man=wicd-curses.8.in: + Ad-Hoc network support has been added + ------------------------------------------------------------ + revno: 202.1.50 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-01-23 09:30:39 -0500 + message: + Merged with r250 of the mainline experimental branch. + ------------------------------------------------------------ + revno: 202.1.49 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2009-01-21 00:09:45 -0500 + message: + Merged with r247 of mainline experimental (1.6) branch. + + -------------- This line and the following will be ignored --------- + added: + wicd/guiutil.py + modified: + encryption/templates/ttls + setup.py + wicd/configmanager.py + wicd/dbusmanager.py + wicd/gui.py + wicd/misc.py + wicd/monitor.py + wicd/netentry.py + wicd/networking.py + wicd/prefs.py + wicd/wicd-client.py + wicd/wicd-daemon.py + wicd/wnettools.py + unknown: + build/ + install.log + uninstall.log + vcsinfo.py + wpath.py + curses/bzr_commit + curses/configscript.py + curses/current.diff + init/arch/wicd + init/debian/wicd + init/default/wicd + init/gentoo/wicd + init/pld/wicd + init/redhat/wicd + init/slackware/rc.wicd + init/suse/wicd + man/wicd-curses.8 + man/wicd-manager-settings.conf.5 + man/wicd-wired-settings.conf.5 + man/wicd-wireless-settings.conf.5 + man/wicd.8 + other/50-wicd-suspend.sh + other/55wicd + other/80-wicd-connect.sh + other/WHEREAREMYFILES + other/postinst + other/wicd.conf + scripts/wicd + scripts/wicd-client + scripts/wicd-curses + wicd/wpath.py + pending merges: + Dan O'Reilly 2009-01-20 Add missing guiutil module + Dan O'Reilly 2009-01-20 Add support for writing config data with whitespace kep... + Dan O'Reilly 2009-01-19 Fix a few typos in the option gateway code. + Dan O'Reilly 2009-01-19 Fix bug that was keeping DHCP release from working. + Dan O'Reilly 2009-01-19 Fix ttls template + ------------------------------------------------------------ + revno: 202.1.48 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-01-20 23:41:44 -0500 + message: + curses/curses_misc.py: + Added support for setting the text in the input dialog + Changed "body" to "parent" in ComboBox. + set_focus() unconditionally sets the focus now + Moved error() to this file. It fits better here, anyway. + Reverted TextDialog to its previous state + curses/netentry_curses.py: + Moved error() to curses_misc.py + curses/wicd-curses.py: + "Deimplemented" the script configurator, at the suggestion of various folks + #wicd, and replaced it with a simple instructions dialog. My original code + is still there, just commented out. + Added support for renaming wired network profiles (F2 when over the combo box) + Fixed various issues caused when deleting wired network profiles. + Refactored the help/about dialogs to support the old TextDialog + curses/README, in/man=wicd-curses.8.in: + Script configurator has been "changed" + ------------------------------------------------------------ + revno: 202.1.47 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-01-17 20:10:10 -0500 + message: + curses/configscript_curses.py: ADDED. Script configurator. More or less done. + curses/wicd-curses.py: + Added suport for the script configurator + curses/README, in/man=wicd-curses.8.in: + Script configurator now active + setup.py: Install configscript_curses.py with the rest of the stuff + ------------------------------------------------------------ + revno: 202.1.46 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-01-17 15:15:14 -0500 + message: + Merged with r242 of mainline experimental (1.6) branch. + ------------------------------------------------------------ + revno: 202.1.45 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-01-17 15:13:53 -0500 + message: + Wired network control support is now more-or-less complete + curses/curses_misc.py: + Made set_focus() actually set the focus + Added ability for combobox to rebuild itself + curses/netentry_curses: + Added WiredSettingsDialog. Sometimes, the "Defaultness" of the network + takes a little while to show up in the dialog. Don't know why yet. + Reorganized some of the AdvancedSettingsDialog code + curses/wicd-curses.py: + Reactivated WiredComboBox + Added support for WiredSettingsDialog + Added ability to create and delete wired network profiles + Fixed bug where the program could crash on the end of scanning networks if + timing is slightly off + Display the screen locker immediately after initiating a scan + curses/README,TODO: Wired network support is complete + in/man=wicd-curses.8.in: + Wired network support is now complete + Added revision information to the bottom of the man page + ------------------------------------------------------------ + revno: 202.1.44 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-01-16 12:09:20 -0500 + message: + Merged with mainline 1.6 branch, r241, adding in the noexpander stuff + ------------------------------------------------------------ + revno: 202.1.43 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-01-15 21:46:35 -0500 + message: + curses/wicd-curses.py: ListBox focus-maintaining code completely debugged + ------------------------------------------------------------ + revno: 202.1.42 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-01-13 18:13:24 -0500 + message: + curses/curses_misc.py: + Modified TextDialog to use a listbox as opposed to one long text box + Aligned the header on the right in Dialog2 by default + curses/wicd-curses.py: + Removed the traceback if the user presses ctrl+c + Refactored about_dialog to support the modified TextDialog + Added a help dialog. Raise it with "H" + Refactored some code in the appGUI constructor so that I can recycle update_netlist() + curses/TODO, curses/README, in/man=wicd-curses.8.in: + Help dialog now active + in/man=wicd-curses.8.in: Removed redundant scipt selector command + ------------------------------------------------------------ + revno: 202.1.41 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-01-13 15:53:10 -0500 + message: + Merged with r239 of mainline experimental. + ------------------------------------------------------------ + revno: 202.1.40 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-01-11 19:40:29 -0500 + message: + Progress is being made, apparently + curses/curses_misc.py: + Made Dialog a bit more generic with the new Dialog2, also supports mouse events. + Included TextDialog and InputDialog as subclasses of Dialog2 + curses/netentry_curses.py: + Changed error() to support Dialog2 + Added support for mouse events + curses/prefs_curses.py: + Added support for mouse events + curses/wicd-curses.py: + Added support for wicd's hidden wireless-network functionality + (Really) finished refactoring for the changes in ComboBox + Made some transitions a bit more immediate by calling update_ui() manually + Refactored to about_dialog to support Dialog2 + Added support for mouse events (clicking to select, mostly) + Added support for retaining current list netlist focus throughout screen updates + (Hopefully) Added support for handling an instance of 0 available wireless + networks + in/man=wicd-curses.8.in: Hidden network support is fully functional + man/wicd-client.1: Added a word. (You'll live.) + setup.py: From last commit: Added the python "shebang" to the top of the file + ------------------------------------------------------------ + revno: 202.1.39 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-01-11 13:05:01 -0500 + message: + curses/prefs_curses.py: + Finished refactoring to accommodate the ComboBox changes + curses/wicd-curses.py: + Moved some of the keybinding code around + in/other=WHEREAREMYFILES.in: ADDED. + File telling the user where the wicd config files are. Usually symlinked to + ~/.wicd/WHEREAREMYFILES and installed to the documentation directory + in/scripts=wicd-client.in: + Make ~/.wicd and link WHEREAREMYFILES if it has not been done so already. + Start wicd-curses if there is no X server on this console + (determined by the presence of $DISPLAY), and add a file detailing this + man/wicd-client.1: Added note about wicd-client starting wicd-curses + setup.py: Install WHEREAREMYFILES along with the rest of the documentation + ------------------------------------------------------------ + revno: 202.1.38 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-01-09 20:43:18 -0500 + message: + Forgot to mention something in the last commit: + in/wicd-curses.8.in: added more unimplemented keystrokes + Merged with r238 of the main experimental (1.6) branch. + ------------------------------------------------------------ + revno: 202.1.37 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-01-09 20:42:12 -0500 + message: + curses/curses_misc.py: + Refactored some ComboBox internals + Renamed show_first to focus in ComboBox + Added callback support + curses/netentry_curses.py: + Renamed NetEntryBase to AdvancedSettingsDialog, and WirelessNetEntry to + WirelessSettingsDialog + The "WirelessSettingsDialog" is complete. :-) Raise it by pressing "C" on a wireless + network. Much of the code was taken from netentry.py. The buttons aren't pretty + like they are in the Preferences Dialog, but they are fully functional. + curses/prefs_curses.py: + Refactored to accommodate the ComboBox changes + Added a warning about changing backends + curses/wicd-curses.py: + Refactored to accommodate changes to the rest of the program + Added a constantly displayed message saying how to exit the program, other than + ctrl+c + curses/TODO: Removed a bunch of stuff that is already implemented, added some stuff that + needs to be implemented + curses/README: Added/clearified some things + ------------------------------------------------------------ + revno: 202.1.36 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-01-06 19:04:12 -0500 + message: + Merged with r235 of experimental-rworkman. + ------------------------------------------------------------ + revno: 203.1.32 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Mon 2009-01-05 23:12:49 -0600 + message: + Added logic for kde4-config (kde4's equivalent to kde-config) + ------------------------------------------------------------ + revno: 203.1.31 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Mon 2009-01-05 10:25:59 -0600 + message: + Merged latest changes from NaCl. + ------------------------------------------------------------ + revno: 203.1.30 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sun 2009-01-04 02:31:01 -0600 + message: + s/Tenative/Tentative/g in wicd-curses(8) + ------------------------------------------------------------ + revno: 203.1.29 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sun 2009-01-04 02:27:44 -0600 + message: + Merged latest nacl branch. + ------------------------------------------------------------ + revno: 203.1.28 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sat 2009-01-03 00:08:53 -0600 + message: + Removed a blank line from the end of the slackware init script. + Trivial, but annoying on upgrades for the config() .new stuff. + ------------------------------------------------------------ + revno: 203.1.27 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Fri 2009-01-02 21:43:55 -0600 + message: + Merged in the frankencurses branch, which is basically NaCl's branch + plus integration with setup.py and related files. + ------------------------------------------------------------ + revno: 203.1.26 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Fri 2009-01-02 20:54:12 -0600 + message: + Merged mainline r237 (which includes the changes from here). + ------------------------------------------------------------ + revno: 202.1.35 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2009-01-06 19:02:27 -0500 + message: + Checkpoint in WirelessNetEntry development + curses/curses_misc.py: + Refactored some DynWrap internals + Added MaskingEdit, a password edit + Modified ComboBox to use a DynWrap internally instead of an AttrWrap + curses/netentry_curses.py: + Added most of the WirelessNetEntry. It doesn't save information yet, but it does + load most of it. Support for viewing the templated network settings is not + implemented yet. + curses/wicd-curses.py: + Activated support for the WirelessNetEntry configurator. The wired one is not + implemented yet. + ------------------------------------------------------------ + revno: 202.1.34 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-01-04 20:36:12 -0500 + message: + in/man=wicd-curses.8.in: Apparently I can't spell "tentative" properly. Thanks to rworkman. + ------------------------------------------------------------ + revno: 202.1.33 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2009-01-04 20:33:31 -0500 + message: + curses/curses_misc.py: + Added DynWrapper, a wrapper class with which we can dynamically change the + selectability of a widget. + Removed ToggleEdit, replaced by DynWrapper. + curses/netentry_curses.py: ADDED. Network entry configurator dialog. + Has a base class for the common elements of the wired/wireless NetEntries. + curses/prefs_curses.py: Replaced ToggleEdits with DynWrapped Edits. + curses/wicd-curses.py: + Rebuilt the connect function into the main keyhandler. I discovered that + implementing that the way I had previously done it would have made + displaying the dialogs a bit more difficult + Added support for running the NetEntry selector + in/man=wicd-curses.8.in, curses/README: + Modified to say that the NetEntry dialog is now a WIP (Raise it with 'C') + setup.py: + Install netentry_curses.py if we are installing the rest of the curses client + Install the man page only if we want to install the rest of the man pages and + the curses client + ------------------------------------------------------------ + revno: 202.1.32 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2009-01-03 22:57:41 -0500 + message: + curses/curses_misc.py: + meta+left/right now sets focus back to whereever you were in the list. + curses/wicd-curses.py: + Made a custom combobox for the wired networks. The one during the last commit was actually the wireless list. + (Hopefully) made the wired network show up when it is actually active. + Removed appGUI.call_connect and appGUI.connect. They are no longer needed. + in/man=wicd-curses.8.in: ADDED. wicd-curses(8) man page + setup.py: Install the above man page if we are installing the rest of the curses client + ------------------------------------------------------------ + revno: 202.1.31 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-01-02 22:47:06 -0500 + message: + Merged from rworkman's frankencurses branch. + Includes features from experimental-rworkman + Curses client installs now. :-) + Includes r237 of experimental (1.6) + ------------------------------------------------------------ + revno: 234.1.6 + committer: Robby Workman + branch nick: frankencurses + timestamp: Fri 2009-01-02 21:22:17 -0600 + message: + Merged in latest from NaCl's branch. + ------------------------------------------------------------ + revno: 234.1.5 + committer: Robby Workman + branch nick: frankencurses + timestamp: Fri 2009-01-02 20:57:47 -0600 + message: + Merged r237 of mainline. + ------------------------------------------------------------ + revno: 234.1.4 + committer: Robby Workman + branch nick: frankencurses + timestamp: Fri 2009-01-02 20:25:16 -0600 + message: + Removed "in keys" from line 415 per NaCl's suggestion. + ------------------------------------------------------------ + revno: 234.1.3 + committer: Robby Workman + branch nick: experimental-curses + timestamp: Thu 2009-01-01 02:02:26 -0600 + message: + Fixed up setup.py and wpath.py to install the curses client. + Added a wicd-curses wrapper script to /usr/bin + Made curses *.py files executable + All of this passes the build test, but not the "WFM" test. :) + ------------------------------------------------------------ + revno: 234.1.2 + committer: Robby Workman + branch nick: experimental-curses + timestamp: Thu 2009-01-01 01:43:00 -0600 + message: + Merged my experimental branch into this. + ------------------------------------------------------------ + revno: 234.1.1 + committer: Robby Workman + branch nick: experimental-curses + timestamp: Thu 2009-01-01 01:42:20 -0600 + message: + Merged NaCl's curses branch into this. + ------------------------------------------------------------ + revno: 202.1.30 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2009-01-02 22:12:58 -0500 + message: + curses/curses_misc.py: + meta+right or meta+left now move the selected tab right and left respectively. Focus goes back to the tabs, though. + Fixed a bug in ComboBox where show_first does nothing + Restored get_selected to its original state + curses/prefs_curses.py: + Moved the automatic reconnect category to "General Settings" + Made the backend selector actually select the selected backend at first + Reset the button statuses each time we load the settings + meta+enter now saves+closes the preferences dialog + curses/wicd-curses.py: + Turned the wired list into a list of custom SelTexts, so that they can do the connecting/script-choosing/configuring/etc, instead of the dialog itself + Offset the version in the about dialog a little less + Recycle the old preferences dialog instead of making a new one if we run it more than once + ------------------------------------------------------------ + revno: 202.1.29 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-01-01 00:36:08 -0500 + message: + curses/*.py: updated copyrights to include 2009 + curses/wicd-curses.py: Fixed missing comma in the About Dialog text + ------------------------------------------------------------ + revno: 202.1.28 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2009-01-01 00:30:53 -0500 + message: + curses/curses_misc.py: + Added a Dialog class, mostly borrowed from a urwid example + curses/prefs_curses.py: + Added the DNS domain to the dialog, as was done in the GTK UI + curses/wicd-curses.py: + Added a semi-pretty about dialog. + curses/README: Activating about dialog is done by "A" + ------------------------------------------------------------ + revno: 202.1.27 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2008-12-31 18:43:15 -0500 + message: + Merged with experimental (1.6) branch, r234. + ------------------------------------------------------------ + revno: 202.1.26 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2008-12-30 23:12:42 -0500 + message: + curses/README: Actually changed the text in the file. + Merged with experimental (1.6) branch, r233. Mmmm... wpathenhancements + ------------------------------------------------------------ + revno: 202.1.25 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2008-12-30 23:10:18 -0500 + message: + curses/curses_misc.py: + Added a get_edit_text function to ToggleEdit. + Changed the get_selected function in ComboBox to return the index only. + curses/prefs_curses.py: + Completed the load+save functions of the UI + Buttons are now functional. Only selecting the OK button will save the data for now. + curses/wicd-curses.py: + Added support for the "Always Show Wired Interface" config option + Completed support for the preferences dialog + curses/TODO,README: Preferences dialog is done. :-) + ------------------------------------------------------------ + revno: 202.1.24 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2008-12-30 21:27:41 -0500 + message: + Yet another checkpoint in building the Preferences Dialog up to completion. Some of the code isn't used yet, but this should all be done relatively soon. + curses/curses_misc.py: + Added a function in the ToggleEdit to set its text to something + Changed the name of ComboText to ComboBox + Provided the ability to generate the initial parts of a ComboBox w/o needing the screen. + Added ComboBoxException, a simple derived exception for the ComboBox. Used it to die of the user never called build_combobox() + curses/prefs_curses.py: + Changed the names of some of the widgets. + Adjusted the code to use the modified ComboBox widget + curses/wicd-curses.py: + Adjusted the code to use the modified ComboBox widget + ------------------------------------------------------------ + revno: 202.1.23 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Mon 2008-12-29 22:05:48 -0500 + message: + Merged with experimental (1.6) branch (r232). + ------------------------------------------------------------ + revno: 202.1.22 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Mon 2008-12-29 22:04:40 -0500 + message: + Checkpoint in getting the Preferences dialog functional. There's still some tweaking left to do. + curses/curses_misc.py: Changed the internal layout of the widgets to allow me to stick buttons on the bottom. + curses/prefs_curses.py: Added rudimentary Dbus support to the dialog. + Started getting the config settings to save to wicd. + Added buttons (which don't do anything yet). + The PrefOverlay has been renamed to PrefsDialog. The PrefsDialog widget is wrapped around a TabColumns widget. + Added a main entry point into the file to allow for somewhat easier testing. It can now be called indepentently of wicd-curses, if needed. + curses/wicd-curses.py: Undid a change that caused the ESC key to disconnect from the current network, in addition to its current function. + ------------------------------------------------------------ + revno: 202.1.21 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2008-12-28 12:26:21 -0500 + message: + Merged with experimental (1.6) branch (r231). + ------------------------------------------------------------ + revno: 202.1.20 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2008-12-28 11:36:41 -0500 + message: + curses/wicd-curses.py: Fixed a problem where any use of the wired network combo box would prevent connecting to wired networks. + Added some semblance of a "working" indicator while connecting, a simple |,/,-,\,|,/,... + ------------------------------------------------------------ + revno: 202.1.19 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2008-12-27 22:35:58 -0500 + message: + curses/curses_misc.py: Added a tabbed interface widget for use in the preferences dialog. + curses/prefs_curses.py: Converted the code to use the tabbed interface found in curses_misc.py. The dialog now fills up the terminal, but it still does nothing. + curses/wicd-curses.py: Turned the "list" wired section of the interface to a combo box. + ------------------------------------------------------------ + revno: 202.1.18 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2008-12-27 00:18:03 -0500 + message: + curses/curses_misc.py: ADDED. Various urwid classes that I use throughout the program. + curses/prefs_curses.py: Frontend is complete. However, it is still missing buttons and the ability to save information. Removed code that is now in curses_misc.py. + curses/wicd-curses.py: Removed code that is now in curses_misc.py. Tweaked the visuals a little bit. + curses/README: Preferences configuration is a WIP now. + curses/TODO: A combo box has been implemented in curses_misc.py, so that part has been removed. Also added a part about making a man page. + ------------------------------------------------------------ + revno: 202.1.17 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2008-12-26 14:18:40 -0500 + message: + curses/prefs_curses.py: Forgot the license. ^_^ + ------------------------------------------------------------ + revno: 202.1.16 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2008-12-26 13:53:25 -0500 + message: + Merged with experimental (1.6) branch (r229). + ------------------------------------------------------------ + revno: 202.1.15 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2008-12-26 13:48:26 -0500 + message: + curses/prefs_curses.py: ADDED. A basic global preferences dialog. Has a tabbed interface. It is missing things such as buttons, external program controls, advanced settings, and the ability to save information. :-) + curses/wicd-curses.py: Some code cleanup, replaced the language mess with the GUI list in misc, and added support for running the Preferences dialog with 'P'. + curses/README: Added the keybindings to bring up the preferences dialog. + ------------------------------------------------------------ + revno: 202.1.14 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Tue 2008-12-23 21:24:49 -0500 + message: + Merged with the 1.6 sources (r227), and + curses/wicd-curses.py: modified the program so that it can run off of the experimental API. + Cleaned up some of the code. + ------------------------------------------------------------ + revno: 202.1.13 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Mon 2008-12-22 18:27:05 -0500 + message: + Merged with experimental (r219). + ------------------------------------------------------------ + revno: 202.1.12 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2008-12-20 16:32:19 -0500 + message: + Big one this time. Hopefully I got everything. + curses/wicd.curses.py: + Added the full language component from wicd.misc into the file. + Added support for connecting to networks :-). + Added statusbar-updating support during connections. + Fixed a problem where an exception found before the UI is on-screen will cause another exception in wrap_exceptions. + Turned the footer into a ListBox, so that I can add more than more stuff to it more easily. + Rearranged the order of strings in the wireless connection part of the UI. + Added a bunch of keymappings to support all of the new functionality. + Made the UI updating function into an idle function, to better support the new functionality (and it eats up less CPU, too). + Some minor code cleanup throughout. + curses/README: Updated to correspond with new features + curses/TODO: Removed connection support from the TODO, added a few other things. + ------------------------------------------------------------ + revno: 202.1.11 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Fri 2008-12-19 12:34:03 -0500 + message: + curses/wicd-curses.py: Redesigned the internal list so that the wired network information is always at the top, no matter the number of wireless networks present. + ------------------------------------------------------------ + revno: 202.1.10 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2008-12-18 22:55:20 -0500 + message: + curses/wicd-curses.py: Moved the primary entry point to outside of the appGUI class, added some comments to improve code readability + ------------------------------------------------------------ + revno: 202.1.9 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2008-12-18 16:39:24 -0500 + message: + curses/wicd-curses.py: Removed a lot of redundant code related to focus on the main ListBox widget. Set focus=True in the frame's rendering function + made everything so much easier. + ------------------------------------------------------------ + revno: 202.1.8 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Thu 2008-12-18 00:07:00 -0500 + message: + curses/wicd-curses.py: fixed a bug (missing 'self.') in dbus_scan_finished + ------------------------------------------------------------ + revno: 202.1.7 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2008-12-17 11:27:09 -0500 + message: + curses/wicd-curses.py: Added code to restore the console on all errors, and then print them, including KeyboardInterrupts. + curses/TODO: Removed the above from TODO + ------------------------------------------------------------ + revno: 202.1.6 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Wed 2008-12-17 10:30:55 -0500 + message: + Merged with experimental (r216) + ------------------------------------------------------------ + revno: 202.1.5 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Mon 2008-12-15 17:50:00 -0500 + message: + curses/wicd-curses.py: Colorized the network we're currently connected to. + That network is now updated every time that wicd tells us that the "status" has changed. + Network connection status is now updated every 2 seconds, instead of every 0.5. + ------------------------------------------------------------ + revno: 202.1.4 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sun 2008-12-14 01:04:23 -0500 + message: + curses/wicd-curses.py: Cleaned up code for the Net/ListElements. Added '>' to mark to currently selected network. Set gen_network_list() to output signal quality in units specified in the config. + ------------------------------------------------------------ + revno: 202.1.3 + committer: Andrew Psaltis + branch nick: experimental-nacl + timestamp: Sat 2008-12-13 16:06:11 -0500 + message: + curses/wicd-curses.py: Add gobject.MainLoop support, and enable the D-Bus function connections (It works!). Various comments/code cleanup done. + curses/README: f5 refreshes the netlist now + curses/TODO: Added a bunch of features to implement, and removed one of them. + ------------------------------------------------------------ + revno: 202.1.2 + committer: Andrew Psaltis + branch nick: experimental + timestamp: Sat 2008-12-13 13:32:50 -0500 + message: + Merged with experimental (r207) + ------------------------------------------------------------ + revno: 202.1.1 + committer: Andrew Psaltis + branch nick: experimental + timestamp: Sat 2008-12-13 13:29:07 -0500 + message: + Let there be light! + curses/wicd-curses.py: ADDED (new (very incomplete) curses UI) + curses/README: ADDED (Simple README. Hope it says enough for the moment) + curses/TODO: ADDED (Simple, incomplete, TODO list) +------------------------------------------------------------ +revno: 268 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-02-01 23:32:28 -0500 +message: + Remove some comments. +------------------------------------------------------------ +revno: 267 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-02-01 23:10:11 -0500 +message: + Make it possible for the user to select which graphical sudo application to use. + Make any external apps not installed on the system unselectable in the GUI. + Rework the app selection code in the backend to fall back to auto-selection if a requested app isn't installed. + Tweak the autoconnect attempt throttle in wicd-monitor to not be as aggressive. + Made sure the preferences dialog would reconnect to dbus when a DaemonStarting signal was sent. +------------------------------------------------------------ +revno: 266 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-01-31 20:22:15 -0500 +message: + Fix broken Scan() call in wicd-client +------------------------------------------------------------ +revno: 265 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-01-31 00:31:50 -0500 +message: + A bunch of small fixes for errors/warnings reported by Pylint. +------------------------------------------------------------ +revno: 264 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-01-30 21:20:43 -0500 +message: + Fix crash if essid is None +------------------------------------------------------------ +revno: 263 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Wed 2009-01-28 19:54:17 -0500 +message: + Merge translations updates. + ------------------------------------------------------------ + revno: 260.1.5 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Tue 2009-01-27 14:22:10 +0800 + message: + Fixed another typo + ------------------------------------------------------------ + revno: 260.1.4 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Tue 2009-01-27 14:17:11 +0800 + message: + Fixed a typo + ------------------------------------------------------------ + revno: 260.1.3 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Tue 2009-01-27 14:15:30 +0800 + message: + Added a bunch more translations + ------------------------------------------------------------ + revno: 260.1.2 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Tue 2009-01-27 10:37:42 +0800 + message: + Merged to latest 1.6 + ------------------------------------------------------------ + revno: 260.1.1 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Tue 2009-01-27 10:35:08 +0800 + message: + Fixed a typo and added more translations +------------------------------------------------------------ +revno: 262 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Wed 2009-01-28 19:52:51 -0500 +message: + Always scan when the daemon starts. + Remove old init scripts. +------------------------------------------------------------ +revno: 261 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2009-01-26 18:46:57 -0500 +message: + Fix issues with the way disconnect scripts work. + Make flushing the route table more likely to work. +------------------------------------------------------------ +revno: 260 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Mon 2009-01-26 11:51:09 +0800 +message: + Added three new translations +------------------------------------------------------------ +revno: 259 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Mon 2009-01-26 11:15:35 +0800 +message: + Fixed some typos in the hidden network code and fix a bug if you try to start the tray icon without the daemon +------------------------------------------------------------ +revno: 258 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Mon 2009-01-26 10:54:38 +0800 +message: + Fixed a spacing issue in the preferences dialog +------------------------------------------------------------ +revno: 257 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-01-25 16:43:45 -0500 +message: + Fixing the fix... +------------------------------------------------------------ +revno: 256 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-01-25 16:40:26 -0500 +message: + Don't try to set properties in the advanced dialog before it exists. +------------------------------------------------------------ +revno: 255 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-01-25 16:34:32 -0500 +message: + Fix issue where toggling default wired profile could cause settings to get set for multiple profiles. + Remove some no longer needed checks in the daemon. +------------------------------------------------------------ +revno: 254 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-01-25 15:15:49 -0500 +message: + Add UI portion of wired switch feature. +------------------------------------------------------------ +revno: 253 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2009-01-25 00:44:51 -0500 +message: + Add new wired GUI icon. +------------------------------------------------------------ +revno: 252 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-01-24 23:54:57 -0500 +message: + Merge in improved wired profile UI + Tweak how wired profile list is built to be simple/more efficent and not cause a dbus error. + ------------------------------------------------------------ + revno: 250.1.2 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Sun 2009-01-25 12:03:01 +0800 + message: + Updated the wired profile Add/Delete system as per https://bugs.launchpad.net/wicd/+bug/318645 + ------------------------------------------------------------ + revno: 250.1.1 + committer: Adam Blackburn + branch nick: 1.6 + timestamp: Sun 2009-01-25 12:02:10 +0800 + message: + Removed vertical space between the DNS entriesw +------------------------------------------------------------ +revno: 251 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-01-24 23:31:24 -0500 +message: + Initial work on automatic switchover to wired networks (no UI work yet) + actually use "write=True" instead of just "True" everywhere we do config writes explicitly. + Fix the scripts dialog not working for wired connections. + Force the monitor to update state after triggering a disconnect or connect. + Remove an unneeded Scan call from autoconnect.py +------------------------------------------------------------ +revno: 250 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-01-23 08:35:28 -0500 +message: + Fix broken Scan() call in autoconnect.py +------------------------------------------------------------ +revno: 249 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Thu 2009-01-22 21:51:03 -0500 +message: + Tweak a comment +------------------------------------------------------------ +revno: 248 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Thu 2009-01-22 21:26:05 -0500 +message: + Tweak autoconnect logic be more likely to work if initial scans don't give us good results. +------------------------------------------------------------ +revno: 247 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2009-01-20 23:55:43 -0500 +message: + Add missing guiutil module +------------------------------------------------------------ +revno: 246 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2009-01-20 00:32:56 -0500 +message: + Add support for writing config data with whitespace kept intact. + Propgate debug setting to the ConfigManager instances. + Don't write essid key sections to the config file if we're not actually using them. +------------------------------------------------------------ +revno: 245 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2009-01-19 23:45:05 -0500 +message: + Fix a few typos in the option gateway code. +------------------------------------------------------------ +revno: 244 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2009-01-19 23:37:35 -0500 +message: + Fix bug that was keeping DHCP release from working. +------------------------------------------------------------ +revno: 243 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2009-01-19 01:06:57 -0500 +message: + Fix ttls template + Add a guiutils module for gui-related functions/classes that are used in multiple modules. + Replace os.access with os.path.exists + Make the static gateway entry optional. + Don't auto-connect/reconnect when the gui is open. + Fix bug that would keep the gui from working if the wired network entry was displayed. +------------------------------------------------------------ +revno: 242 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2009-01-17 12:58:02 -0500 +message: + Fix bug where encryption keys with non-ascii characters caused crashes. + Only write settings being saved if debug mode is on. + Clear keys entered through the GUI when the encryption checkbox is disabled. +------------------------------------------------------------ +revno: 241 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Thu 2009-01-15 01:25:24 -0500 +message: + Merging in noexpander branch. + ------------------------------------------------------------ + revno: 237.1.10 + committer: Dan O'Reilly + branch nick: 1.6-noexpander + timestamp: Thu 2009-01-15 01:21:54 -0500 + message: + Tweak default window sizes + ------------------------------------------------------------ + revno: 237.1.9 + committer: Dan O'Reilly + branch nick: 1.6-noexpander + timestamp: Thu 2009-01-15 00:59:52 -0500 + message: + merge in experimental branch + ------------------------------------------------------------ + revno: 237.1.8 + committer: Dan O'Reilly + branch nick: 1.6-noexpander + timestamp: Thu 2009-01-15 00:56:02 -0500 + message: + Fix bug where be-ioctl scans always reported channels as 1. + Tweak the UI a little bit. + Add debugging output when forced_disconnect gets enabled. + ------------------------------------------------------------ + revno: 237.1.7 + committer: Dan O'Reilly + branch nick: 1.6-noexpander + timestamp: Sun 2009-01-11 20:15:01 -0500 + message: + merge + ------------------------------------------------------------ + revno: 237.2.1 + committer: Adam Blackburn + branch nick: 1.6-revampedgui + timestamp: Sat 2009-01-10 11:03:41 +0800 + message: + A few minor cosmetic changes + Changed main GUI name from Wicd Manager to Wicd Network Manager + ------------------------------------------------------------ + revno: 237.1.6 + committer: Dan O'Reilly + branch nick: 1.6-noexpander + timestamp: Fri 2009-01-09 23:58:14 -0500 + message: + Initial crack at reworking GUI some more. + ------------------------------------------------------------ + revno: 237.1.5 + committer: Adam Blackburn + branch nick: 1.6-revampedgui + timestamp: Sat 2009-01-10 08:36:19 +0800 + message: + Made the information dialog look nicer -- added description labels and left aligned everything + ------------------------------------------------------------ + revno: 237.1.4 + committer: Adam Blackburn + branch nick: 1.6-revampedgui + timestamp: Fri 2009-01-09 22:54:24 +0800 + message: + Information dialog now uses real labels instead of grey labels + ------------------------------------------------------------ + revno: 237.1.3 + committer: Adam Blackburn + branch nick: experimental-revampedgui + timestamp: Fri 2009-01-09 21:53:59 +0800 + message: + Added an information button and a dialog + ------------------------------------------------------------ + revno: 237.1.2 + committer: Adam Blackburn + branch nick: experimental-revampedgui + timestamp: Fri 2009-01-09 21:12:48 +0800 + message: + Added a name label + ------------------------------------------------------------ + revno: 237.1.1 + committer: Adam Blackburn + branch nick: experimental-revampedgui + timestamp: Fri 2009-01-09 20:40:30 +0800 + message: + Removed network expanders +------------------------------------------------------------ +revno: 240 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Thu 2009-01-15 01:22:40 -0500 +message: + Use dbusmanager in autoconnect.py +------------------------------------------------------------ +revno: 239 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Mon 2009-01-12 20:09:11 +0800 +message: + Applied patch from https://bugs.launchpad.net/wicd/+bug/315238 to add expandable values to the script parameters +------------------------------------------------------------ +revno: 238 +committer: Adam Blackburn +branch nick: 1.6 +timestamp: Sat 2009-01-10 08:53:55 +0800 +message: + Don't expand the DNS domain +------------------------------------------------------------ +revno: 237 +committer: Adam Blackburn +branch nick: experimental +timestamp: Sat 2009-01-03 10:35:28 +0800 +message: + Changed 25% signal icon to red and 50% signal icon to orange +------------------------------------------------------------ +revno: 236 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-01-02 19:57:21 -0500 +message: + Merge in rworkman-experimental + ------------------------------------------------------------ + revno: 203.1.25 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2008-12-31 23:53:30 -0600 + message: + If kde-config fails, then assume kde is not installed, and don't + install the autostart file for kde. + ------------------------------------------------------------ + revno: 203.1.24 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2008-12-31 15:52:27 -0600 + message: + Merged r234 from mainline. + ------------------------------------------------------------ + revno: 203.1.23 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Tue 2008-12-30 20:07:52 -0600 + message: + Merged r233 from mainline + ------------------------------------------------------------ + revno: 203.1.22 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sun 2008-12-28 19:24:37 -0600 + message: + Merged r232 from mainline. + ------------------------------------------------------------ + revno: 203.1.21 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sun 2008-12-28 19:22:15 -0600 + message: + Fix permissions on peap-tkip template. + ------------------------------------------------------------ + revno: 203.1.20 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sun 2008-12-28 00:19:25 -0600 + message: + Merged autoconnect.py and suspend.py changes from trunk (fixes for + the pm-utils sleep hook usage). + ------------------------------------------------------------ + revno: 203.1.19 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sat 2008-12-27 19:38:12 -0600 + message: + Merged latest changes from mainline experimental branch. + ------------------------------------------------------------ + revno: 203.1.18 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sat 2008-12-27 19:21:45 -0600 + message: + Merge in the changes to trunk's pm-utils sleep hook. + ------------------------------------------------------------ + revno: 203.1.17 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sat 2008-12-27 00:37:03 -0600 + message: + Fixup pm-utils hook to return proper exit codes and fix logging. + ------------------------------------------------------------ + revno: 203.1.16 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Wed 2008-12-24 11:30:07 -0600 + message: + Merged r229 from mainline experimental. + ------------------------------------------------------------ + revno: 203.1.15 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Tue 2008-12-23 01:50:16 -0600 + message: + Add "CHANGES" file to the list of documentation installed. + ------------------------------------------------------------ + revno: 203.1.14 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Tue 2008-12-23 01:47:53 -0600 + message: + Add support for configurable Unix group to be used - basically, users + must be a member of this group in order to use Wicd. Note that this + does not apply on systems configured to use ConsoleKit/PAM/et al. + This defaults to use the "users" group so that it will work "out of the + box" for most people, but distributions are encouraged to edit it + as needed with the "--wicdgroup=whatever" configure argument. + ------------------------------------------------------------ + revno: 203.1.13 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Tue 2008-12-23 01:20:48 -0600 + message: + Removed execute perms from other/wicd.conf + ------------------------------------------------------------ + revno: 203.1.12 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Tue 2008-12-23 01:17:30 -0600 + message: + Fix (I think) dbus errors, or at least this is one way to fix them. + If this is the *right* way, then it still needs work to support it + in setup.py + ------------------------------------------------------------ + revno: 203.1.11 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Mon 2008-12-22 23:34:47 -0600 + message: + Merged new prefs dialog from mainline experimental + ------------------------------------------------------------ + revno: 203.1.10 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Tue 2008-12-23 04:40:47 +0000 + message: + Merge r220 upstream. + ------------------------------------------------------------ + revno: 203.1.9 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Mon 2008-12-22 17:14:55 +0000 + message: + Merged r219 from main experimental branch. + ------------------------------------------------------------ + revno: 203.1.8 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Mon 2008-12-15 17:40:07 +0000 + message: + Merged r213 of main experimental branch + ------------------------------------------------------------ + revno: 203.1.7 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sun 2008-12-14 07:58:58 +0000 + message: + Remove extraneous comments from setup.py and clean up a few of them. + This is definitely trivial crap... + ------------------------------------------------------------ + revno: 203.1.6 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sun 2008-12-14 07:43:44 +0000 + message: + Merged main experimental branch + Fixed kde autostart directory setting + ------------------------------------------------------------ + revno: 203.1.5 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sat 2008-12-13 22:11:56 +0000 + message: + Merged main experimental branch changes as of r208. + ------------------------------------------------------------ + revno: 203.1.4 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Sat 2008-12-13 22:06:00 +0000 + message: + Fixed (I think) the pkg-config and kde-config tests. This needs more + testing though before I'm sure. Big thanks to "nanotube" for the + suggestions and code for this. + ------------------------------------------------------------ + revno: 203.1.3 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Fri 2008-12-12 14:05:44 +0000 + message: + Merge changes from main experimental branch. + ------------------------------------------------------------ + revno: 203.1.2 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Fri 2008-12-12 05:45:13 +0000 + message: + Fix icons (copied from wicd-1.5.6 source tarball) + ------------------------------------------------------------ + revno: 203.1.1 + committer: Robby Workman + branch nick: experimental-rworkman + timestamp: Fri 2008-12-12 04:28:18 +0000 + message: + Add support for checking pkg-config to see where pm-utils sleep hook + should go (supported in pm-utils >=1.2.3). + Add support for checking kde-config to get kde's prefix, and set the + kde autostart directory accordingly. +------------------------------------------------------------ +revno: 235 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Fri 2009-01-02 19:52:28 -0500 +message: + Move logic that saves settings for network entries out of gui.py and into netentry.py. +------------------------------------------------------------ +revno: 234 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2008-12-30 23:20:00 -0500 +message: + Add a domain entry for dns settings. + Display an error if global dns is enabled for a network, but global dns entries aren't entered in the general preferences window. +------------------------------------------------------------ +revno: 233 +committer: Adam Blackburn +branch nick: experimental +timestamp: Tue 2008-12-30 18:01:27 -0600 +message: + Merged with wpathenhancements + ------------------------------------------------------------ + revno: 232.1.4 + committer: Adam Blackburn + branch nick: experimental-oneversion + timestamp: Tue 2008-12-30 10:31:06 -0600 + message: + Removed files that are generated by python setup.py configure + Added command to setup.py to clean out generated files ('cleargenerated') + Added the revision number to wicd-daemon.py --help + ------------------------------------------------------------ + revno: 232.1.3 + committer: Adam Blackburn + branch nick: experimental-oneversion + timestamp: Tue 2008-12-30 10:17:07 -0600 + message: + Fixed a typo + ------------------------------------------------------------ + revno: 232.1.2 + committer: Adam Blackburn + branch nick: experimental-oneversion + timestamp: Tue 2008-12-30 10:16:09 -0600 + message: + Added support for storing the revision number in wpath.py + ------------------------------------------------------------ + revno: 232.1.1 + committer: Adam Blackburn + branch nick: experimental-oneversion + timestamp: Tue 2008-12-30 09:53:30 -0600 + message: + Centralized version number in setup.py +------------------------------------------------------------ +revno: 232 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2008-12-28 16:19:18 -0500 +message: + Fix bug where the daemon could crash if an encryption key was entered for a network without encryption on. + Some minor code formatting changes + Replace "new" with "experimental" in description for ioctl backend. +------------------------------------------------------------ +revno: 231 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2008-12-27 18:31:50 -0500 +message: + Fix prefs label +------------------------------------------------------------ +revno: 230 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2008-12-27 18:23:15 -0500 +message: + Make backend combobox tooltip display the active backend's description. + Reverse the order of the OK/Cancel button in the Ad-Hoc connection dialog. + Use a new set of icons. + Extend the update invervals for all backends by 1 second. + Try to use en_US.utf8 instead of C as the LANG in misc.Run if it is available. + Add ability to force a network state update. (Currently not used). +------------------------------------------------------------ +revno: 229 +committer: Adam Blackburn +branch nick: experimental +timestamp: Wed 2008-12-24 00:24:26 -0600 +message: + Removed stringToBoolean +------------------------------------------------------------ +revno: 228 +committer: Adam Blackburn +branch nick: experimental +timestamp: Tue 2008-12-23 23:34:22 -0600 +message: + Added unit test for misc.py +------------------------------------------------------------ +revno: 227 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2008-12-23 21:10:17 -0500 +message: + Tweak misc.to_unicode() so that it is more likely to encode to utf-8 correctly. +------------------------------------------------------------ +revno: 226 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2008-12-23 18:23:38 -0500 +message: + Fix "_" getting stripped from interface names. +------------------------------------------------------------ +revno: 225 +committer: Adam Blackburn +branch nick: experimental +timestamp: Tue 2008-12-23 16:55:15 -0600 +message: + Added the wpa-psk template and change the wpa one to wpa passphrase +------------------------------------------------------------ +revno: 224 +committer: Adam Blackburn +branch nick: experimental +timestamp: Tue 2008-12-23 11:39:55 -0600 +message: + Updated Preferences dialog and added test cases for wnettools +------------------------------------------------------------ +revno: 223 +committer: Adam Blackburn +branch nick: experimental +timestamp: Mon 2008-12-22 23:30:52 -0600 +message: + Updated Preferences dialog more and commented out translations in prefs.py +------------------------------------------------------------ +revno: 222 +committer: Adam Blackburn +branch nick: experimental +timestamp: Mon 2008-12-22 23:08:12 -0600 +message: + Updated Preferences dialog to conform to the GNOME HIG better +------------------------------------------------------------ +revno: 221 +committer: Adam Blackburn +branch nick: experimental +timestamp: Mon 2008-12-22 21:25:51 -0600 +message: + Fixed hidden network icon +------------------------------------------------------------ +revno: 220 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2008-12-22 21:28:31 -0500 +message: + Fix problem where combobox entries would get screwed up when the preferences window was opened more than once. +------------------------------------------------------------ +revno: 219 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2008-12-22 00:20:42 -0500 +message: + Fix some issues with wired networks caused by refactoring. + Add missing return statement. +------------------------------------------------------------ +revno: 218 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2008-12-22 00:05:19 -0500 +message: + More work on bubbling the reason for connection failures up to the UI. + Refactor Wireless/Wired classes in networking module and daemon so that they don't need to reference each other. Wired objects don't know about Wireless objects and vice versa. This also means connecting to a wired/wireless network will only clear the connection on whichever network type you're connecting to. +------------------------------------------------------------ +revno: 217 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2008-12-21 00:19:18 -0500 +message: + Checkpoint for work on getting reasons for connection failure back up to the UI. +------------------------------------------------------------ +revno: 216 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2008-12-16 01:30:46 -0500 +message: + Fix non-blocking error dialog. +------------------------------------------------------------ +revno: 215 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2008-12-16 01:19:26 -0500 +message: + Make gui.error() calls optionally not block. + Make the lost dbus error message translatable. +------------------------------------------------------------ +revno: 214 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2008-12-16 00:48:47 -0500 +message: + Only show valid wpa_supplicant drivers in the GUI. + Don't needlessly created PreferenceDialog objects. + Use dbus signals to alert the UI that the daemon is back up, instead of polling. +------------------------------------------------------------ +revno: 213 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Mon 2008-12-15 00:31:35 -0500 +message: + Fix some gtk warnings that would pop up when the GUI was opened. + Fix broken Network menu entries. +------------------------------------------------------------ +revno: 212 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2008-12-14 22:19:35 -0500 +message: + More work on making the client handle a daemon restart +------------------------------------------------------------ +revno: 211 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2008-12-14 18:31:24 -0500 +message: + Make client survive the daemon going down. + Port a few fixes from trunk. +------------------------------------------------------------ +revno: 210 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2008-12-13 19:39:15 -0500 +message: + Make sure autoconnect.py never blocks + Tweak configmanager to not write a default value unless one is specified in the get call. +------------------------------------------------------------ +revno: 209 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2008-12-13 17:32:54 -0500 +message: + Use RawConfigParser instead of ConfigParser +------------------------------------------------------------ +revno: 208 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2008-12-13 17:07:31 -0500 +message: + Pass lists instead of strings in GeneratePSK and Authenticate methods. +------------------------------------------------------------ +revno: 207 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2008-12-13 13:28:05 -0500 +message: + Fix saving scripts not working correctly. +------------------------------------------------------------ +revno: 206 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2008-12-13 01:49:15 -0500 +message: + merging + ------------------------------------------------------------ + revno: 204.1.1 + committer: Adam Blackburn + branch nick: experimental + timestamp: Fri 2008-12-12 17:23:35 +0800 + message: + Fixed the icons +------------------------------------------------------------ +revno: 205 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sat 2008-12-13 01:37:57 -0500 +message: + Fix some suspend/resume issues +------------------------------------------------------------ +revno: 204 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Thu 2008-12-11 18:42:11 -0500 +message: + Fix dbus permissions problem. + Fix missing dbus import. +------------------------------------------------------------ +revno: 203 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Thu 2008-12-11 00:56:12 -0500 +message: + Apply patch from rworkman + Update suspend/resume script +------------------------------------------------------------ +revno: 202 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Thu 2008-12-11 00:37:07 -0500 +message: + More build fixes +------------------------------------------------------------ +revno: 201 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Thu 2008-12-11 00:33:10 -0500 +message: + Add missing man file +------------------------------------------------------------ +revno: 200 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Thu 2008-12-11 00:29:00 -0500 +message: + Fix running scripts + Fix broken symlink + Update slackware init script + Add new build options to wpath.py +------------------------------------------------------------ +revno: 199 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Tue 2008-12-09 22:53:30 -0500 +message: + Make sure suspend script never fails +------------------------------------------------------------ +revno: 198 +committer: Dan O'Reilly +branch nick: experimental +timestamp: Sun 2008-12-07 21:15:29 -0500 +message: + merging in a bunch of trunk changes +------------------------------------------------------------ +revno: 197 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-12-06 19:11:43 +0000 +message: + experimental branch: + - Tray icon fixes from trunk + - Handle possible failure in wpactrl + - Format some docstrings +------------------------------------------------------------ +revno: 196 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-11-02 14:26:42 +0000 +message: + experimental branch: + - Enhance dbus manager to handle settings up mainloops, etc. + - Early work on getting wicd-client to recover from a daemon crash. + - Simply how the the scripts editor gets launched. + - Remove unneeded cleanup code from netentry.py + - More ralink legacy work. + - Run scans in a thread, this should make the UI more responsive while a scan is going on. Rework the UI code to never expect a scan to be blocking. + - Don't require the daemon to be restarted when we switch backends, just try to prevent any calls to the backend until the switch is made. +------------------------------------------------------------ +revno: 195 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-10-18 17:37:42 +0000 +message: + experimental branch: + - Port a bunch of fixes from the trunk + - Use an actual Gtk.Menu in the toolbar for the "Network" widget +------------------------------------------------------------ +revno: 194 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-10-11 12:36:49 +0000 +message: + experimental branch: + - Actually destroy the network entry objects that are supposed to get destroied + - Improve GUI behavior when initially opened. + - Use the python -O flag when launching the daemon/GUI. + - Favor gksudo over gksu. + - Remove broken interface enable/disable options. +------------------------------------------------------------ +revno: 193 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-10-09 18:45:01 +0000 +message: + experimental: + - Add 3rd party python libraries used by ioctl backend to tree and to setup.py + - Port several bug fixes from the trunk (removing reliance on shell for running external commands, unicode fixes, gui crash fixes, authentication validation improvements, several others) + - Fix some crashes in ioctl backend. + - Change daemon/GUI launch scripts to use the -O flag. +------------------------------------------------------------ +revno: 192 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-27 21:36:04 +0000 +message: + branches/experimental: + - Fix scripts dialog not appearing. +------------------------------------------------------------ +revno: 191 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-09-25 20:17:35 +0000 +message: + branches/experimental: + - A bunch of documentation additions/updates. + - Minor refactoring. + - Fix catching wrong exception in netentry.py +------------------------------------------------------------ +revno: 190 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-09-21 16:38:15 +0000 +message: + branches/experimental: + - Fix some wired method issues in the daemon. + - Make sure stringToBoolean always returns a boolean. +------------------------------------------------------------ +revno: 189 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-09-21 13:26:46 +0000 +message: + trunk & experimental: + - Make sure all entries in the connection status info list are strings. +------------------------------------------------------------ +revno: 188 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-20 19:13:34 +0000 +message: + trunk, experimental: + - Fix crash if default locale isn't supported. +------------------------------------------------------------ +revno: 187 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-20 10:39:23 +0000 +message: + trunk/experimental: + - Fix use of subprocess.call method +------------------------------------------------------------ +revno: 186 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-20 10:22:06 +0000 +message: + branches/experimental + - Add support for entering search domain into static DNS settings. + - Fix some errors in how static setting texboxes were getting set. + - Fixed a bunch of errors/warnings found by pylint. +------------------------------------------------------------ +revno: 185 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-20 08:02:06 +0000 +message: + branches/experimental: + - Fix crash in configmanager. +------------------------------------------------------------ +revno: 184 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-09-19 16:28:26 +0000 +message: + experimental: + - Fix potential deadlock in connection thread + - Make wireless interface blank string if set to None in config. +------------------------------------------------------------ +revno: 183 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-09-18 21:18:40 +0000 +message: + experimental: + - Use the full path to wpa_passphrase. + - Fix some crashing bugs in the daemon and configscript.py + - Port a few changes/fixes from trunk. + - Some minor refactoring. +------------------------------------------------------------ +revno: 182 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-09-18 16:07:49 +0000 +message: + trunk/experimental: + - Fix EAP-TLS template. Thanks to Andrew Psaltis for the fix. +------------------------------------------------------------ +revno: 181 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-13 22:52:01 +0000 +message: + experimental: + - Add UPDATE_INTERVAL as a required attribute for backends, and used by monitor.py + - Update Copyright stuff in a few files + - Remove/update some scripts and configuration files. +------------------------------------------------------------ +revno: 180 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-13 21:39:20 +0000 +message: + experimental: + - Merge missing dbusmanager changes from pluggablebackends + - Merge a change from trunk for --no-autoconnect mode + - Make monitor timeout_add_seconds time an integer +------------------------------------------------------------ +revno: 179 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-13 11:28:36 +0000 +message: + experimental: + - Use gobject.timeout_add_seconds instead of gobject.timeout_add when possible + - Merge some fixes from pluggablebackends + - Replace os.system usage with subprocess.call. +------------------------------------------------------------ +revno: 178 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-06 20:53:21 +0000 +message: + experimental: + - fix some autoconnect issues related to the splitting up of the daemon +------------------------------------------------------------ +revno: 177 +committer: compwiz18 +branch nick: experimental +timestamp: Sat 2008-09-06 20:35:53 +0000 +message: + Experimental: + * Fixed typo in setup.py +------------------------------------------------------------ +revno: 176 +committer: compwiz18 +branch nick: experimental +timestamp: Sat 2008-09-06 20:30:23 +0000 +message: + Experimental: + * Added wicd.configmanager to setup.py +------------------------------------------------------------ +revno: 175 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-06 19:54:20 +0000 +message: + experimental: + - Add backends entry to wpath.py +------------------------------------------------------------ +revno: 174 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-06 19:53:25 +0000 +message: + experimental: + - Fix some syntax/import problems created during the merge +------------------------------------------------------------ +revno: 173 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-06 17:29:25 +0000 +message: + experimental: + - update glade file +------------------------------------------------------------ +revno: 172 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-06 16:57:36 +0000 +message: + experimental: + - update setup.py +------------------------------------------------------------ +revno: 171 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-09-06 16:54:53 +0000 +message: + experimental: + - Merge in changes from pluggablebackends. +------------------------------------------------------------ +revno: 170 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-08-29 14:49:37 +0000 +message: + All braches/trunk: + - Force locale settings to C before running commands with piped output. +------------------------------------------------------------ +revno: 169 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-08-29 12:22:34 +0000 +message: + All branches/trunk: + - Specify the device to use in SetDefaultRoute +------------------------------------------------------------ +revno: 168 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-08-28 18:58:34 +0000 +message: + trunk/all branches: + make wicd launch scripts use "exec" so that the launch script exits after starting up the daemon/tray icon. +------------------------------------------------------------ +revno: 167 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-08-24 08:36:07 +0000 +message: + experimental/pluggablebackends: + - Remove --scan-interval option from daemon since its no longer needed. +------------------------------------------------------------ +revno: 166 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-08-24 08:15:24 +0000 +message: + experimental: + - Some minor cleanup/formatting fixes + - Add a missing DetectWiredInterfaces() method to networking.py +------------------------------------------------------------ +revno: 165 +committer: compwiz18 +branch nick: experimental +timestamp: Sat 2008-08-23 20:14:43 +0000 +message: + Experimental: Apply changes involving setup.py + * Added setup.py from trunk + * Updated various information files (AUTHORS, README, etc) + * Update the Wicd icon + * Move stuff around to match trunk's layout +------------------------------------------------------------ +revno: 164 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-08-23 14:50:50 +0000 +message: + experimental: + - Merge in changes (prefs.py, dbusmanager.py, clean up in daemon.py) from pluggablebackends. + + pluggablebackends: + - Some minor cleanup. +------------------------------------------------------------ +revno: 163 +committer: imdano +branch nick: experimental +timestamp: Wed 2008-08-20 14:09:47 +0000 +message: + trunk/experiementa/pluggablebackends: + - Fix crash due to _sanitize_string getting None passed in. +------------------------------------------------------------ +revno: 162 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-08-19 19:06:26 +0000 +message: + Experimental: + - Add new logging system which rotates the log file once it reaches a set size. + - Merge in fixes and new features from pluggablebackends and trunk + - Right click network menu in tray icon now bolds the active network. +------------------------------------------------------------ +revno: 161 +committer: imdano +branch nick: experimental +timestamp: Mon 2008-07-21 13:46:38 +0000 +message: + Testing: + - Fix typo in daemon +------------------------------------------------------------ +revno: 160 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-07-20 16:34:45 +0000 +message: + Experimental: + - Port a ton of changes from the testing branch over. +------------------------------------------------------------ +revno: 159 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-06-29 20:38:30 +0000 +message: + Testing: + - Fix bug in configscript.py that kept it from loading correctly. + - More manpage fixes/updates from rworkman. +------------------------------------------------------------ +revno: 158 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-06-24 14:14:18 +0000 +message: + Experimental/Testing: + - Fix changes made to encryption settings not being reset if "cancel" is selected in the dialog box. + + Experimental: + - Fix bug where Static DNS checkbox would be disabled no matter what if Static IP was disabled. +------------------------------------------------------------ +revno: 157 +committer: imdano +branch nick: experimental +timestamp: Mon 2008-06-23 22:21:47 +0000 +message: + Experimental/Testing: + - Fix encryption combobox size sometimes getting distorted when switching between encryption types. +------------------------------------------------------------ +revno: 156 +committer: imdano +branch nick: experimental +timestamp: Mon 2008-06-23 08:08:53 +0000 +message: + Experimental/Testing: + - Fix dhcp not getting released if the disconnect button wasn't pressed explicitly, but a new connection is trying to be made. +------------------------------------------------------------ +revno: 155 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-06-20 08:13:56 +0000 +message: + Experimental/Testing: + - Fix bug keeping wired networks from connecting + - Wicd will now try to release dhcp when disconnecting from a network. +------------------------------------------------------------ +revno: 154 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-06-19 22:09:39 +0000 +message: + Experimental/Testing: + - Improved behavior in the networking backend. The wired/wireless wnettools instances now refer to each other, and get passed on to connection threads as well, which simplifies passing settings for external program usage. Also removed some unecessary creating of duplicate wnettools instances which ended up causing some issues. + - Fixed bug where dhclient was being used as the dhcp client even if it was selected in the options menu. + - Fixed a typo in the connection commands used for ralink cards. + - Fixed the wrong cli option for releasing a dhcpcd lease. + - Monitor.py no longer calls for an auto-rescan if the daemon is currently connecting to a network. + - Cleaned up some comments and simplified the logic in a few methods/functions. +------------------------------------------------------------ +revno: 153 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-06-12 15:08:50 +0000 +message: + Experimental/Testing: + - Fixed typo in ttls template (Thanks to Nido Media for catching it) +------------------------------------------------------------ +revno: 152 +committer: imdano +branch nick: experimental +timestamp: Wed 2008-06-11 20:13:32 +0000 +message: + Experimental/Testing: + - Added support for using kdesu instead of gksu where it makes sense. + - Improved code used to sanitize network keys used with wpa_passphrase. + - Removed some unused functions and imports. + - Cleaned up some comments/docstrings. + + Experimental: + - Split gui.py into gui.py and netentry.py. netentry is imported by gui.py to make use of NetworkEntry and its subclasses. + - Reorganzed how dbus and the language dict are used in wicd.py and gui.py. +------------------------------------------------------------ +revno: 151 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-05-24 11:36:14 +0000 +message: + Experimental/Testing: + - Fix bug where wired advanced settings wouldn't be saved properly + + Experimental: + - Add support for determining which graphical sudo program (gksu/kdesu) should be used. +------------------------------------------------------------ +revno: 150 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-05-09 21:07:41 +0000 +message: + Testing/Experimental: + - Fixed an indentation problem + - Use misc.RenameProcess for process renaming in wicd.py + + Experimental: + - Make the encryption template file parsing used for the GUI a little more robust. +------------------------------------------------------------ +revno: 149 +committer: imdano +branch nick: experimental +timestamp: Wed 2008-05-07 21:59:44 +0000 +message: + Testing/Experimental: + - Move process renaming code to the misc module, and fix process ranming for 64 bit systems. (Thanks to Helber Maciel) + - Move the error gtk method to the gui module. (Thanks to Helber Maciel) + - Removed a debugging print statement from monitor.py + - Fixed up a few docstrings/comments. + + Testing: + - Fix bug where Connect button would become inactive after disconnecting from a network. +------------------------------------------------------------ +revno: 148 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-05-04 18:10:47 +0000 +message: + Testing/Experimental: + - Emit a dbus signal when an autoscan is called, so that the GUI can update if needed. + + Experimental: + - Merged a few changes from the testing branch. +------------------------------------------------------------ +revno: 147 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-05-03 09:30:09 +0000 +message: + Testing/Experimental: + - Fixed bug where monitor would crash on resume because dbus wasn't ready yet. + - Monitor now calls a rescan every 2 minutes. + + Experimental: + - Added a network list submenu to the right-click menu of the tray icon. +------------------------------------------------------------ +revno: 146 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-04-29 14:29:44 +0000 +message: + Testing/Experimental: + - Replaced uses of /proc/net/wireless with /sys/class/net/. +------------------------------------------------------------ +revno: 145 +committer: imdano +branch nick: experimental +timestamp: Mon 2008-04-28 18:22:37 +0000 +message: + Testing/Experimental: + - Added check to make sure wpa_cli is installed, and make sure not to try to validate authentication if it isn't. + Experimental: + - Increased length of sleep time before checking for an active link when the wired interface has to be put up explicitly. +------------------------------------------------------------ +revno: 144 +committer: imdano +branch nick: experimental +timestamp: Wed 2008-04-23 18:10:23 +0000 +message: + Fixed problems with passphrases using non-alphanumeric characters. +------------------------------------------------------------ +revno: 143 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-04-19 09:09:15 +0000 +message: + Fixed bug where building with setup.py wouldn't add rcX symlinks to init.d, so wicd wouldn't start at boot. +------------------------------------------------------------ +revno: 142 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-04-19 08:48:09 +0000 +message: + Fixed bug where special characters would break expander label formatting. +------------------------------------------------------------ +revno: 141 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-04-19 08:00:44 +0000 +message: + Fixed problems with wpa_supplicant driver not being passed to wnettools correctly in networking.py. + Fixed bug where connect threads could crash if debug was on and dhcp failed. +------------------------------------------------------------ +revno: 140 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-04-11 10:29:10 +0000 +message: + Fixed bug where advanced settings dialog wouldn't appear for wired networks. + Added MAC address to the top level info line in a wireless network entry. + Fixed some setup.py problems. +------------------------------------------------------------ +revno: 139 +committer: imdano +branch nick: experimental +timestamp: Wed 2008-04-02 10:52:41 +0000 +message: + Fixed some setup.py problems + Added a bunch of docstrings + Fixed a crash bug when the daemon is called with the -s option caused by wicd.py calling SetForceDisconnect(False) when it launches. +------------------------------------------------------------ +revno: 138 +committer: imdano +branch nick: experimental +timestamp: Mon 2008-03-31 21:37:21 +0000 +message: + Fixed gui sometimes not updating buttons after clicking the disconnect button for the active network. + Fixed gui not behaving properly after cancelling a connection. +------------------------------------------------------------ +revno: 137 +committer: imdano +branch nick: experimental +timestamp: Mon 2008-03-31 15:23:59 +0000 +message: + Lengthened the sleep time between putting a wired interface up and checking to see if the link is active. + A few small optimizations/code cleanup. +------------------------------------------------------------ +revno: 136 +committer: imdano +branch nick: experimental +timestamp: Mon 2008-03-31 14:21:43 +0000 +message: + Added support for monitoring connection status without the need for iwconfig, ifconfig, and ethtool/miitool. + Added a "Disconnect" button to each network entry, which will be visible instead of the "Connect" button for the active network. + Fixed a bug where cancelling a connection while validating authentication would leave the GUI in the connecting state forever. +------------------------------------------------------------ +revno: 135 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-03-30 12:14:11 +0000 +message: + Added missing icon images + Updated dbus config file to work under more distros + Added support for determing wireless interface by parsing /proc/net/wireless (removing need for iwconfig call) + A few minor formatting improvements. +------------------------------------------------------------ +revno: 134 +committer: imdano +branch nick: experimental +timestamp: Mon 2008-03-24 20:37:46 +0000 +message: + Added support for resizing the preferences window to any size. Also added support for remembing the size of the preferences window. +------------------------------------------------------------ +revno: 133 +committer: imdano +branch nick: experimental +timestamp: Mon 2008-03-24 00:03:35 +0000 +message: + Added distro-specific init scripts based on those used by NM (these are very experimental and likely broken in many cases). + Updated setup.py to pick which initscript to install based on the distro detected. + Updated MANIFEST.in to make sure launchdaemon.sh is included in the sdist build. + Fixed a bunch of crash bugs in tool detection system when tools are detected. + Made tool detection work correctly when "which" returns output if no match is found (as opposed to no output). Eventually we might want to hardcode possible paths instead of using which at all... + Fixed some message formatting in the daemon. + Added some docstrings. + Added a pidfile system for increased initscript compatibility (sort of, it's somewhat incomplete). +------------------------------------------------------------ +revno: 132 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-03-21 17:07:47 +0000 +message: + Added support in the preferences window for specifying which dhcp client, link detection tool, and route flushing tool to use. It can also be left up to wicd to decide automatically. + Made a few logic optimizations. +------------------------------------------------------------ +revno: 131 +committer: compwiz18 +branch nick: experimental +timestamp: Fri 2008-03-21 03:38:57 +0000 +message: + Couple of fixes, started integrating a feature that will allow Wicd to smartly detect wired networks, by using detected wireless networks and connected USB devices +------------------------------------------------------------ +revno: 130 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-03-20 11:16:49 +0000 +message: + Scripts no longer fork into the background by default. +------------------------------------------------------------ +revno: 129 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-03-18 22:42:55 +0000 +message: + Ported the animated tray icon code to the experimental branch. + Added a command line option to run the tray with the animations disabled. +------------------------------------------------------------ +revno: 128 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-03-18 10:21:32 +0000 +message: + Fixed bug where wpa_supplicant driver wasn't being set properly in the preferences window. +------------------------------------------------------------ +revno: 127 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-03-18 09:12:05 +0000 +message: + Added checks to auto-reconnection code to keep it from constantly trying to reconnect when it isn't working. + Added a ShouldAutoReconnect method to the daemon, to simply the call needed in monitor.py's auto_reconnect method. +------------------------------------------------------------ +revno: 126 +committer: imdano +branch nick: experimental +timestamp: Mon 2008-03-17 07:50:51 +0000 +message: + Improved automatic reconnection behavior. + Improved debug mode behavior. + Improved the way networking.py interfaces passes attributes on to wnettools.py interfaces. + Fixed crash in __printReturn when a parameter to return wasn't of type 'str'. +------------------------------------------------------------ +revno: 125 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-03-15 00:40:27 +0000 +message: + Forgot the translations folder updates from two commits ago. (P.S. Adam make sure that the updates look right as well.) +------------------------------------------------------------ +revno: 124 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-03-15 00:26:24 +0000 +message: + Forgot to add the "other" folder in the last commit. +------------------------------------------------------------ +revno: 123 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-03-15 00:25:59 +0000 +message: + Added README and INSTALL files. + Added a setup.py script. + Added the new init and suspend scripts to a folder called other, which also holds all files which don't currently go in the /opt/wicd folders. These are used by the setup.py script and put into their respective directories. +------------------------------------------------------------ +revno: 122 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-03-14 19:16:18 +0000 +message: + Fixed asynchronous Autoconnect calls so that they actually work properly +------------------------------------------------------------ +revno: 121 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-03-14 10:18:28 +0000 +message: + Removed unneeded call to LogWriter() in wicd.py +------------------------------------------------------------ +revno: 120 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-03-13 14:10:49 +0000 +message: + Made calls to Autoconnect outside the daemon asynchronous. + Removed some unnecessary print statements. + Added checks to the daemon and configscript.py to make sure the user opening it is root. + Fixed formatting problems in class definitions in wicd.py +------------------------------------------------------------ +revno: 119 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-03-13 10:16:03 +0000 +message: + Improved GUI opening performance so there is less delay between clicking the icon and the gui actually appearing. + Made network entry list inactive while refreshing networks. + Made debugging output less spammy and more helpful (still incomplete). +------------------------------------------------------------ +revno: 118 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-03-11 15:15:55 +0000 +message: + Fixed a malformed ''.join() call in daemon.py + Replaced a couple of concatenations with ''.join() calls. +------------------------------------------------------------ +revno: 117 +committer: imdano +branch nick: experimental +timestamp: Mon 2008-03-10 20:55:46 +0000 +message: + Added support for using one set of global settings for all networks with a given essid. + Fixed a few wired autoconnect issues. +------------------------------------------------------------ +revno: 116 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-03-09 22:09:22 +0000 +message: + Refactored networking.py to be more modular. + Added docstrings to wnettools.py + Fixed wired autoconnect bug due to missing parenthesis on a method call. + Moved connection monitoring code out of daemon.py and into monitor.py, which is run as a separate, child process of daemon.py, to reduce delays in dbus reponse time while connection status and autoreconnect code is running. + Added full support for running the gui without the tray icon using the --no-tray option. + Some minor changes to code to be more readable/efficient/pythonic. +------------------------------------------------------------ +revno: 115 +committer: imdano +branch nick: experimental +timestamp: Wed 2008-03-05 23:29:48 +0000 +message: + Increased time allowed for wpa_supplicant to complete authentication. + Reduced external calls (when possible) in update_status_bar. + pulse_progress_bar is now only run when connecting to a network. + Only check encryption settings on connect, instead of all of them, which shouldn't be necessary. +------------------------------------------------------------ +revno: 114 +committer: imdano +branch nick: experimental +timestamp: Wed 2008-03-05 20:43:32 +0000 +message: + Fix formatting of wireless network entry information. +------------------------------------------------------------ +revno: 113 +committer: imdano +branch nick: experimental +timestamp: Wed 2008-03-05 15:30:22 +0000 +message: + Fixed a few more bugs caused by misnamed variables +------------------------------------------------------------ +revno: 112 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-03-04 20:39:53 +0000 +message: + Made a bunch of small logic improvements. + Fixed some remaining bugs from the gui.py refactoring. +------------------------------------------------------------ +revno: 111 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-03-04 14:06:04 +0000 +message: + Added support for putting interfaces up/down through the gui. +------------------------------------------------------------ +revno: 110 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-03-04 11:55:34 +0000 +message: + Renamed a bunch of variables in gui.py to comply to python conventions. + Fixed a few small bugs due to misnamed variables in gui.py and networking.py +------------------------------------------------------------ +revno: 109 +committer: imdano +branch nick: experimental +timestamp: Mon 2008-03-03 22:42:29 +0000 +message: + Refactored the NetworkEntry/PrettyNetworkEntry classes in order to fix a memory leak. PrettyNetwork entry classes are now merged with NetworkEntry classes. There is now a separate AdvancedSettingsDialog to handle the advanced settings for each network entry. + Fixed last-used wired autoconnect support, which had gotten removed. + Removed a debugging string from networking.py +------------------------------------------------------------ +revno: 108 +committer: compwiz18 +branch nick: experimental +timestamp: Mon 2008-03-03 06:08:45 +0000 +message: + Fixed a bug that wouldn't let wireless interfaces scan +------------------------------------------------------------ +revno: 107 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-03-01 19:45:45 +0000 +message: + Autoconnect method will now fallback to wireless if a wired attempt fails for any reason. +------------------------------------------------------------ +revno: 106 +committer: imdano +branch nick: experimental +timestamp: Sat 2008-03-01 00:59:52 +0000 +message: + Improved the authentication validation code. Instead of sleeping for an abitrary amount of time, then checking if authentication succeeded, it now repeatedly checks for a longer set amount of time. This way it is less likely to fail because it didn't wait long enough, but will usually finish faster. +------------------------------------------------------------ +revno: 105 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-02-29 22:14:32 +0000 +message: + Altered autoconnection code to fall back to wireless if wired fails because there is no default profile set. +------------------------------------------------------------ +revno: 104 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-02-29 15:20:51 +0000 +message: + Added wep-hex, wep-passphrase, eap-tls, wep-shared encryption templates + Removed wep template (its now called wep-hex). +------------------------------------------------------------ +revno: 103 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-02-29 14:16:21 +0000 +message: + Fixed crash bug in script configuration dialog when a network doesn't have script options written in the config file yet. + Refactored networking.py to not have to create a new wnettools interface every time a method gets called. Now it reuses the same one and makes changes to the iface name/driver as needed. + Refactored a few methods in wnettools.py to be organized more logically and reduce external program calls. + In experimental branch, added a few methods to networking/wnettools that can be used for enabling/disabling interfaces, as well as unloading/loading the driver associated with an interface. + Added a check for mii-tool/ethtool that gets run when wicd starts, so it can decide which to use to check for a wired connection. + Added a check for ip, to decide how to flush the routing tables. + Rewrote some of the DHCP client checking code. + Added a method (that's currently unused) to release a dhcp lease for each of the supported clients. +------------------------------------------------------------ +revno: 102 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-02-14 13:46:34 +0000 +message: + Fixed bug where preferences window sometimes wouldn't appear due to a problem with the wpacombobox. +------------------------------------------------------------ +revno: 101 +committer: imdano +branch nick: experimental +timestamp: Wed 2008-02-13 13:08:15 +0000 +message: + Added support for two more DHCP clients: pump and dhcpcd. + Added check when DHCP is run to determine what DHCP clients are available. + Fixed bug where sometimes wicd wouldn't reconnect automatically when a wired connection was lost. + Cleaned up a couple of comments. +------------------------------------------------------------ +revno: 100 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-02-12 19:40:18 +0000 +message: + Fixed bug where script changes weren't getting saved. + Added check to make sure encryption information is entered when it's required. +------------------------------------------------------------ +revno: 99 +committer: imdano +branch nick: experimental +timestamp: Mon 2008-02-11 14:55:29 +0000 +message: + Fixed a bug that prevented unsetting the "automatically connect to this network" option. + Some formatting/docstring cleanups. +------------------------------------------------------------ +revno: 98 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-02-05 13:46:42 +0000 +message: + Fixed bug where network entry settings weren't being saved correctly because of overloading the variable "type", which is a built in python function. + Cleaned up some formatting in gui.py and daemon.py + Fixed some bad daemon calls in the setting saving process. +------------------------------------------------------------ +revno: 97 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-01-29 21:03:19 +0000 +message: + Fixed bad except statement in misc.py. + Cleaned up formatting in gui.py. + Made glade template for preferences dialog and rewrote gui.py to use it instead of creating it explictly in the code. + Fixed a bunch indentation/whitespace problems. + Cleaned up a ton of formatting in daemon.py + Fixed a wired autoconnect bug. + Rewrote part of the connection monitoring code, further minimizing the number of external program calls, as well as number of dbus calls. + Added StatusInformation methods to daemon.py, to allow external apps to poll for the current connection status without making several dbus calls. + Fixed bad function call to GetDBMSignalStrength in daemon.py. +------------------------------------------------------------ +revno: 96 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-01-27 15:36:00 +0000 +message: + Got rid of extra call to ethtool that should only be done if using mii-tool fallback. +------------------------------------------------------------ +revno: 95 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-01-27 15:32:21 +0000 +message: + Fixed some malformed regular expressions. +------------------------------------------------------------ +revno: 94 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-01-25 14:12:32 +0000 +message: + Refactored several files (especially gui.py) to be more in line with python conventions and make the code easier to understand. + Added a bunch of docstrings. + Fixed an invalid function call in wnettools.py. +------------------------------------------------------------ +revno: 93 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-01-25 14:11:59 +0000 +message: + Refactored several files (especially gui.py) to be more in line with python conventions and make the code easier to understand. + Added a bunch of docstrings. + Fixed an invalid function call in wnettools.py. +------------------------------------------------------------ +revno: 92 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-01-25 09:23:50 +0000 +message: + Made IsValidIP method check that each ip octet is an integer < 255. + Added checks to the network entry settings menu to make sure that all the settings are valid. + Fixed global dns being set to True whenever static IP address were enabled for wireless networks. +------------------------------------------------------------ +revno: 91 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-01-24 14:28:20 +0000 +message: + Forgot a file in the last commit. +------------------------------------------------------------ +revno: 90 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-01-24 14:25:27 +0000 +message: + Simplified psk escape process. +------------------------------------------------------------ +revno: 89 +committer: imdano +branch nick: experimental +timestamp: Thu 2008-01-24 10:36:22 +0000 +message: + Committed patch from Sabin Iacob to sanitize a user's psk, to prevent possible parsing errors and security risks. +------------------------------------------------------------ +revno: 88 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-01-22 16:05:30 +0000 +message: + Refactored a few daemon methods from bring registered under the 'wireless' service to 'daemon'. + Fixed the wired autoconnect profile chooser, which was badly broken. + Added a check to GetPluggedIn() that makes sure that the wired interface is up before checking. If it's not, it tries to put it up. This is necessary because ethtool doesn't make this check for us, as mii-tool did. +------------------------------------------------------------ +revno: 87 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-01-22 09:55:42 +0000 +message: + Moved the advanced settings and script buttons into the main network entry expander. +------------------------------------------------------------ +revno: 86 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-01-22 09:24:23 +0000 +message: + Fixed dns entries not getting cleared from wireless network preferences when they should be + Added signal strength info to uppermost level of each wireless network entry in the GUI. +------------------------------------------------------------ +revno: 85 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-01-20 23:09:29 +0000 +message: + - Simplified main configuration loading code. This *might* break some old conf files, but should be easy to manually fix. + - Reworked GUI: Moved script button next to connect button, reduced size of both buttons, moved advanced settings from an expander to a dialog and put an advanced settings button next to scripts/connect buttons. + - When a wireless network has encryption enabled, "Secured" will no longer show up in the info for the network unless the encryption type can't be determined. + - Added support for detecting kill switch status (thanks to webograph for the inital patch). + - Reduced the number of calls to iwconfig during connection status updates (it is only called once per update now), which should lower cpu usage. + - Moved Autoreconnect methods from the wireless dbus service to the daemon dbus service. + - Added "Validating Authentication" status message during wireless connection process. + - Added support for disabling monitoring of connection status when computer is suspended, which gets rid of some error messages, eliminates occasional suspension failure, and reduces the odds that wicd will auto connect to a wireless network when a wired network is available. (Right now this feature is disabled, as it requires a script in /etc/acpi/suspend.d/, which can't be included with the current SVN layout.) +------------------------------------------------------------ +revno: 84 +committer: compwiz18 +branch nick: experimental +timestamp: Tue 2008-01-15 02:11:36 +0000 +message: + Updated comments in misc.py + Updated some GUI elements +------------------------------------------------------------ +revno: 83 +committer: imdano +branch nick: experimental +timestamp: Wed 2008-01-09 22:57:13 +0000 +message: + Fixed bad language key for "wired network" in wicd.py +------------------------------------------------------------ +revno: 82 +committer: imdano +branch nick: experimental +timestamp: Tue 2008-01-08 10:24:44 +0000 +message: + Updated wicd.glade to include a missing gtk.Dialog +------------------------------------------------------------ +revno: 81 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-01-06 21:20:15 +0000 +message: + A default wired profile is now created when wired-settings.conf is initially generated. +------------------------------------------------------------ +revno: 80 +committer: imdano +branch nick: experimental +timestamp: Sun 2008-01-06 13:55:23 +0000 +message: + Changed misc.Run to use subprocess.Popen instead of os.popen. Also altered Run to optionally return a pipe to the command run, instead of just the output. + The output of dhclient is now parsed by wicd and used to determine why the connection failed. + All the wpa_supplicant conf files will now generate a ctrl_interface, so that they can be accessed by wpa_cli. wpa_cli now is used by wicd to attempt to determine is wpa_supplicant authentication was successful. This is still experimental, and might have to be tweaked to work properly. + If wicd.py is started and the daemon isn't present, it will autolaunch it by calling launchdaemon.sh, instead of asking the user to start the daemon manually. + Cleaned up some comments, formatting, etc. + Probably a couple of other little bug fixes I'm forgetting. +------------------------------------------------------------ +revno: 79 +committer: imdano +branch nick: experimental +timestamp: Fri 2008-01-04 14:08:14 +0000 +message: + Fixed resizing causing the window to center itself. +------------------------------------------------------------ +revno: 78 +committer: imdano +branch nick: experimental +timestamp: Sat 2007-12-29 11:56:47 +0000 +message: + Scripts now can only be setup with root access and always run as root, instead of trying to run as the current user. + Possibly fixed problems with scripts not running when they should and/or leaving zombies. + Slightly reworked the GUI to make the new script system look nicer. + Removed the ability to set script information through built in daemon functions, it now has to be done by directly editing configuration files (which require root access to read/write). +------------------------------------------------------------ +revno: 77 +committer: imdano +branch nick: experimental +timestamp: Sat 2007-12-22 22:09:00 +0000 +message: + Make sure daemon alerts tray to change status during connection process. + Specify which network is being connected to in both the tray tooltip and gui statusbar + Clean up code in wicd.py. + Refactor Edgy/DapperTrayIcon class names to something less Ubuntu-specific. + Fix typo in EggTrayIcon that would keep gui from opening. +------------------------------------------------------------ +revno: 76 +committer: imdano +branch nick: experimental +timestamp: Wed 2007-12-19 22:35:07 +0000 +message: + Fixed cancelling a connection not working. + Stopped the gui status bar from updating while the gui is closed, which reduces CPU usage and should hopefully fix problems with hibernation not working while wicd was running. +------------------------------------------------------------ +revno: 75 +committer: imdano +branch nick: experimental +timestamp: Mon 2007-12-17 15:44:41 +0000 +message: + Fixed a bug that would sometimes cause the tray icon to not display the right connection state on startup. +------------------------------------------------------------ +revno: 74 +committer: compwiz18 +branch nick: experimental +timestamp: Mon 2007-12-17 15:22:04 +0000 +message: + * Fixed a couple more syntax errors +------------------------------------------------------------ +revno: 73 +committer: compwiz18 +branch nick: experimental +timestamp: Mon 2007-12-17 15:20:02 +0000 +message: + * Fixed indentation errors and syntax errors + * Fixed wicd.py so it starts properly + * Hid the status bar in gui.py when it is displayed via the tray icon +------------------------------------------------------------ +revno: 72 +committer: imdano +branch nick: experimental +timestamp: Mon 2007-12-17 15:17:00 +0000 +message: + Fixed some problems with tabs being used instead of 4 spaces. +------------------------------------------------------------ +revno: 71 +committer: imdano +branch nick: experimental +timestamp: Mon 2007-12-17 11:49:03 +0000 +message: + Fixed a bug (typo?) in daemon.py that would keep it from working correctly. +------------------------------------------------------------ +revno: 70 +committer: imdano +branch nick: experimental +timestamp: Mon 2007-12-17 11:42:16 +0000 +message: + Lowered minimum GUI height to 400. + Added support for the GUI to remember when its resized. +------------------------------------------------------------ +revno: 69 +committer: compwiz18 +branch nick: experimental +timestamp: Sun 2007-12-16 19:08:00 +0000 +message: + Applied pach in https://bugs.launchpad.net/wicd/+bug/175104 to fix signal strength issues, thanks Philip +------------------------------------------------------------ +revno: 68 +committer: imdano +branch nick: experimental +timestamp: Mon 2007-12-10 16:48:37 +0000 +message: + Moved autoreconnect code and connection status updates into the daemon. Daemon now sends D-Bus signals when status changes, which the tray listens for and updates icon/tooltip when received. +------------------------------------------------------------ +revno: 67 +committer: imdano +branch nick: experimental +timestamp: Tue 2007-12-04 12:02:14 +0000 +message: + Fix some indentation problems and turned off stdout/stderr redirection in wicd.py since it would break things. +------------------------------------------------------------ +revno: 66 +committer: imdano +branch nick: experimental +timestamp: Thu 2007-11-22 10:23:33 +0000 +message: + Adding peap-tkip template part 2 +------------------------------------------------------------ +revno: 65 +committer: imdano +branch nick: experimental +timestamp: Tue 2007-11-20 22:20:10 +0000 +message: + Fixed encoding problems that would cause wicd to crash if a network returned an essid with exotic characters. + Reduced log spam, and altered how logging gets done a little bit. + Cleaned up some comments, docstrings, etc. +------------------------------------------------------------ +revno: 64 +committer: imdano +branch nick: experimental +timestamp: Mon 2007-11-19 13:22:14 +0000 +message: + Fixed some problems with the tray icon running under gtk < 2.10. +------------------------------------------------------------ +revno: 63 +committer: imdano +branch nick: experimental +timestamp: Sun 2007-11-18 14:19:50 +0000 +message: + - Fixed a crash bug caused by dBm signal strength not being found correctly. + - Fixed a crash caused by an incorrectly named variable in wicd.py. +------------------------------------------------------------ +revno: 62 +committer: imdano +branch nick: experimental +timestamp: Sun 2007-11-18 01:37:16 +0000 +message: + * Removing files (all tray-related) that are no longer used. +------------------------------------------------------------ +revno: 61 +committer: imdano +branch nick: experimental +timestamp: Sun 2007-11-18 01:35:35 +0000 +message: + * Completely reworked the gui/tray system. gui.py and edgy/dapper/tray.py are now all run from the same wicd.py file. + * Added a connection_lost_counter to prevent the wicd frontend from trying to automatically reconnect too quickly if signal strength is briefly lost. + * Added some code to hopefully fix some of the dbus-related encoding problems caused by essids with weird characters. (Might still need work). + * The tray/gui will now show up in the process manager under the name wicd (along with the wicd icon), instead of just python. + * Added a GetCurrentInterface() method to the daemon that will eventually be used in the VPN plugin. + * Fixed a possible crash caused by signal strength not being returned correctly. + * Split the Wired Profile Chooser from the appGui class, so they are now called separately within wicd.py. When the profile chooser is called from the daemon, it sets a flag as well as sending a dbus signal, so the chooser will still launch if the wicd frontend isn't running yet. + * Added some docstrings, comments, etc. Probably a few other small changes I'm forgetting. +------------------------------------------------------------ +revno: 60 +committer: compwiz18 +branch nick: experimental +timestamp: Tue 2007-10-23 00:45:36 +0000 +message: + Fixed the typo in the LEAP template. +------------------------------------------------------------ +revno: 59 +committer: compwiz18 +branch nick: experimental +timestamp: Fri 2007-10-05 02:29:42 +0000 +message: + applied patch from bug https://bugs.launchpad.net/wicd/+bug/149318 + applied patch from bug https://bugs.launchpad.net/wicd/+bug/149322 + thanks Daniel +------------------------------------------------------------ +revno: 58 +committer: compwiz18 +branch nick: experimental +timestamp: Thu 2007-10-04 03:31:07 +0000 +message: + Added mhenze's patch to add last used wired profile +------------------------------------------------------------ +revno: 57 +committer: imdano +branch nick: experimental +timestamp: Thu 2007-09-20 13:11:43 +0000 +message: + Fixed more signal display issues + Added a "Connecting..." dialog to tray icon in experimental branch + Possibly fixed issue where GUI statusbar would still show up as connected when ethernet cable was unplugged. +------------------------------------------------------------ +revno: 56 +committer: imdano +branch nick: experimental +timestamp: Wed 2007-09-19 09:56:17 +0000 +message: + Fixed bug in signal strength display for ralink cards + Altered the way ralink network info gets handled during the connection process +------------------------------------------------------------ +revno: 55 +committer: compwiz18 +branch nick: experimental +timestamp: Tue 2007-09-04 02:43:25 +0000 +message: + fixed indentation problems +------------------------------------------------------------ +revno: 54 +committer: imdano +branch nick: experimental +timestamp: Fri 2007-08-31 08:19:13 +0000 +message: + Fixed bug where manually opened (not opened with the tray) gui.py would reopen when closed. +------------------------------------------------------------ +revno: 53 +committer: imdano +branch nick: experimental +timestamp: Wed 2007-08-29 18:49:02 +0000 +message: + Completely reorganized edgy.py + Changed the way wired profile chooser gets launched (now uses a dbus signal) + Fixed bug where launching gui.py through the tray sometimes left a zombie (uses a dbus signal) + Added a bunch of docstrings and changed formatting to follow python conventions + Added support for displaying signal strength in dBm instead of a percentage + Added some print statements during the ad-hoc connection process + Started work on a way to autoconnect to a hidden network (not done or working yet) +------------------------------------------------------------ +revno: 52 +committer: imdano +branch nick: experimental +timestamp: Fri 2007-08-17 06:13:08 +0000 +message: + Reverted an accidental change to networking.py that undid a bug fix +------------------------------------------------------------ +revno: 51 +committer: compwiz18 +branch nick: experimental +timestamp: Fri 2007-08-17 04:36:16 +0000 +message: + fixed the tray icon +------------------------------------------------------------ +revno: 50 +committer: imdano +branch nick: experimental +timestamp: Thu 2007-08-16 12:18:03 +0000 +message: + Changed script execution behavior to fork before running. Causes more reliable execution but can leave zombies. +------------------------------------------------------------ +revno: 49 +committer: compwiz18 +branch nick: experimental +timestamp: Thu 2007-08-16 05:55:45 +0000 +message: + fixed a couple of bugs: + + wnettools.py: DetectWirelessInterfaces() didn't return the wireless interface + daemon.py: GetGlobalDNSAddresses() now returns a blank string instead of None for blank addresses; None could not be sent over dbus +------------------------------------------------------------ +revno: 48 +committer: metrics +branch nick: experimental +timestamp: Thu 2007-08-16 01:53:13 +0000 +message: + Fix up some issues spotted by pychecker. +------------------------------------------------------------ +revno: 47 +committer: metrics +branch nick: experimental +timestamp: Thu 2007-08-16 01:07:26 +0000 +message: + Split the networking module, moving the common tasks into wnettools.py + + By splitting the common tasks performed by the networking module out + into a separate set of classes, it is possible to reduce code + duplication and improve the structure of the networking module. + + The wnettools module now performs _almost_ all the actual commands that + control the network interfaces, splitting it from the actual connection + logic contained in the networking module. Splitting these two tasks also + allows for tool changes to be made in a central location, rather than + spread throughout the networking.py file. +------------------------------------------------------------ +revno: 46 +committer: imdano +branch nick: experimental +timestamp: Wed 2007-08-15 07:25:10 +0000 +message: + Added a bunch of bug fixes from the experimental branch to the testing branch. + Added disconnect script feature and executing script in usermode feature to testing branch +------------------------------------------------------------ +revno: 45 +committer: imdano +branch nick: experimental +timestamp: Tue 2007-08-14 17:02:38 +0000 +message: + Fixed the typo in networking.py correctly this time :) + Corrected the version number displayed in usage() +------------------------------------------------------------ +revno: 44 +committer: imdano +branch nick: experimental +timestamp: Tue 2007-08-14 16:01:30 +0000 +message: + Improved the behavior of threading in networking.py when an error occurs. + Fixed typo in the wpa_supplicant string in networking.py. + Changed formatting in dapper.py, edgy.py, and networking.py to conform closer to python coding conventions (and hopefully improve readability in general) +------------------------------------------------------------ +revno: 43 +committer: metrics +branch nick: experimental +timestamp: Sun 2007-08-12 03:31:04 +0000 +message: + Refactor daemon.py to handle command line arguments. + + Move the old module code in daemon.py into a main() function, splitting + off the daemonization into daemonize() function. Also add correct + parsing of command line arguments to allow disabling of stderr and + stdout redirection, daemonizing and auto-connect. + + Tidy up start of file including correct GPL license pre-amble and a + short description of the wicd daemon module. +------------------------------------------------------------ +revno: 42 +committer: metrics +branch nick: experimental +timestamp: Sun 2007-08-12 01:36:49 +0000 +message: + Convert FlushWriter into LogWriter and optimise log writing. + + FlushWriter looped through all the characters provided, writing them one + at a time. This is not strictly necessary, so modify the algorithm to + use a smart substitution and keep the timestamps correct. Name change to + better match its behaviour. +------------------------------------------------------------ +revno: 41 +committer: metrics +branch nick: experimental +timestamp: Sun 2007-08-12 00:30:01 +0000 +message: + Centralise path configuration into a single file. + + Path configuration was distributed throughout wicd, making it difficult + to move around project files. Centralise the configuration into + wpath.py. +------------------------------------------------------------ +revno: 40 +committer: imdano +branch nick: experimental +timestamp: Fri 2007-08-10 07:59:36 +0000 +message: + Added disconnection script + Changed auto-reconnection behavior slightly to prevent possible hanging issues + Changed/Added some comments +------------------------------------------------------------ +revno: 39 +committer: imdano +branch nick: experimental +timestamp: Sat 2007-08-04 19:09:05 +0000 +message: + Added support for displaying correct network info in drivers using some non-standard display info. +------------------------------------------------------------ +revno: 38 +committer: imdano +branch nick: experimental +timestamp: Wed 2007-08-01 09:31:43 +0000 +message: + Changed script execution method so that scripts are always run in usermode. + Removed autostarting daemon code so that script execution would work properly. + Added channel display support for cards that only get frequency info in 'iwlist scan'. + Changed autoconnect behavior to fix a bug where dbus would crash if connecting was taking too long. + Changed/added some comments. +------------------------------------------------------------ +revno: 37 +committer: imdano +branch nick: experimental +timestamp: Sun 2007-07-29 08:17:00 +0000 +message: + made get debugmode function return an int +------------------------------------------------------------ +revno: 36 +committer: imdano +branch nick: experimental +timestamp: Sat 2007-07-28 11:20:38 +0000 +message: + added a debugmode check to dapper.py +------------------------------------------------------------ +revno: 35 +committer: imdano +branch nick: experimental +timestamp: Sat 2007-07-28 11:19:18 +0000 +message: + fixed a bug in the open/close gui function in dapper.py + fixed a bug in getdebugmode function in daemon.py +------------------------------------------------------------ +revno: 34 +committer: imdano +branch nick: experimental +timestamp: Fri 2007-07-27 18:20:51 +0000 +message: + Rewrote dapper.py to act just like edgy.py (needs to be tested), changed some gui behavior, fixed version numbers in experimental/testing daemon.py +------------------------------------------------------------ +revno: 33 +committer: imdano +branch nick: experimental +timestamp: Wed 2007-07-25 17:59:31 +0000 +message: + Updated autoconnect.py to reflect changes to daemon +------------------------------------------------------------ +revno: 32 +committer: imdano +branch nick: experimental +timestamp: Wed 2007-07-25 09:04:39 +0000 +message: + Fixed typo in the testing release, added ralink correct signal strength info to experimental release, fixed wired connection bug in experimental release +------------------------------------------------------------ +revno: 31 +committer: imdano +branch nick: experimental +timestamp: Tue 2007-07-24 15:30:59 +0000 +message: + fixed a typo +------------------------------------------------------------ +revno: 30 +committer: compwiz18 +branch nick: experimental +timestamp: Tue 2007-07-24 06:31:07 +0000 +message: + daemon will now fork +------------------------------------------------------------ +revno: 29 +committer: compwiz18 +branch nick: experimental +timestamp: Tue 2007-07-24 06:06:27 +0000 +message: + updates and bug fixes and all that fun stuff +------------------------------------------------------------ +revno: 28 +committer: imdano +branch nick: experimental +timestamp: Tue 2007-07-24 05:05:15 +0000 +message: + Added myself as a co-author :) +------------------------------------------------------------ +revno: 27 +committer: imdano +branch nick: experimental +timestamp: Mon 2007-07-23 07:05:05 +0000 +message: + Added wired auto-connect profile chooser, fixed some bugs in the ralink legacy connection code, reorganized edgy.py and fixed some bugs in it, probably a few other things too +------------------------------------------------------------ +revno: 26 +committer: imdano +branch nick: experimental +timestamp: Tue 2007-07-17 08:03:16 +0000 +message: + fixed bug where wired icon wouldn't change if cable became unplugged, fixed yet another indentation screw up +------------------------------------------------------------ +revno: 25 +committer: imdano +branch nick: experimental +timestamp: Tue 2007-07-17 07:33:18 +0000 +message: + improved autoreconnect code +------------------------------------------------------------ +revno: 24 +committer: imdano +branch nick: experimental +timestamp: Tue 2007-07-17 07:19:10 +0000 +message: + fixed a screw up in my indentation in edgy.py, changed tabs to 4 spaces everywhere it wasn't already +------------------------------------------------------------ +revno: 23 +committer: compwiz18 +branch nick: experimental +timestamp: Mon 2007-07-16 09:23:18 +0000 +message: + daemon will now daemonize +------------------------------------------------------------ +revno: 22 +committer: compwiz18 +branch nick: experimental +timestamp: Mon 2007-07-16 08:35:07 +0000 +message: + fixed global DNS +------------------------------------------------------------ +revno: 21 +committer: imdano +branch nick: experimental +timestamp: Mon 2007-07-16 06:41:34 +0000 +message: + removed conflict resolution info that would probably cause syntax errors +------------------------------------------------------------ +revno: 20 +committer: imdano +branch nick: experimental +timestamp: Mon 2007-07-16 06:34:23 +0000 +message: + Added support for ralink legacy cards, implemented a debug mode option, swapped order that autoconnect uses, fixed some indentation issues, changed/added some comments +------------------------------------------------------------ +revno: 19 +committer: compwiz18 +branch nick: experimental +timestamp: Mon 2007-07-16 06:16:52 +0000 +message: + added global dns options (not quite working) +------------------------------------------------------------ +revno: 18 +committer: imdano +branch nick: experimental +timestamp: Wed 2007-07-11 12:47:44 +0000 +message: + Optimized autoconnect for wired code (should be more log friendly) +------------------------------------------------------------ +revno: 17 +committer: imdano +branch nick: experimental +timestamp: Tue 2007-07-10 14:32:45 +0000 +message: + Fixed bug caused by wired/wireless daemons using the same function names +------------------------------------------------------------ +revno: 16 +committer: compwiz18 +branch nick: experimental +timestamp: Tue 2007-07-10 05:39:00 +0000 +message: + syntax error fixed +------------------------------------------------------------ +revno: 15 +committer: imdano +branch nick: experimental +timestamp: Mon 2007-07-09 14:41:14 +0000 +message: + Added script execution support, added autoconnect to wired network support, created a default wired network system to allow autoconnection +------------------------------------------------------------ +revno: 14 +committer: imdano +branch nick: experimental +timestamp: Mon 2007-07-09 09:38:45 +0000 +message: + Removed sleep time in autoreconnect in stable (it would sometimes make it impossible to open the GUI), removed sleep time and altered autoreconnect behavior in experimental. (Try #3) +------------------------------------------------------------ +revno: 13 +committer: imdano +branch nick: experimental +timestamp: Mon 2007-07-09 09:27:13 +0000 +message: + Removed sleep time in autoreconnect in stable (it would sometimes make it impossible to open the GUI), removed sleep time and altered autoreconnect behavior in experimental. +------------------------------------------------------------ +revno: 12 +committer: imdano +branch nick: experimental +timestamp: Mon 2007-07-09 09:21:42 +0000 +message: + Removed sleep time in autoreconnect in stable (it would sometimes make it impossible to open the GUI), removed sleep time and altered autoreconnect behavior in experimental. +------------------------------------------------------------ +revno: 11 +committer: compwiz18 +branch nick: experimental +timestamp: Sun 2007-07-08 20:12:44 +0000 +message: + changed version number +------------------------------------------------------------ +revno: 10 +committer: imdano +branch nick: experimental +timestamp: Sun 2007-07-08 10:36:47 +0000 +message: + Added DNS fix to wired class +------------------------------------------------------------ +revno: 9 +committer: imdano +branch nick: experimental +timestamp: Sun 2007-07-08 10:31:48 +0000 +message: + Fixed a static DNS bug and added some comments / fixed some typos +------------------------------------------------------------ +revno: 8 +committer: imdano +branch nick: experimental +timestamp: Sun 2007-07-08 10:31:28 +0000 +message: + Fixed a static DNS bug and added some comments / fixed some typos +------------------------------------------------------------ +revno: 7 +committer: imdano +branch nick: experimental +timestamp: Sun 2007-07-08 08:34:42 +0000 +message: + shortened sleep time when returning from hibernation +------------------------------------------------------------ +revno: 6 +committer: imdano +branch nick: experimental +timestamp: Sat 2007-07-07 20:31:45 +0000 +message: + some minor adjustments and bug fixes +------------------------------------------------------------ +revno: 5 +committer: compwiz18 +branch nick: experimental +timestamp: Sat 2007-07-07 20:09:37 +0000 +message: + Added ICS support, but commented it out so we can release +------------------------------------------------------------ +revno: 4 +committer: compwiz18 +branch nick: experimental +timestamp: Sat 2007-07-07 08:06:14 +0000 +message: + string table updated +------------------------------------------------------------ +revno: 3 +committer: imdano +branch nick: experimental +timestamp: Thu 2007-07-05 06:53:57 +0000 +message: + Fixed a typo, added note that only WEP can be used for Ad-hoc encryption +------------------------------------------------------------ +revno: 2 +committer: imdano +branch nick: experimental +timestamp: Thu 2007-07-05 05:30:09 +0000 +message: + Fixed bug where tray wouldn't load when it automatically opened the daemon + Fixed some typos +------------------------------------------------------------ +revno: 1 +committer: compwiz18 +branch nick: stable +timestamp: Wed 2007-07-04 14:51:57 +0000 +message: + trying to fix diff --git a/INSTALL b/INSTALL index e563e4b..9c3a257 100644 --- a/INSTALL +++ b/INSTALL @@ -1,18 +1,22 @@ Installation 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 (obviously) and pygtk + 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) - 8. pm-utils (optional for suspend/resume integration - needs version 1.2.4+) + 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. -If you are installing from a bzr pull or beta/rc tarball and you want +If you are installing from a bzr pull and you want the native language translations, first run this: + python setup.py update_translations_py python setup.py get_translations You will not need to do this if you're installing from a release tarball. diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..887143b --- /dev/null +++ b/NEWS @@ -0,0 +1,49 @@ +Wicd 1.6.0 Branch +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) + diff --git a/curses/README b/curses/README index 3e5df9d..29b21c1 100644 --- a/curses/README +++ b/curses/README @@ -14,15 +14,15 @@ All features that I plan on implementing (that are not mentioned above) are listed the TODO file in this same directory. If you want any other features, ask me. I try to be on the #wicd Freenode IRC channel most of the time. -Controls: +Controls (most of these should be viewable in wicd-curses itself): F5 : refresh wireless networks -F8 or Q or q: quit +F8 Q q : quit D : disconnect from all active networks ESC : if connecting to a network, stop doing so -ENTER : Attempt connection to selected network +ENTER C : Attempt connection to selected network P : Display preferences dialog -C : Display network configuration for selected network +right arrow : Display network configuration for selected network A : Display "About" dialog I : Raise the "Scan for hidden networks" dialog H or h or ? : Raise help dialog @@ -32,8 +32,8 @@ F2 : Rename selected wired network profile (from the wired ComboBox) O : Raise ad-hoc network dialog IN DIALOGS (Meta usually is "Alt"): -ESC or Q: Quit dialog without saving information (if present) -Meta+Left/Right: Change tabs Left/Right (if tabs present) +ESC or Q or q: Quit dialog without saving information (if present) +Meta+[ / Meta+]: Change tabs Left/Right (if tabs present) Meta+Enter : Quit dialog and save information FAQ (WIP): diff --git a/curses/TODO b/curses/TODO index 9861ba4..fb7502c 100644 --- a/curses/TODO +++ b/curses/TODO @@ -1,6 +1,5 @@ Things to do (in no particular order): -* Implement a keyhandler function for the overall frame - * Make keystrokes customizable +* Make keystrokes customizable (Probably not going to happen) * Make color schemes customizable * Perform a mass code cleanup diff --git a/curses/configscript_curses.py b/curses/configscript_curses.py index 46f1e60..a93ad99 100755 --- a/curses/configscript_curses.py +++ b/curses/configscript_curses.py @@ -38,7 +38,8 @@ language = {} language['configure_scripts'] = _("Configure Scripts") language['before_script'] = _("Pre-connection Script") language['after_script'] = _("Post-connection Script") -language['disconnect_script'] = _("Disconnection Script") +language['pre_disconnect_script'] = _("Pre-disconnection Script") +language['post_disconnect_script'] = _("Post-disconnection Script") def main(argv): global ui,frame @@ -62,16 +63,19 @@ def main(argv): blank = urwid.Text('') pre_entry_t = ('body',language['before_script']+': ') post_entry_t = ('body',language['after_script']+': ') - disconnect_entry_t = ('body',language['disconnect_script']+': ') + pre_disconnect_entry_t = ('body',language['pre_disconnect_script']+': ') + post_disconnect_entry_t = ('body',language['post_disconnect_script']+': ') - global pre_entry,post_entry,disconnect_entry + global pre_entry,post_entry,pre_disconnect_entry,post_disconnect_entry pre_entry = urwid.AttrWrap(urwid.Edit(pre_entry_t, none_to_blank(script_info.get('pre_entry'))),'editbx','editfc' ) post_entry = urwid.AttrWrap(urwid.Edit(post_entry_t, none_to_blank(script_info.get('post_entry'))),'editbx','editfc' ) - disconnect_entry = urwid.AttrWrap(urwid.Edit(disconnect_entry_t, - none_to_blank(script_info.get('disconnect_entry'))),'editbx','editfc' ) + pre_disconnect_entry = urwid.AttrWrap(urwid.Edit(pre_disconnect_entry_t, + none_to_blank(script_info.get('pre_disconnect_entry'))),'editbx','editfc' ) + post_disconnect_entry = urwid.AttrWrap(urwid.Edit(post_disconnect_entry_t, + none_to_blank(script_info.get('post_disconnect_entry'))),'editbx','editfc' ) # The buttons ok_button = urwid.AttrWrap(urwid.Button('OK',ok_callback),'body','focus') @@ -82,7 +86,8 @@ def main(argv): lbox = urwid.Pile([('fixed',2,urwid.Filler(pre_entry)), #('fixed',urwid.Filler(blank),1), ('fixed',2,urwid.Filler(post_entry)), - ('fixed',2,urwid.Filler(disconnect_entry)), + ('fixed',2,urwid.Filler(pre_disconnect_entry)), + ('fixed',2,urwid.Filler(post_disconnect_entry)), #blank,blank,blank,blank,blank, urwid.Filler(button_cols,'bottom') ]) @@ -92,7 +97,8 @@ def main(argv): if result == True: script_info["pre_entry"] = blank_to_none(pre_entry.get_edit_text()) script_info["post_entry"] = blank_to_none(post_entry.get_edit_text()) - script_info["disconnect_entry"] = blank_to_none(disconnect_entry.get_edit_text()) + script_info["pre_disconnect_entry"] = blank_to_none(pre_disconnect_entry.get_edit_text()) + script_info["post_disconnect_entry"] = blank_to_none(post_disconnect_entry.get_edit_text()) write_scripts(network, network_type, script_info) OK_PRESSED = False diff --git a/curses/curses_misc.py b/curses/curses_misc.py index e5079c7..c2159ff 100644 --- a/curses/curses_misc.py +++ b/curses/curses_misc.py @@ -33,10 +33,6 @@ def error(ui,parent,message): dialog = TextDialog(message,6,40,('important',"ERROR")) return dialog.run(ui,parent) -# My savior. :-) -# Although I could have made this myself pretty easily, just want to give credit -# where it's due. -# http://excess.org/urwid/browser/contrib/trunk/rbreu_filechooser.py class SelText(urwid.Text): """A selectable text widget. See urwid.Text.""" @@ -49,7 +45,12 @@ class SelText(urwid.Text): """Don't handle any keys.""" return key -# This class is annoying. ^_^ +# ListBox that can't be selected. +class NSelListBox(urwid.ListBox): + def selectable(self): + return False + +# This class is annoying. :/ class DynWrap(urwid.AttrWrap): """ Makes an object have mutable selectivity. Attributes will change like @@ -102,6 +103,12 @@ class DynIntEdit(DynWrap): edit = urwid.IntEdit(caption,edit_text) self.__super.__init__(edit,sensitive,attrs,focus_attr) +class DynRadioButton(DynWrap): + def __init__(self,group,label,state='first True',on_state_change=None, user_data=None, sensitive=True, attrs=('body','editnfc'),focus_attr='body'): + #caption = ('editcp',caption + ':') + button = urwid.RadioButton(group,label,state,on_state_change,user_data) + self.__super.__init__(button,sensitive,attrs,focus_attr) + class MaskingEditException(Exception): pass @@ -123,6 +130,8 @@ class MaskingEdit(urwid.Edit): self.mask_char = mask_char self.__super.__init__(caption,edit_text,multiline,align,wrap,allow_tab,edit_pos,layout) + def get_caption(self): + return self.caption def get_mask_mode(self): return self.mask_mode def set_mask_mode(self,mode): @@ -136,7 +145,8 @@ class MaskingEdit(urwid.Edit): Render edit widget and return canvas. Include cursor when in focus. """ - # If we aren't masking anything ATM, then act like an Edit. No problems. + # If we aren't masking anything ATM, then act like an Edit. + # No problems. if self.mask_mode == "off" or (self.mask_mode == 'no_focus' and focus == True): canv = self.__super.render((maxcol,),focus) # The cache messes this thing up, because I am totally changing what @@ -165,9 +175,10 @@ class TabColumns(urwid.WidgetWrap): attr = normal attributes attrsel = attribute when active """ - def __init__(self,tab_str,tab_wid,title,bottom_part,attr=('body','focus'), + # FIXME Make the bottom_part optional + def __init__(self,tab_str,tab_wid,title,bottom_part=None,attr=('body','focus'), attrsel='tab active', attrtitle='header'): - self.bottom_part = bottom_part + #self.bottom_part = bottom_part #title_wid = urwid.Text((attrtitle,title),align='right') column_list = [] for w in tab_str: @@ -189,7 +200,7 @@ class TabColumns(urwid.WidgetWrap): self.pile = urwid.Pile([ ('fixed',1,urwid.Filler(self.columns,'top')), urwid.Filler(lbox,'top',height=('relative',99)), - ('fixed',1,urwid.Filler(self.bottom_part,'bottom')) + #('fixed',1,urwid.Filler(self.bottom_part,'bottom')) ]) if not firstrun: self.frame.set_body(self.pile) @@ -199,12 +210,13 @@ class TabColumns(urwid.WidgetWrap): return True def keypress(self,size,key): - self._w.keypress(size,key) - if key == "meta left" or key == "meta right": + if key == "meta [" or key == "meta ]": self._w.get_body().set_focus(0) - self.keypress(size,key[5:]) + newK = 'left' if key[-1] == '[' else 'right' + self.keypress(size,newK) self._w.get_body().set_focus(1) else: + key = self._w.keypress(size,key) wid = self.pile.get_focus().get_body() if wid == self.columns: # lw = self.listbox.body @@ -213,8 +225,20 @@ class TabColumns(urwid.WidgetWrap): self.columns.get_focus().set_attr('tab active') self.active_tab = self.columns.get_focus() self.gen_pile(self.tab_map[self.active_tab]) - return key + + return key # self.listbox.body = lw + def mouse_event(self,size,event,button,x,y,focus): + wid = self.pile.get_focus().get_body() + if wid == self.columns: + self.active_tab.set_attr('body') + + self._w.mouse_event(size,event,button,x,y,focus) + if wid == self.columns: + self.active_tab.set_attr('body') + self.columns.get_focus().set_attr('tab active') + self.active_tab = self.columns.get_focus() + self.gen_pile(self.tab_map[self.active_tab]) ### Combo box code begins here @@ -225,7 +249,7 @@ class ComboBoxException(Exception): # I based this off of the code found here: # http://excess.org/urwid/browser/contrib/trunk/rbreu_menus.py # This is a hack/kludge. It isn't without quirks, but it more or less works. -# We need to wait for changes in urwid's Canvas controls before we can actually +# We need to wait for changes in urwid's Canvas API before we can actually # make a real ComboBox. class ComboBox(urwid.WidgetWrap): """A ComboBox of text objects""" @@ -296,6 +320,7 @@ class ComboBox(urwid.WidgetWrap): user_args : user_args in the callback """ + self.DOWN_ARROW = ' vvv' self.label = urwid.Text(label) self.attrs = attrs self.focus_attr = focus_attr @@ -304,9 +329,8 @@ class ComboBox(urwid.WidgetWrap): str,trash = self.label.get_text() self.overlay = None - #w,sensitive=True,attrs=('editbx','editnfc'),focus_attr='editfc') - self.cbox = DynWrap(SelText(' vvv'),attrs=attrs,focus_attr=focus_attr) - # Unicode will kill me sooner or later. ^_^ + self.cbox = DynWrap(SelText(self.DOWN_ARROW),attrs=attrs,focus_attr=focus_attr) + # Unicode will kill me sooner or later. if label != '': w = urwid.Columns([('fixed',len(str),self.label),self.cbox],dividechars=1) else: @@ -315,10 +339,9 @@ class ComboBox(urwid.WidgetWrap): # We need this to pick our keypresses self.use_enter = use_enter - # The Focus + self.focus = focus - # The callback and friends self.callback = callback self.user_args = user_args @@ -331,7 +354,7 @@ class ComboBox(urwid.WidgetWrap): def set_focus(self,index): self.focus = index - self.cbox.set_w(SelText(self.list[index]+' vvv')) + self.cbox.set_w(SelText(self.list[index]+self.DOWN_ARROW)) if self.overlay: self.overlay._listbox.set_focus(index) @@ -340,8 +363,7 @@ class ComboBox(urwid.WidgetWrap): def build_combobox(self,parent,ui,row): str,trash = self.label.get_text() - - self.cbox = DynWrap(SelText([self.list[self.focus]+' vvv']), + self.cbox = DynWrap(SelText([self.list[self.focus]+self.DOWN_ARROW]), attrs=self.attrs,focus_attr=self.focus_attr) if str != '': w = urwid.Columns([('fixed',len(str),self.label),self.cbox], @@ -414,11 +436,6 @@ class Dialog2(urwid.WidgetWrap): urwid.Divider()] ) w = self.frame self.view = w - - # pad area around listbox - #w = urwid.Padding(w, ('fixed left',2), ('fixed right',2)) - #w = urwid.Filler(w, ('fixed top',1), ('fixed bottom',1)) - #w = urwid.AttrWrap(w, 'body') # buttons: tuple of name,exitcode def add_buttons(self, buttons): @@ -438,7 +455,8 @@ class Dialog2(urwid.WidgetWrap): def run(self,ui,parent): ui.set_mouse_tracking() size = ui.get_cols_rows() - overlay = urwid.Overlay(urwid.LineBox(self.view), parent, 'center', self.width, + overlay = urwid.Overlay(urwid.LineBox(self.view), + parent, 'center', self.width, 'middle', self.height) try: while True: @@ -474,8 +492,6 @@ class Dialog2(urwid.WidgetWrap): class TextDialog(Dialog2): def __init__(self, text, height, width, header=None,align='left'): l = [urwid.Text(text)] - #for line in text: - # l.append( urwid.Text( line,align=align)) body = urwid.ListBox(l) body = urwid.AttrWrap(body, 'body') @@ -512,3 +528,83 @@ class InputDialog(Dialog2): def on_exit(self, exitcode): return exitcode, self.edit.get_edit_text() + + +class ClickCols(urwid.WidgetWrap): + def __init__(self,items,callback=None,args=None): + cols = urwid.Columns(items) + self.__super.__init__(cols) + self.callback = callback + self.args = args + def mouse_event(self,size,event,button,x,y,focus): + if event == "mouse press": + # The keypress dealie in wicd-curses.py expects a list of keystrokes + self.callback([self.args]) + +# htop-style menu menu-bar on the bottom of the screen +class OptCols(urwid.WidgetWrap): + # tuples = [(key,desc)], on_event gets passed a key + # attrs = (attr_key,attr_desc) + # handler = function passed the key of the "button" pressed + # mentions of 'left' and right will be converted to <- and -> respectively + def __init__(self,tuples,handler,attrs=('body','infobar'),debug=False): + # Find the longest string. Keys for this bar should be no greater than + # 2 characters long (e.g., -> for left) + #maxlen = 6 + #for i in tuples: + # newmax = len(i[0])+len(i[1]) + # if newmax > maxlen: + # maxlen = newmax + + # Construct the texts + textList = [] + i = 0 + # callbacks map the text contents to its assigned callback. + self.callbacks = [] + for cmd in tuples: + splitcmd = cmd[0].split() + key = '' + for part in splitcmd: + if part == 'ctrl': + key+='Ctrl+' + elif part == 'meta': + # If anyone has a problem with this, they can bother me + # about it. + key+='Alt+' + else: + if part == 'left': + key += '<-' + elif part == 'right': + key += '->' + elif part == 'esc': + key += 'ESC' + elif part == 'enter': + key += 'Enter' + else: + key += part + + if debug: + callback = self.debugClick + args = cmd[1] + else: + callback = handler + args = cmd[0] + #self.callbacks.append(cmd[2]) + col = ClickCols([ + ('fixed',len(key)+1,urwid.Text((attrs[0],key+':')) ), + urwid.AttrWrap(urwid.Text(cmd[1]),attrs[1])], + callback,args) + textList.append(col) + i+=1 + if debug: + self.debug = urwid.Text("DEBUG_MODE") + textList.append(('fixed',10,self.debug)) + + cols = urwid.Columns(textList) + self.__super.__init__(cols) + def debugClick(self,args): + self.debug.set_text(args) + + def mouse_event(self,size,event,button,x,y,focus): + # Widgets are evenly long (as of current), so... + return self._w.mouse_event(size,event,button,x,y,focus) diff --git a/curses/netentry_curses.py b/curses/netentry_curses.py index 4e9586e..b74eec4 100644 --- a/curses/netentry_curses.py +++ b/curses/netentry_curses.py @@ -62,17 +62,17 @@ class AdvancedSettingsDialog(urwid.WidgetWrap): ok_t = 'OK' self.static_ip_cb = urwid.CheckBox(static_ip_t, - on_state_change=self.static_ip_set_state) + on_state_change=self.static_ip_toggle) self.ip_edit =DynWrap(urwid.Edit(ip_t),False) self.netmask_edit=DynWrap(urwid.Edit(netmask_t),False) self.gateway_edit=DynWrap(urwid.Edit(gateway_t),False) - self.static_dns_cb = urwid.CheckBox(use_static_dns_t, - on_state_change=self.dns_toggle) + self.static_dns_cb = DynWrap(urwid.CheckBox(use_static_dns_t, + on_state_change=self.dns_toggle),True,('body','editnfc'),None) self.global_dns_cb = DynWrap(urwid.CheckBox(use_global_dns_t, on_state_change=self.dns_toggle),False,('body','editnfc'),None) - checkb_cols = urwid.Columns([self.static_dns_cb, + self.checkb_cols = urwid.Columns([self.static_dns_cb, self.global_dns_cb]) self.dns_dom_edit = DynWrap(urwid.Edit(dns_dom_t) ,False) self.search_dom_edit = DynWrap(urwid.Edit(search_dom_t),False) @@ -82,19 +82,12 @@ class AdvancedSettingsDialog(urwid.WidgetWrap): _blank = urwid.Text('') - # Buttons. These need to be added to the list in superclasses. - self.OK_PRESSED= False - self.CANCEL_PRESSED = False - self.ok_button = urwid.AttrWrap(urwid.Button('OK',self.ok_callback),'body','focus') - self.cancel_button = urwid.AttrWrap(urwid.Button('Cancel',self.cancel_callback),'body','focus') - self.button_cols = urwid.Columns([self.ok_button,self.cancel_button]) - walker = urwid.SimpleListWalker([self.static_ip_cb, self.ip_edit, self.netmask_edit, self.gateway_edit, _blank, - checkb_cols, + self.checkb_cols, self.dns_dom_edit,self.search_dom_edit, self.dns1,self.dns2,self.dns3 ]) @@ -103,22 +96,22 @@ class AdvancedSettingsDialog(urwid.WidgetWrap): self._listbox = urwid.ListBox(walker) #self._frame = urwid.Frame(self._listbox) - self._frame = urwid.Frame(self._listbox,footer=self.button_cols) + self._frame = urwid.Frame(self._listbox) self.__super.__init__(self._frame) - - # Button callbacks - def ok_callback(self,button_object,user_data=None): - self.OK_PRESSED = True - def cancel_callback(self,button_object,user_data=None): - self.CANCEL_PRESSED = True - - def static_ip_set_state(self,checkb,new_state,user_data=None): + def static_ip_toggle(self,checkb,new_state,user_data=None): for w in [ self.ip_edit,self.netmask_edit,self.gateway_edit ]: w.set_sensitive(new_state) + self.static_dns_cb.set_state(new_state) + self.static_dns_cb.set_sensitive(not new_state) + if new_state: + self.checkb_cols.set_focus(self.global_dns_cb) + else: + self.checkb_cols.set_focus(self.static_dns_cb) + def dns_toggle(self,checkb,new_state,user_data=None): - if checkb == self.static_dns_cb: + if checkb == self.static_dns_cb.get_w(): for w in [ self.dns_dom_edit,self.search_dom_edit, self.dns1,self.dns2,self.dns3 ]: w.set_sensitive(new_state) @@ -147,11 +140,11 @@ class AdvancedSettingsDialog(urwid.WidgetWrap): not self.global_dns_cb.get_state(): self.set_net_prop('use_static_dns', True) self.set_net_prop('use_global_dns', False) - self.set_net_prop('dns_domain', noneToString(self.dns_dom_edit.get_text())) - self.set_net_prop("search_domain", noneToString(self.search_dom_edit.get_text())) - self.set_net_prop("dns1", noneToString(self.dns1.get_text())) - self.set_net_prop("dns2", noneToString(self.dns2.get_text())) - self.set_net_prop("dns3", noneToString(self.dns3.get_text())) + self.set_net_prop('dns_domain', noneToString(self.dns_dom_edit.get_edit_text())) + self.set_net_prop("search_domain", noneToString(self.search_dom_edit.get_edit_text())) + self.set_net_prop("dns1", noneToString(self.dns1.get_edit_text())) + self.set_net_prop("dns2", noneToString(self.dns2.get_edit_text())) + self.set_net_prop("dns3", noneToString(self.dns3.get_edit_text())) elif self.static_dns_cb.get_state() and \ self.global_dns_cb.get_state(): self.set_net_prop('use_static_dns', True) @@ -164,54 +157,9 @@ class AdvancedSettingsDialog(urwid.WidgetWrap): self.set_net_prop("dns1", '') self.set_net_prop("dns2", '') self.set_net_prop("dns3", '') - - def prerun(self,ui,dim,display): + # Prevent comboboxes from dying. + def ready_widgets(self,ui,body): pass - def run(self,ui,dim,display): - self.ui = ui - self.parent = display - width,height = ui.get_cols_rows() - - self.overlay = urwid.Overlay(self, display, ('fixed left', 0),width - , ('fixed top',1), height-3) - self.prerun(ui,dim,display) - #self.ready_comboboxes(ui,overlay) - - keys = True - while True: - if keys: - ui.draw_screen(dim, self.overlay.render(dim, True)) - keys = ui.get_input() - - for k in keys: - #Send key to underlying widget: - if urwid.is_mouse_event(k): - event, button, col, row = k - self.overlay.mouse_event( dim, - event, button, col, row, - focus=True) - else: - k = self.overlay.keypress(dim, k) - if k in ('up','page up'): - self._w.set_focus('body') - # Until I figure out a better way to do this, then this will - # have to do. - self._w.body.get_focus()[0].get_focus()._invalidate() - #self._w.body.keypress(dim,'down') - elif k in ('down','page down'): - self._w.set_focus('footer') - - if "window resize" in keys: - dim = ui.get_cols_rows() - if "esc" in keys or 'Q' in keys: - return False - if "meta enter" in keys or self.OK_PRESSED: - self.OK_PRESSED = False - if self.save_settings(): - return True - if self.CANCEL_PRESSED: - return False - class WiredSettingsDialog(AdvancedSettingsDialog): def __init__(self,name): @@ -223,7 +171,7 @@ class WiredSettingsDialog(AdvancedSettingsDialog): self._w.body.body.append(self.set_default) self.prof_name = name - title = ">"+language['configuring_wired'].replace('$A',self.prof_name) + title = language['configuring_wired'].replace('$A',self.prof_name) self._w.header = urwid.Text( ('header',title),align='right' ) self.set_values() @@ -237,6 +185,9 @@ class WiredSettingsDialog(AdvancedSettingsDialog): self.global_dns_cb.set_state(bool(wired.GetWiredProperty('use_global_dns'))) self.static_dns_cb.set_state(bool(wired.GetWiredProperty('use_static_dns'))) + # Set static ip checkbox. Forgot to do this the first time. + if stringToNone(self.ip_edit.get_edit_text()): + self.static_ip_cb.set_state(True) self.dns1.set_edit_text(self.format_entry( "dns1")) self.dns2.set_edit_text(self.format_entry( "dns2")) self.dns3.set_edit_text(self.format_entry( "dns3")) @@ -267,10 +218,11 @@ class WiredSettingsDialog(AdvancedSettingsDialog): ######################################## class WirelessSettingsDialog(AdvancedSettingsDialog): - def __init__(self,networkID): + def __init__(self,networkID,parent): global wireless, daemon AdvancedSettingsDialog.__init__(self) self.networkid = networkID + self.parent = parent global_settings_t = language['global_settings'] encryption_t = language['use_encryption'] autoconnect_t = language['automatic_connect'] @@ -289,7 +241,7 @@ class WirelessSettingsDialog(AdvancedSettingsDialog): self.encrypt_types = misc.LoadEncryptionMethods() self.set_values() - title = ">"+language['configuring_wireless'].replace('$A',wireless.GetWirelessProperty(networkID,'essid')).replace('$B',wireless.GetWirelessProperty(networkID,'bssid')) + title = language['configuring_wireless'].replace('$A',wireless.GetWirelessProperty(networkID,'essid')).replace('$B',wireless.GetWirelessProperty(networkID,'bssid')) self._w.header = urwid.Text(('header',title),align='right' ) def encryption_toggle(self,chkbox,new_state,user_data=None): @@ -311,6 +263,8 @@ class WirelessSettingsDialog(AdvancedSettingsDialog): self.static_dns_cb.set_state(bool(wireless.GetWirelessProperty(networkID, 'use_static_dns'))) + if stringToNone(self.ip_edit.get_edit_text()): + self.static_ip_cb.set_state(True) self.dns1.set_edit_text(self.format_entry(networkID, "dns1")) self.dns2.set_edit_text(self.format_entry(networkID, "dns2")) self.dns3.set_edit_text(self.format_entry(networkID, "dns3")) @@ -366,9 +320,9 @@ class WirelessSettingsDialog(AdvancedSettingsDialog): for entry_info in encrypt_info.itervalues(): if entry_info[0].get_edit_text() == "" \ and entry_info[1] == 'required': - error(self.ui, self.overlay,"%s (%s)" \ + error(self.ui, self.parent,"%s (%s)" \ % (language['encrypt_info_missing'], - entry_info[0].get_captionabel() ) + entry_info[0].get_caption()[0:-2] ) ) return False @@ -378,12 +332,10 @@ class WirelessSettingsDialog(AdvancedSettingsDialog): elif not self.encryption_chkbox.get_state() and \ wireless.GetWirelessProperty(self.networkid, "encryption"): # Encrypt checkbox is off, but the network needs it. - error(self.ui, self.overlay, language['enable_encryption']) + error(self.ui, self.parent, language['enable_encryption']) return False else: self.set_net_prop("enctype", "None") - for entry in encrypt_info.iterkeys(): - self.set_net_prop(entry[0].entry, "") AdvancedSettingsDialog.save_settings(self) # Save the autoconnect setting. This is not where it originally was @@ -402,9 +354,9 @@ class WirelessSettingsDialog(AdvancedSettingsDialog): # More or less ripped from netentry.py def change_encrypt_method(self): #self.lbox_encrypt = urwid.ListBox() + self.encryption_info = {} wid,ID = self.encryption_combo.get_focus() methods = misc.LoadEncryptionMethods() - self.encryption_info = {} if self._w.body.body.__contains__(self.pile_encrypt): self._w.body.body.pop(self._w.body.body.__len__()-1) @@ -438,6 +390,8 @@ class WirelessSettingsDialog(AdvancedSettingsDialog): self._w.body.body.insert(self._w.body.body.__len__(),self.pile_encrypt) #self._w.body.body.append(self.pile_encrypt) - def prerun(self,ui,dim,display): - self.encryption_combo.build_combobox(self.overlay,ui,14) + def ready_widgets(self,ui,body): + self.ui = ui + self.body = body + self.encryption_combo.build_combobox(body,ui,14) self.change_encrypt_method() diff --git a/curses/prefs_curses.py b/curses/prefs_curses.py index 20d45d2..bf1eb74 100644 --- a/curses/prefs_curses.py +++ b/curses/prefs_curses.py @@ -1,5 +1,7 @@ #!/usr/bin/env python +"""prefs_curses.py -- Pretty, tabbable, console preferences dialog""" + # Copyright (C) 2008-2009 Andrew Psaltis # This program is free software; you can redistribute it and/or modify @@ -22,7 +24,7 @@ import urwid.curses_display from wicd import misc from wicd import dbusmanager -from curses_misc import SelText,DynWrap,ComboBox,TabColumns +from curses_misc import SelText,DynWrap,DynRadioButton,ComboBox,TabColumns daemon = None wireless = None @@ -68,8 +70,8 @@ class PrefsDialog(urwid.WidgetWrap): global_dns_cat_t = ('header',language['global_dns_servers']) global_dns_t = ('editcp',language['use_global_dns']) - dns_dom_t = ('editcp',' DNS Domain: ') - search_dom_t = ('editcp',' Search domain:') + dns_dom_t = ('editcp',' '+language['dns_domain']+': ') + search_dom_t = ('editcp',' '+language['search_domain']+':') dns1_t = ('editcp',' DNS server 1: ') dns2_t = ('editcp',' DNS server 2: ') dns3_t = ('editcp',' DNS server 3: ') @@ -91,6 +93,7 @@ class PrefsDialog(urwid.WidgetWrap): dhcp1_t = 'dhclient' dhcp2_t = 'dhcpcd' dhcp3_t = 'pump' + dhcp4_t = 'udhcpc' wired_detect_header_t = ('header',language["wired_detect"]) wired1_t = 'ethtool' @@ -175,26 +178,33 @@ class PrefsDialog(urwid.WidgetWrap): self.dhcp_header = urwid.Text(dhcp_header_t) self.dhcp_l = [] - # Automatic + + # Order of these is flipped in the actual interface, + # (2,3,1 -> dhcpcd, pump, dhclient), because dhclient often doesn't like + # to work on several distros. self.dhcp0 = urwid.RadioButton(self.dhcp_l,automatic_t) - self.dhcp1 = urwid.RadioButton(self.dhcp_l,dhcp1_t) - self.dhcp2 = urwid.RadioButton(self.dhcp_l,dhcp2_t) - self.dhcp3 = urwid.RadioButton(self.dhcp_l,dhcp3_t) + self.dhcp1 = DynRadioButton(self.dhcp_l,dhcp1_t) + self.dhcp2 = DynRadioButton(self.dhcp_l,dhcp2_t) + self.dhcp3 = DynRadioButton(self.dhcp_l,dhcp3_t) + self.dhcp4 = DynRadioButton(self.dhcp_l,dhcp4_t) + self.dhcp_l = [self.dhcp0,self.dhcp1,self.dhcp2,self.dhcp3,self.dhcp4] self.wired_l = [] self.wired_detect_header = urwid.Text(wired_detect_header_t) self.wired0 = urwid.RadioButton(self.wired_l,automatic_t) - self.wired1 = urwid.RadioButton(self.wired_l,wired1_t) - self.wired2 = urwid.RadioButton(self.wired_l,wired2_t) + self.wired1 = DynRadioButton(self.wired_l,wired1_t) + self.wired2 = DynRadioButton(self.wired_l,wired2_t) + self.wired_l = [self.wired0,self.wired1,self.wired2] self.flush_l = [] self.flush_header = urwid.Text(flush_header_t) self.flush0 = urwid.RadioButton(self.flush_l,automatic_t) - self.flush1 = urwid.RadioButton(self.flush_l,flush1_t) - self.flush2 = urwid.RadioButton(self.flush_l,flush2_t) + self.flush1 = DynRadioButton(self.flush_l,flush1_t) + self.flush2 = DynRadioButton(self.flush_l,flush2_t) + self.flush_l = [self.flush0,self.flush1,self.flush2] externalLB = urwid.ListBox([self.dhcp_header, - self.dhcp0,self.dhcp1,self.dhcp2,self.dhcp3, + self.dhcp0,self.dhcp2,self.dhcp3,self.dhcp1,self.dhcp4, _blank, self.wired_detect_header, self.wired0,self.wired1,self.wired2, @@ -237,27 +247,10 @@ class PrefsDialog(urwid.WidgetWrap): self.header2 : advancedLB} #self.load_settings() - # Now for the buttons: - ok_t = 'OK' - cancel_t = 'Cancel' - - ok_button = urwid.AttrWrap(urwid.Button('OK',self.ok_callback),'body','focus') - cancel_button = urwid.AttrWrap(urwid.Button('Cancel',self.cancel_callback),'body','focus') - # Variables set by the buttons' callback functions - self.CANCEL_PRESSED = False - self.OK_PRESSED = False - - - self.button_cols = urwid.Columns([ok_button,cancel_button], - dividechars=1) - - self.tabs = TabColumns(headerList,lbList,language['preferences'],self.button_cols) + self.tabs = TabColumns(headerList,lbList,language['preferences']) self.__super.__init__(self.tabs) def load_settings(self): - # Reset the buttons - self.CANCEL_PRESSED = False - self.OK_PRESSED = False ### General Settings # ComboBox does not like dbus.Strings as text markups. My fault. :/ @@ -282,13 +275,20 @@ class PrefsDialog(urwid.WidgetWrap): self.wired_auto_l[daemon.GetWiredAutoConnectMethod()-1] self.auto_reconn_checkb.set_state(daemon.GetAutoReconnect()) + def find_avail(apps): + for app in apps[1:]: + app.set_sensitive(daemon.GetAppAvailable(app.get_label())) + ### External Programs + find_avail(self.dhcp_l) dhcp_method = daemon.GetDHCPClient() self.dhcp_l[dhcp_method].set_state(True) + find_avail(self.wired_l) wired_link_method = daemon.GetLinkDetectionTool() self.wired_l[wired_link_method].set_state(True) + find_avail(self.flush_l) flush_method = daemon.GetFlushTool() self.flush_l[flush_method].set_state(True) @@ -322,7 +322,7 @@ class PrefsDialog(urwid.WidgetWrap): self.debug_mode_checkb.set_state(daemon.GetDebugMode()) self.use_dbm_checkb.set_state(daemon.GetSignalDisplayType()) - def save_results(self): + def save_settings(self): """ Pushes the selected settings to the daemon. This exact order is found in prefs.py""" daemon.SetUseGlobalDNS(self.global_dns_checkb.get_state()) @@ -353,8 +353,10 @@ class PrefsDialog(urwid.WidgetWrap): dhcp_client = misc.DHCLIENT elif self.dhcp2.get_state(): dhcp_client = misc.DHCPCD - else: + elif self.dhcp3.get_state(): dhcp_client = misc.PUMP + else: + dhcp_client = misc.UDHCPC daemon.SetDHCPClient(dhcp_client) if self.wired0.get_state(): @@ -378,45 +380,6 @@ class PrefsDialog(urwid.WidgetWrap): for w in self.dns1,self.dns2,self.dns3,self.dns_dom,self.search_dom: w.set_sensitive(new_state) - # Button callbacks - def ok_callback(self,button_object,user_data=None): - self.OK_PRESSED = True - def cancel_callback(self,button_object,user_data=None): - self.CANCEL_PRESSED = True - - def ready_comboboxes(self,ui,body): + def ready_widgets(self,ui,body): self.wpa_cbox.build_combobox(body,ui,4) self.backend_cbox.build_combobox(body,ui,8) - - # Put the widget into an overlay, and run! - def run(self,ui, dim, display): - width,height = ui.get_cols_rows() - self.load_settings() - - overlay = urwid.Overlay(self.tabs, display, ('fixed left', 0),width - , ('fixed top',1), height-3) - self.ready_comboboxes(ui,overlay) - - keys = True - while True: - if keys: - ui.draw_screen(dim, overlay.render(dim, True)) - keys = ui.get_input() - - if "window resize" in keys: - dim = ui.get_cols_rows() - if "esc" in keys or 'Q' in keys: - return False - for k in keys: - #Send key to underlying widget: - overlay.keypress(dim, k) - if urwid.is_mouse_event(k): - event, button, col, row = k - overlay.mouse_event( dim, - event, button, col, row, - focus=True) - # Check if buttons are pressed. - if self.CANCEL_PRESSED: - return False - if self.OK_PRESSED or 'meta enter' in keys: - return True diff --git a/curses/wicd-curses.py b/curses/wicd-curses.py index f023cad..220a635 100755 --- a/curses/wicd-curses.py +++ b/curses/wicd-curses.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -* coding: utf-8 -*- """ wicd-curses. (curses/urwid-based) console interface to wicd @@ -32,9 +33,11 @@ at least get a network connection. Or those who don't like using X. ;-) Comments, criticisms, patches, bug reports all welcome! """ - +# Filter out a confusing urwid warning in python 2.6. +# This is valid as of urwid version 0.9.8.4 +import warnings +warnings.filterwarnings("ignore","The popen2 module is deprecated. Use the subprocess module.") # UI stuff -# This library is the only reason why I wrote this program. import urwid # DBus communication stuff @@ -50,22 +53,26 @@ from wicd import dbusmanager # Internal Python stuff import sys -from time import sleep +from time import sleep, strftime, ctime # Curses UIs for other stuff -from curses_misc import SelText,DynEdit,DynIntEdit,ComboBox,Dialog2,TextDialog,InputDialog,error +from curses_misc import * from prefs_curses import PrefsDialog import netentry_curses -from netentry_curses import WirelessSettingsDialog, WiredSettingsDialog +from netentry_curses import WirelessSettingsDialog, WiredSettingsDialog,AdvancedSettingsDialog from optparse import OptionParser +from os import system # Stuff about getting the script configurer running #from grp import getgrgid #from os import getgroups,system -CURSES_REVNO=wpath.curses_revision +#import logging +#import logging.handler + +CURSES_REV=wpath.curses_revision # Fix strings in wicd-curses from wicd.translations import language @@ -75,37 +82,31 @@ for i in language.keys(): ######################################## ##### SUPPORT CLASSES ######################################## -# A hack to get any errors that pop out of the program to appear ***AFTER*** the -# program exits. -# I also may have been a bit overkill about using this too, I guess I'll find -# that out soon enough. -# I learned about this from this example: -# http://blog.lutzky.net/2007/09/16/exception-handling-decorators-and-python/ -class wrap_exceptions: - def __call__(self, f): - def wrap_exceptions(*args, **kargs): +# Yay for decorators! +def wrap_exceptions(func): + def wrapper(*args, **kargs): try: - return f(*args, **kargs) + return func(*args, **kargs) except KeyboardInterrupt: #gobject.source_remove(redraw_tag) loop.quit() ui.stop() - print "\n"+language['terminated'] + print >> sys.stderr, "\n"+language['terminated'] #raise except DBusException: #gobject.source_remove(redraw_tag) loop.quit() ui.stop() - print "\n"+language['dbus_fail'] + print >> sys.stderr,"\n"+language['dbus_fail'] raise except : # Quit the loop - if 'loop' in locals(): - loop.quit() + #if 'loop' in locals(): + loop.quit() # Zap the screen ui.stop() # Print out standard notification: - print "\n" + language['exception'] + print >> sys.stderr, "\n" + language['exception'] # Flush the buffer so that the notification is always above the # backtrace sys.stdout.flush() @@ -113,7 +114,11 @@ class wrap_exceptions: #sleep(2) raise - return wrap_exceptions + wrapper.__name__ = func.__name__ + wrapper.__module__ = func.__module__ + wrapper.__dict__ = func.__dict__ + wrapper.__doc__ = func.__doc__ + return wrapper ######################################## ##### SUPPORT FUNCTIONS @@ -121,7 +126,7 @@ class wrap_exceptions: # Look familiar? These two functions are clones of functions found in wicd's # gui.py file, except that now set_status is a function passed to them. -@wrap_exceptions() +@wrap_exceptions def check_for_wired(wired_ip,set_status): """ Determine if wired is active, and if yes, set the status. """ if wired_ip and wired.CheckPluggedIn(): @@ -130,7 +135,7 @@ def check_for_wired(wired_ip,set_status): else: return False -@wrap_exceptions() +@wrap_exceptions def check_for_wireless(iwconfig, wireless_ip, set_status): """ Determine if wireless is active, and if yes, set the status. """ if not wireless_ip: @@ -140,7 +145,7 @@ def check_for_wireless(iwconfig, wireless_ip, set_status): if not network: return False - network = str(network) + network = unicode(network) if daemon.GetSignalDisplayType() == 0: strength = wireless.GetCurrentSignalStrength(iwconfig) else: @@ -157,44 +162,11 @@ def check_for_wireless(iwconfig, wireless_ip, set_status): return True -# Self explanitory, and not used until I can get some list sort function -# working... -# Also defunct. -# Current list header is STR,ESSID,ENCRYPT,BSSID,TYPE,CHANNEL -#def gen_list_header(): -# return '%3s %4s %s %19s %s ' % ('NUM','STR','BSSID','CHANNEL','ESSID') - # Generate the list of networks. # Mostly borrowed/stolen from wpa_cli, since I had no clue what all of those # DBUS interfaces do. ^_^ # Whatever calls this must be exception-wrapped if it is run if the UI is up def gen_network_list(): - # Pick which strength measure to use based on what the daemon says - if daemon.GetSignalDisplayType() == 0: - strenstr = 'quality' - gap = 3 - else: - strenstr = 'strength' - gap = 5 - - id = 0 - wiredL = [] - #is_active = wireless.GetWirelessIP('') == None and wired.GetWiredIP('') != None - # This one makes a list of strings to put in a combo box. - #for profile in wired.GetWiredProfileList(): - #theString = '%4s %25s' % (id, profile) - #### THIS IS wired.blah() in experimental - #print config.GetLastUsedWiredNetwork() - # Tag if no wireless IP present, and wired one is - #if is_active: - # theString = '>'+theString[1:] - - #wiredL.append(urwid.AttrWrap(SelText(theString),'connected', - # 'connected focus')) - #else: - #wiredL.append(urwid.AttrWrap(SelText(theString),'body','focus')) - #wiredL.append(theString) - #id+=1 wiredL = wired.GetWiredProfileList() wlessL = [] # This one makes a list of NetLabels @@ -227,24 +199,58 @@ def about_dialog(body): about = TextDialog(theText,16,55,header=('header','About Wicd')) about.run(ui,body) +# Modeled after htop's help def help_dialog(body): - theText = [ + textT = urwid.Text(('header','wicd-curses help'),'right') + textSH = urwid.Text(['This is ',('blue','wicd-curses-'+CURSES_REV),' using wicd ',unicode(daemon.Hello()),'\n']) + + textH = urwid.Text([ "For more detailed help, consult the wicd-curses(8) man page.\n", -"\n", "All controls are case sensitive\n", -('bold','H')," or ",('bold','h'),' or ',('bold','?')," Display this help dialog\n", -('bold','enter')," Connect to selected network\n", -('bold','D')," Disconnect from all networks\n", -('bold','ESC')," Stop a network connection in progress\n", -('bold','F5')," or ", ('bold','R')," Refresh network list\n", -('bold','P')," Prefrences dialog\n", -('bold','I')," Scan for hidden networks\n", -('bold','S')," Select scripts\n", -('bold','O')," Set up Ad-hoc network\n", -('bold','C')," Configure Selected Network\n", -('bold','A')," Display 'about' dialog\n" - ] - help = TextDialog(theText,18,62,header=('header',"Wicd-Curses Help")) - help.run(ui,body) +('bold','->'),' and ',('bold','<-')," are the right and left arrows respectively.\n"]) + + text1 = urwid.Text([ +('bold',' H h ?'),": Display this help dialog\n", +('bold','enter C'),": Connect to selected network\n", +('bold',' D'),": Disconnect from all networks\n", +('bold',' ESC'),": Stop a connection in progress\n", +('bold',' F5 R'),": Refresh network list\n", +('bold',' P'),": Prefrences dialog\n", + ]) + text2 = urwid.Text([ +('bold',' I'),": Scan for hidden networks\n", +('bold',' S'),": Select scripts\n", +('bold',' O'),": Set up Ad-hoc network\n", +('bold',' ->'),": Configure selected network\n", +('bold',' A'),": Display 'about' dialog\n", +('bold',' F8 q Q'),": Quit wicd-curses\n", + ]) + textF = urwid.Text('Press any key to return.') + + # textJ = urwid.Text(('important','Nobody expects the Spanish Inquisition!')) + + blank = urwid.Text('') + + cols = urwid.Columns([text1,text2]) + pile = urwid.Pile([textH,cols]) + fill = urwid.Filler(pile) + frame = urwid.Frame(fill,header=urwid.Pile([textT,textSH]),footer=textF) + dim = ui.get_cols_rows() + while True: + ui.draw_screen(dim, frame.render(dim, True)) + + keys = ui.get_input() + # Don't stop because someone let go of the mouse on the frame + mouse_release = False + for k in keys: + if urwid.is_mouse_event(k) and k[0] == "mouse release": + mouse_release = True + break + if mouse_release : + continue + if 'window resize' in keys: + dim = ui.get_cols_rows() + elif keys: + break def run_configscript(parent,netname,nettype): configfile = wpath.etc+netname+'-settings.conf' @@ -257,7 +263,7 @@ def run_configscript(parent,netname,nettype): # Translation needs to be changed to accomidate this text below. """You can also configure the wireless networks by looking for the "[]" field in the config file. -Once there, you can adjust (or add) the "beforescript", "afterscript", and "disconnectscript" variables as needed, to change the preconnect, postconnect, and disconnect scripts respectively. Note that you will be specifying the full path to the scripts - not the actual script contents. You will need to add/edit the script contents separately. Refer to the wicd manual page for more information."""] +Once there, you can adjust (or add) the "beforescript", "afterscript", "predisconnectscript" and "postdisconnectscript" variables as needed, to change the preconnect, postconnect, predisconnect and postdisconnect scripts respectively. Note that you will be specifying the full path to the scripts - not the actual script contents. You will need to add/edit the script contents separately. Refer to the wicd manual page for more information."""] dialog = TextDialog(theText,20,80) dialog.run(ui,parent) # This code works with many distributions, but not all of them. So, to @@ -293,6 +299,15 @@ Once there, you can adjust (or add) the "beforescript", "afterscript", and "disc main() """ +def gen_list_header(): + if daemon.GetSignalDisplayType() == 0: + # Allocate 25 cols for the ESSID name + essidgap = 25 + else: + # Need 3 more to accomodate dBm strings + essidgap = 28 + return 'C %s %*s %9s %17s %6s %s' % ('STR ',essidgap,'ESSID','ENCRYPT','BSSID','MODE','CHNL') + ######################################## ##### URWID SUPPORT CLASSES ######################################## @@ -300,13 +315,14 @@ Once there, you can adjust (or add) the "beforescript", "afterscript", and "disc # Wireless network label class NetLabel(urwid.WidgetWrap): def __init__(self, id, is_active): - # Pick which strength measure to use based on what the daemon says + # Pick which strength measure to use based on what the daemon says + # gap allocates more space to the first module if daemon.GetSignalDisplayType() == 0: strenstr = 'quality' - gap = 3 + gap = 4 # Allow for 100% else: strenstr = 'strength' - gap = 5 + gap = 7 # -XX dbm = 7 self.id = id # All of that network property stuff self.stren = daemon.FormatSignalForPrinting( @@ -316,7 +332,7 @@ class NetLabel(urwid.WidgetWrap): self.encrypt = wireless.GetWirelessProperty(id,'encryption_method') if wireless.GetWirelessProperty(id, 'encryption') else language['unsecured'] self.mode = wireless.GetWirelessProperty(id, 'mode') # Master, Ad-Hoc self.channel = wireless.GetWirelessProperty(id, 'channel') - theString = ' %*s %25s %9s %17s %6s: %s' % (gap, + theString = ' %-*s %25s %9s %17s %6s %4s' % (gap, self.stren,self.essid,self.encrypt,self.bssid,self.mode,self.channel) if is_active: theString = '>'+theString[1:] @@ -330,7 +346,6 @@ class NetLabel(urwid.WidgetWrap): def keypress(self,size,key): return self._w.keypress(size,key) def connect(self): - # This should work. wireless.ConnectWireless(self.id) class WiredComboBox(ComboBox): @@ -341,7 +356,6 @@ class WiredComboBox(ComboBox): self.ADD_PROFILE = '---'+language["add_new_profile"]+'---' self.__super.__init__(use_enter=False) self.set_list(list) - #self.set_focus(self.theList.index(wired.GetDefaultProfile())) def set_list(self,list): self.theList = list @@ -350,16 +364,10 @@ class WiredComboBox(ComboBox): is_active = wireless.GetWirelessIP('') == None and wired.GetWiredIP('') != None for profile in list: theString = '%4s %25s' % (id, profile) - #### THIS IS wired.blah() in experimental - #print config.GetLastUsedWiredNetwork() # Tag if no wireless IP present, and wired one is if is_active: theString = '>'+theString[1:] - #wiredL.append(urwid.AttrWrap(SelText(theString),'connected', - # 'connected focus')) - #else: - # wiredL.append(urwid.AttrWrap(SelText(theString),'body','focus')) wiredL.append(theString) id+=1 wiredL.append(self.ADD_PROFILE) @@ -373,22 +381,27 @@ class WiredComboBox(ComboBox): if self.theList != []: wired.ReadWiredNetworkProfile(self.get_selected_profile()) - #def rebuild_combobox(self): - # pass def keypress(self,size,key): prev_focus = self.get_focus()[1] - key = self.__super.keypress(size,key) - if self.get_focus()[1] == len(self.list)-1: - dialog = InputDialog(('header',language["add_new_wired_profile"]),7,30) - - exitcode,name = dialog.run(ui,self.parent) - if exitcode == 0: - wired.CreateWiredNetworkProfile(name,False) - self.set_list(wired.GetWiredProfileList()) - self.rebuild_combobox() - self.set_focus(prev_focus) - else: - wired.ReadWiredNetworkProfile(self.get_selected_profile()) + key = ComboBox.keypress(self,size,key) + if key == ' ': + if self.get_focus()[1] == len(self.list)-1: + dialog = InputDialog(('header',language["add_new_wired_profile"]),7,30) + exitcode,name = dialog.run(ui,self.parent) + if exitcode == 0: + name = name.strip() + if not name: + error(ui,self.parent,'Invalid profile name') + self.set_focus(prev_focus) + return key + + wired.CreateWiredNetworkProfile(name,False) + self.set_list(wired.GetWiredProfileList()) + self.rebuild_combobox() + self.set_focus(prev_focus) + else: + print "updating..." + wired.ReadWiredNetworkProfile(self.get_selected_profile()) if key == 'delete': if len(self.theList) == 1: error(self.ui,self.parent,language["no_delete_last_profile"]) @@ -481,6 +494,7 @@ class AdHocDialog(Dialog2): self.key_edit.get_edit_text()) return exitcode, data + ######################################## ##### APPLICATION INTERFACE CLASS ######################################## @@ -488,75 +502,105 @@ class AdHocDialog(Dialog2): class appGUI(): """The UI itself, all glory belongs to it!""" def __init__(self): + global loop self.size = ui.get_cols_rows() # Happy screen saying that you can't do anything because we're scanning # for networks. :-) - # Will need a translation sooner or later self.screen_locker = urwid.Filler(urwid.Text(('important',language['scanning_stand_by']), align='center')) self.no_wlan = urwid.Filler(urwid.Text(('important',language['no_wireless_networks_found']), align='center')) self.TITLE = language['wicd_curses'] self.WIRED_IDX = 1 self.WLESS_IDX = 3 - #wrap1 = urwid.AttrWrap(txt, 'black') - #fill = urwid.Filler(txt) - header = urwid.AttrWrap(urwid.Text(self.TITLE,align='right'), 'header') self.wiredH=urwid.Filler(urwid.Text("Wired Network(s)")) - self.wlessH=urwid.Filler(urwid.Text("Wireless Network(s)")) + self.list_header=urwid.AttrWrap(urwid.Text(gen_list_header()),'listbar') + self.wlessH=NSelListBox([urwid.Text("Wireless Network(s)"),self.list_header]) - #if wireless.GetNumberOfNetworks() == 0: - # wireless.Scan() - self.focusloc = (1,0) + # FIXME: This should be two variables + self.focusloc = [1,0] # These are empty to make sure that things go my way. wiredL,wlessL = [],[]# = gen_network_list() + self.frame = None + self.diag = None self.wiredCB = urwid.Filler(WiredComboBox(wiredL)) self.wlessLB = urwid.ListBox(wlessL) self.update_netlist(force_check=True,firstrun=True) - # Stuff I used to simulate large lists - #spam = SelText('spam') - #spamL = [ urwid.AttrWrap( w, None, 'focus' ) for w in [spam,spam,spam, - # spam,spam,spam,spam,spam,spam,spam,spam,spam,spam,spam,spam, - # spam,spam,spam,spam,spam,spam,spam,spam,spam,spam,spam,spam, - # spam,spam,spam,spam,spam,spam,spam,spam,spam,spam,spam,spam, - # spam,spam,spam,spam] ] - #self.spamLB = urwid.ListBox(spamL) + # Keymappings proposed by nanotube in #wicd + keys = [ + ('H' ,'Help' ,None), + ('right','Config',None), + #(' ',' ',None), + ('C' ,'Connect',None), + ('D' ,'Disconn',None), + ('R' ,'Refresh',None), + ('P' ,'Prefs',None), + ('I' ,'Hidden',None), + ('A' ,'About',None), + ('Q' ,'Quit',loop.quit) + ] + + self.primaryCols = OptCols(keys,self.handle_keys) + self.time_label = \ + urwid.AttrWrap(urwid.Text(strftime('%H:%M:%S')), 'timebar') + self.status_label = urwid.AttrWrap(urwid.Text('blah'),'important') + self.footer2 = urwid.Columns([self.status_label,('fixed', 8, self.time_label)]) + self.footerList = urwid.Pile([self.primaryCols,self.footer2]) - self.footer1 = urwid.AttrWrap(urwid.Text("Something important will eventually go here."),'body') - self.footer2 = urwid.AttrWrap(urwid.Text("If you are seeing this, then something has gone wrong!"),'important') - self.footerList = urwid.ListBox([self.footer1,self.footer2]) - # Pop takes a number! - #walker.pop(1) self.frame = urwid.Frame(self.thePile, header=header, - footer=urwid.BoxAdapter(self.footerList,2)) + footer=self.footerList) self.wiredCB.get_body().build_combobox(self.frame,ui,3) + # Init the other columns used in the program + self.init_other_optcols() + self.frame.set_body(self.thePile) # Booleans gallore! self.prev_state = False self.connecting = False self.screen_locked = False + self.do_diag_lock = False #Whether the screen is locked beneath a dialog + self.diag_type = 'none' # The type of dialog that is up + self.scanning = False self.pref = None self.update_status() - #self.dialog = PrefOverlay(self.frame,self.size) + def doScan(self, sync=False): + self.scanning = True + wireless.Scan(False) + + def init_other_optcols(self): + # The "tabbed" preferences dialog + self.prefCols = OptCols( [ ('meta enter','OK'), + ('meta [','Tab Left',), + ('meta ]','Tab Right'), + ('esc','Cancel') ], self.handle_keys) + self.confCols = OptCols( [ ('meta enter','OK'), + ('esc','Cancel') ],self.handle_keys) # Does what it says it does def lock_screen(self): + if self.diag_type == 'pref': + self.do_diag_lock = True + return True self.frame.set_body(self.screen_locker) self.screen_locked = True self.update_ui() def unlock_screen(self): + if self.do_diag_lock: + self.do_diag_lock = False + return True self.update_netlist(force_check=True) - self.frame.set_body(self.thePile) + if not self.diag: + self.frame.set_body(self.thePile) self.screen_locked = False self.update_ui() @@ -567,14 +611,13 @@ class appGUI(): # That dialog will sit there for a while if I don't get rid of it self.update_ui() wireless.SetHiddenNetworkESSID(misc.noneToString(hidden)) - wireless.Scan(True) + wireless.Scan(False) wireless.SetHiddenNetworkESSID("") def update_focusloc(self): # Location of last known focus is remapped to current location. # This might need to be cleaned up later. - #self.set_status(str(self.frame.get_body().get_focus())+ ' '+ str(self.wiredCB)) if self.thePile.get_focus() == self.wiredCB: wlessorwired = self.WIRED_IDX where = self.thePile.get_focus().get_body().get_focus()[1] @@ -585,22 +628,26 @@ class appGUI(): else: where = self.thePile.get_focus().get_focus()[1] #where = self.wlessLB.get_focus()[1] - self.focusloc = (wlessorwired,where) + self.focusloc = [wlessorwired,where] + # Be clunky until I get to a later stage of development. # Update the list of networks. Usually called by DBus. - # TODO: Preserve current focus when updating the list. - @wrap_exceptions() + @wrap_exceptions def update_netlist(self,state=None, x=None, force_check=False,firstrun=False): - # Run focus-collecting code if we are not running this for the first time + # Don't even try to do this if we are running a dialog + if self.diag: + return + # Run focus-collecting code if we are not running this for the first + # time if not firstrun: self.update_focusloc() + self.list_header.set_text(gen_list_header()) """ Updates the overall network list.""" if not state: state, x = daemon.GetConnectionStatus() if force_check or self.prev_state != state: wiredL,wlessL = gen_network_list() - #self.wiredCB = urwid.Filler(ComboBox(wiredL,self.frame,ui,3, - # use_enter=False)) + self.wiredCB.get_body().set_list(wiredL) self.wiredCB.get_body().build_combobox(self.frame,ui,3) if len(wlessL) != 0: @@ -611,32 +658,30 @@ class appGUI(): else: self.wlessLB = self.no_wlan if daemon.GetAlwaysShowWiredInterface() or wired.CheckPluggedIn(): - #if daemon.GetAlwaysShowWiredInterface(): - #if firstrun: self.thePile = urwid.Pile([('fixed',1,self.wiredH), ('fixed',1,self.wiredCB), - ('fixed',1,self.wlessH), + ('fixed',2,self.wlessH), self.wlessLB] ) if not firstrun: self.frame.body = self.thePile - #self.focusloc = (self.thePile.get_focus(), - # self.thePile.get_focus().get_focus()[1]) + self.thePile.set_focus(self.focusloc[0]) if self.focusloc[0] == self.WIRED_IDX: self.thePile.get_focus().get_body().set_focus(self.focusloc[1]) else: - if self.wlessLB is not self.no_wlan: + if self.wlessLB != self.no_wlan: self.thePile.get_focus().set_focus(self.focusloc[1]) else: self.thePile.set_focus(self.wiredCB) else: - self.thePile = urwid.Pile([('fixed',1,self.wlessH),self.wlessLB] ) + self.thePile = urwid.Pile([('fixed',2,self.wlessH),self.wlessLB] ) if not firstrun: self.frame.body = self.thePile - #if self.focusloc[0] == self.wlessLB: - self.wlessLB.set_focus(self.focusloc[1]) - #self.thePile.get_focus().set_focus(self.focusloc[1]) - #self.always_show_wired = not self.always_show_wired + if self.focusloc[1] == None: + self.focusloc[1] = 0 + if self.wlessLB != self.no_wlan: + self.wlessLB.set_focus(self.focusloc[1]) + self.prev_state = state if not firstrun: self.update_ui() @@ -645,33 +690,18 @@ class appGUI(): self.wiredCB.get_body().set_focus(wired.GetWiredProfileList().index(wired.GetDefaultWiredNetwork())) # Update the footer/status bar - @wrap_exceptions() + conn_status = False + @wrap_exceptions def update_status(self): wired_connecting = wired.CheckIfWiredConnecting() wireless_connecting = wireless.CheckIfWirelessConnecting() self.connecting = wired_connecting or wireless_connecting fast = not daemon.NeedsExternalCalls() - if self.connecting: - #self.lock_screen() - #if self.statusID: - # gobject.idle_add(self.status_bar.remove, 1, self.statusID) - if wireless_connecting: - if not fast: - iwconfig = wireless.GetIwconfig() - else: - iwconfig = '' - # set_status is rigged to return false when it is not - # connecting to anything, so this should work. - gobject.idle_add(self.set_status, wireless.GetCurrentNetwork(iwconfig) + - ': ' + - language[str(wireless.CheckWirelessConnectingMessage())], - True ) - if wired_connecting: - gobject.idle_add(self.set_status, language['wired_network'] + - ': ' + - language[str(wired.CheckWiredConnectingMessage())], - True) + if self.connecting: + if not self.conn_status: + self.conn_status = True + gobject.idle_add(self.set_connecting_status,fast) return True else: if check_for_wired(wired.GetWiredIP(''),self.set_status): @@ -688,9 +718,32 @@ class appGUI(): self.update_ui() return True + def set_connecting_status(self,fast): + wired_connecting = wired.CheckIfWiredConnecting() + wireless_connecting = wireless.CheckIfWirelessConnecting() + if wireless_connecting: + if not fast: + iwconfig = wireless.GetIwconfig() + else: + iwconfig = '' + # set_status is rigged to return false when it is not + # connecting to anything, so this should work. + return self.set_status(wireless.GetCurrentNetwork(iwconfig) + + ': ' + + language[str(wireless.CheckWirelessConnectingMessage())], + True) + if wired_connecting: + return self.set_status( language['wired_network'] + + ': ' + + language[str(wired.CheckWiredConnectingMessage())], + True) + else: + self.conn_status=False + return False # Cheap little indicator stating that we are actually connecting twirl = ['|','/','-','\\'] + tcount = 0 # Counter for said indicator def set_status(self,text,from_idle=False): # Set the status text, usually called by the update_status method # from_idle : a check to see if we are being called directly from the @@ -699,140 +752,138 @@ class appGUI(): # something, and we aren't connecting to something, return False # immediately. if from_idle and not self.connecting: - #self.update_netlist() self.update_status() - #self.update_ui() + self.conn_status=False return False toAppend = '' # If we are connecting and being called from the idle function, spin # the wheel. if from_idle and self.connecting: # This is probably the wrong way to do this, but it works for now. - toAppend=self.twirl[self.incr % 4] - self.footer2 = urwid.AttrWrap(urwid.Text(text+' '+toAppend),'important') - self.frame.set_footer(urwid.BoxAdapter( - urwid.ListBox([self.footer1,self.footer2]),2)) + self.tcount+=1 + toAppend=self.twirl[self.tcount % 4] + self.status_label.set_text(text+' '+toAppend) return True # Make sure the screen is still working by providing a pretty counter. # Not necessary in the end, but I will be using footer1 for stuff in # the long run, so I might as well put something there. - incr = 0 - @wrap_exceptions() - def idle_incr(self): - theText = " " - if self.connecting: - theText += "-- "+language['connecting']+' -- '+language["esc_to_cancel"] - else: - theText += "-- Press H or ? for Help" - quit_note = ' -- '+language["press_to_quit"] - self.footer1 = urwid.Text(str(self.incr) + theText+quit_note,wrap='clip') - self.incr+=1 + #@wrap_exceptions + def update_time(self): + self.time_label.set_text(strftime('%H:%M:%S')) return True # Yeah, I'm copying code. Anything wrong with that? - #@wrap_exceptions() + #@wrap_exceptions def dbus_scan_finished(self): # I'm pretty sure that I'll need this later. #if not self.connecting: # gobject.idle_add(self.refresh_networks, None, False, None) self.unlock_screen() + self.scanning = False # Same, same, same, same, same, same - #@wrap_exceptions() + #@wrap_exceptions def dbus_scan_started(self): + self.scanning = True + if self.diag_type == 'conf': + self.restore_primary() self.lock_screen() - # Redraw the screen - @wrap_exceptions() - def update_ui(self): - #self.update_status() - canvas = self.frame.render( (self.size),True ) - ### GRRRRRRRRRRRRRRRRRRRRR ->^^^^ - # It looks like if I wanted to get the statusbar to update itself - # continuously, I would have to use overlay the canvasses and redirect - # the input. I'll try to get that working at a later time, if people - # want that "feature". - #canvaso = urwid.CanvasOverlay(self.dialog.render( (80,20),True),canvas,0,1) - ui.draw_screen((self.size),canvas) - keys = ui.get_input() + def restore_primary(self): + self.diag_type = 'none' + if self.do_diag_lock or self.scanning: + self.frame.set_body(self.screen_locker) + self.do_diag_lock = False + else: + self.frame.set_body(self.thePile) + self.diag = None + self.frame.set_footer(urwid.Pile([self.primaryCols,self.footer2])) + self.update_ui() - # Handle keystrokes - if "f8" in keys or 'Q' in keys or 'q' in keys: - loop.quit() - #return False - if "f5" in keys or 'R' in keys: - self.lock_screen() - wireless.Scan(True) - if "D" in keys: - # Disconnect from all networks. - daemon.Disconnect() - self.update_netlist() - # Guess what! I actually need to put this here, else I'll have tons of - # references to self.frame lying around. ^_^ - if "enter" in keys: - focus = self.frame.body.get_focus() - if focus == self.wiredCB: - self.special = focus - self.connect("wired",0) - else: - # wless list only other option - wid,pos = self.thePile.get_focus().get_focus() - self.connect("wireless",pos) - - if "esc" in keys: - # Force disconnect here if connection in progress - if self.connecting: - daemon.CancelConnect() - # Prevents automatic reconnecting if that option is enabled - daemon.SetForcedDisconnect(True) - if "P" in keys: - if not self.pref: - self.pref = PrefsDialog(self.frame,(0,1),ui, - dbusmanager.get_dbus_ifaces()) - if self.pref.run(ui,self.size,self.frame): - self.pref.save_results() - self.update_ui() - if "A" in keys: - about_dialog(self.frame) - if "C" in keys: - focus = self.thePile.get_focus() - try: - if focus == self.wiredCB: - WiredSettingsDialog(self.wiredCB.get_body(). - get_selected_profile()).run(ui,self.size,self.frame) - else: - # wireless list only other option - wid,pos = self.thePile.get_focus().get_focus() - WirelessSettingsDialog(pos).run(ui,self.size,self.frame) - except: - # wtf do I need this? + def handle_keys(self,keys): + if not self.diag: + # Handle keystrokes + if "f8" in keys or 'Q' in keys or 'q' in keys: loop.quit() - raise - #self.netentry = NetEntryBase(dbusmanager.get_dbus_ifaces()) - #self.netentry.run(ui,self.size,self.frame) - if "I" in keys: - self.raise_hidden_network_dialog() - if "H" in keys or 'h' in keys or '?' in keys: - help_dialog(self.frame) - if "S" in keys: - focus = self.thePile.get_focus() - if focus == self.wiredCB: - nettype = 'wired' - netname = self.wiredCB.get_body().get_selected_profile() - else: - nettype = 'wireless' - netname = str(self.wlessLB.get_focus()[1]) - run_configscript(self.frame,netname,nettype) - if "O" in keys: - exitcode,data = AdHocDialog().run(ui,self.frame) - #data = (essid,ip,channel,use_ics,use_encrypt,key_edit) - if exitcode == 1: - wireless.CreateAdHocNetwork(data[0], - data[2], - data[1], "WEP", - data[5], - data[4], False) + #return False + if "f5" in keys or 'R' in keys: + self.lock_screen() + self.doScan() + if "D" in keys: + # Disconnect from all networks. + daemon.Disconnect() + self.update_netlist() + if 'right' in keys: + if not self.scanning: + focus = self.thePile.get_focus() + self.frame.set_footer(urwid.Pile([self.confCols,self.footer2])) + if focus == self.wiredCB: + self.diag = WiredSettingsDialog(self.wiredCB.get_body().get_selected_profile()) + self.frame.set_body(self.diag) + else: + # wireless list only other option + wid,pos = self.thePile.get_focus().get_focus() + self.diag = WirelessSettingsDialog(pos,self.frame) + self.diag.ready_widgets(ui,self.frame) + self.frame.set_body(self.diag) + self.diag_type = 'conf' + if "enter" in keys or 'C' in keys: + if not self.scanning: + focus = self.frame.body.get_focus() + if focus == self.wiredCB: + self.special = focus + self.connect("wired",0) + else: + # wless list only other option, if it is around + if self.wlessLB != self.no_wlan: + wid,pos = self.thePile.get_focus().get_focus() + self.connect("wireless",pos) + if "esc" in keys: + # Force disconnect here if connection in progress + if self.connecting: + daemon.CancelConnect() + # Prevents automatic reconnecting if that option is enabled + daemon.SetForcedDisconnect(True) + if "P" in keys: + if not self.pref: + self.pref = PrefsDialog(self.frame,(0,1),ui, + dbusmanager.get_dbus_ifaces()) + self.pref.load_settings() + self.pref.ready_widgets(ui,self.frame) + self.frame.set_footer(urwid.Pile([self.prefCols,self.footer2])) + self.diag = self.pref + self.diag_type = 'pref' + self.frame.set_body(self.diag) + # Halt here, keypress gets passed to the dialog otherwise + return True + if "A" in keys: + about_dialog(self.frame) + if "I" in keys: + self.raise_hidden_network_dialog() + if "H" in keys or 'h' in keys or '?' in keys: + # FIXME I shouldn't need this, OptCols messes up this one + # particular button + if not self.diag: + help_dialog(self.frame) + if "S" in keys: + focus = self.thePile.get_focus() + if focus == self.wiredCB: + nettype = 'wired' + netname = self.wiredCB.get_body().get_selected_profile() + else: + nettype = 'wireless' + netname = str(self.wlessLB.get_focus()[1]) + run_configscript(self.frame,netname,nettype) + if "O" in keys: + exitcode,data = AdHocDialog().run(ui,self.frame) + #data = (essid,ip,channel,use_ics,use_encrypt,key_edit) + if exitcode == 1: + wireless.CreateAdHocNetwork(data[0], + data[2], + data[1], "WEP", + data[5], + data[4], False) for k in keys: if urwid.is_mouse_event(k): @@ -840,10 +891,39 @@ class appGUI(): self.frame.mouse_event( self.size, event, button, col, row, focus=True) + continue + k = self.frame.keypress(self.size,k) + if self.diag: + if k == 'esc' or k == 'q' or k == 'Q': + self.restore_primary() + break + if k == 'meta enter': + self.diag.save_settings() + self.restore_primary() + break if k == "window resize": self.size = ui.get_cols_rows() continue - self.frame.keypress( self.size, k ) + + # Redraw the screen + @wrap_exceptions + def update_ui(self): + #self.update_status() + canvas = self.frame.render( (self.size),True ) + ### GRRRRRRRRRRRRRRRRRRRRR ->^^^^ + # It looks like if I want to get the statusbar to update itself + # continuously, I would have to use overlay the canvasses and redirect + # the input. I'll try to get that working at a later time, if people + # want that "feature". + #canvaso = urwid.CanvasOverlay(self.dialog.render( (80,20),True),canvas,0,1) + # If the screen is turned off for some reason, don't even try to do the + # rest of the stuff. + if not ui._started: + return False + ui.draw_screen((self.size),canvas) + keys = ui.get_input() + self.handle_keys(keys) + return True def connect(self, nettype, networkid, networkentry=None): @@ -863,8 +943,7 @@ class appGUI(): ######################################## def main(): - global ui - + global ui, dlogger # We are _not_ python. misc.RenameProcess('wicd-curses') @@ -874,41 +953,50 @@ def main(): if options.screen == 'raw': import urwid.raw_display ui = urwid.raw_display.Screen() - elif options.screen is 'curses': + elif options.screen == 'curses': import urwid.curses_display ui = urwid.curses_display.Screen() + #if options.debug: + # dlogger = logging.getLogger("Debug") + # dlogger.setLevel(logging.DEBUG) + # dlogger.debug("wicd-curses debug logging started") + # Default Color scheme. # Other potential color schemes can be found at: # http://excess.org/urwid/wiki/RecommendedPalette - # Note: the current palette below is optimized for the linux console. - # For example, this looks particularly bad on a default-colored XTerm. - # NB: To find current terminal background use variable COLORFGBG + + # Thanks to nanotube on #wicd for helping with this ui.register_palette([ ('body','default','default'), - ('focus','dark magenta','light gray'), + ('focus','black','light gray'), ('header','light blue','default'), ('important','light red','default'), ('connected','dark green','default'), - ('connected focus','default','dark green'), + ('connected focus','black','dark green'), ('editcp', 'default', 'default', 'standout'), ('editbx', 'light gray', 'dark blue'), ('editfc', 'white','dark blue', 'bold'), - ('editnfc','dark gray','default'), + ('editnfc','brown','default','bold'), ('tab active','dark green','light gray'), + ('infobar','light gray','dark blue'), + ('timebar','dark gray','default'), + ('listbar','light blue','default'), # Simple colors around text ('green','dark green','default'), - ('blue','dark blue','default'), + ('blue','light blue','default'), ('red','dark red','default'), ('bold','white','black','bold')]) - # This is a wrapper around a function that calls another a function that is a - # wrapper around a infinite loop. Fun. + # This is a wrapper around a function that calls another a function that + # is a wrapper around a infinite loop. Fun. urwid.set_encoding('utf8') ui.run_wrapper(run) +@wrap_exceptions def run(): global loop - + loop = gobject.MainLoop() + ui.set_mouse_tracking() app = appGUI() @@ -920,14 +1008,12 @@ def run(): # I've left this commented out many times. bus.add_signal_receiver(app.update_netlist, 'StatusChanged', 'org.wicd.daemon') - loop = gobject.MainLoop() # Update what the interface looks like as an idle function gobject.idle_add(app.update_ui) # Update the connection status on the bottom every 1.5 s. - gobject.timeout_add(1500,app.update_status) - gobject.idle_add(app.idle_incr) - # DEFUNCT: Terminate the loop if the UI is terminated. - #gobject.idle_add(app.stop_loop) + gobject.timeout_add(2000,app.update_status) + # This will make sure that it is updated on the second. + gobject.timeout_add(500,app.update_time) loop.run() # Mostly borrowed from gui.py @@ -938,7 +1024,7 @@ def setup_dbus(force=True): except DBusException: # I may need to be a little more verbose here. # Suggestions as to what should go here, please? - print language['cannot_connect_to_daemon'] + print >> sys.stderr, language['cannot_connect_to_daemon'] #raise # return False # <- Will need soon. bus = dbusmanager.get_bus() @@ -958,13 +1044,22 @@ setup_dbus() ##### MAIN ENTRY POINT ######################################## if __name__ == '__main__': - parser = OptionParser(version="wicd-curses-%s (using wicd %s)" % (CURSES_REVNO,daemon.Hello())) - parser.set_defaults(screen='raw') + try: + parser = OptionParser(version="wicd-curses-%s (using wicd %s)" % (CURSES_REV,daemon.Hello())) + except Exception, e: + if "DBus.Error.AccessDenied" in e.get_dbus_name(): + print language['access_denied_wc'].replace('$A','\033[1;34m'+wpath.wicd_group+'\033[0m') + sys.exit(1) + else: + raise + parser.set_defaults(screen='raw',debug=False) parser.add_option("-r", "--raw-screen",action="store_const",const='raw' ,dest='screen',help="use urwid's raw screen controller (default)") parser.add_option("-c", "--curses-screen",action="store_const",const='curses',dest='screen',help="use urwid's curses screen controller") + parser.add_option("-d", "--debug",action="store_true" + ,dest='debug',help="enable logging of wicd-curses (currently does nothing)") (options,args) = parser.parse_args() main() # Make sure that the terminal does not try to overwrite the last line of # the program, so that everything looks pretty. - print "" + #print "" diff --git a/data/wicd.glade b/data/wicd.glade index 0fe8d7a..5dbbc0b 100644 --- a/data/wicd.glade +++ b/data/wicd.glade @@ -1,25 +1,23 @@ - - - + + + 450 400 True Wicd Network Manager - GTK_WIN_POS_CENTER + center 550 - GDK_GRAVITY_CENTER - - + center True True - GTK_TOOLBAR_BOTH_HORIZ - GTK_ICON_SIZE_MENU + both-horiz + 0 True @@ -31,8 +29,8 @@ True + gtk-network True - gtk-network True True @@ -40,12 +38,12 @@ True + Create an ad-hoc network True - Create an ad-hoc network - True + False - + True gtk-add @@ -54,15 +52,15 @@ + Find a hidden network True Enter a hidden network to try to locate. - Find a hidden network - True + False - + True - network-wireless + gtk-find @@ -74,6 +72,9 @@ + + False + @@ -86,6 +87,7 @@ + False True @@ -99,6 +101,7 @@ + False True @@ -112,6 +115,7 @@ + False True @@ -125,6 +129,7 @@ + False True @@ -139,12 +144,14 @@ + False True False + 0 @@ -165,12 +172,12 @@ True False - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True - GTK_SHADOW_NONE + none True @@ -198,15 +205,17 @@ 3 + 0 - True - Cancel the current connection attempt gtk-cancel + True + False + False + Cancel the current connection attempt True - 0 @@ -238,8 +247,8 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 Configure Scripts - GTK_WIN_POS_CENTER_ON_PARENT - GDK_WINDOW_TYPE_HINT_DIALOG + center-on-parent + dialog False @@ -259,6 +268,7 @@ False False + 0 @@ -272,6 +282,9 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Pre-connection Script: + + 0 + @@ -302,6 +315,9 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Post-connection Script: + + 0 + @@ -326,15 +342,18 @@ 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 - Disconnection Script: + Pre-disconnection Script: + + 0 + - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -351,6 +370,39 @@ 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 @@ -359,32 +411,41 @@ True - GTK_BUTTONBOX_END + end + gtk-cancel True True - gtk-cancel + False True - 0 + + False + False + 0 + + gtk-ok + 1 True True - gtk-ok + False True - 1 + False + False 1 False - GTK_PACK_END + end + 0 @@ -392,8 +453,8 @@ 5 - GTK_WIN_POS_CENTER_ON_PARENT - GDK_WINDOW_TYPE_HINT_DIALOG + center-on-parent + dialog False @@ -414,17 +475,17 @@ True True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE + queue + none True - 18 + 20 2 4 4 @@ -433,14 +494,14 @@ 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. - Always switch to a wired connection when available - 0 True @@ -490,10 +551,10 @@ is already active. 12 + Automatically reconnect on network connection loss True True - Automatically reconnect on network connection loss - 0 + False True @@ -525,10 +586,10 @@ is already active. 12 + Use last wired network profile True True - Use last wired network profile - 0 + False True True @@ -547,10 +608,10 @@ is already active. 12 + Prompt for wired network profile True True - Prompt for wired network profile - 0 + False True True pref_use_last_radio @@ -570,10 +631,10 @@ is already active. 12 + Use default wired network profile True True - Use default wired network profile - 0 + False True True pref_use_last_radio @@ -766,10 +827,10 @@ is already active. 12 + Use global DNS servers True True - Use global DNS servers - 0 + False True @@ -840,11 +901,11 @@ is already active. 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. - Always show wired interface - 0 True @@ -856,6 +917,41 @@ is already active. + + + True + 0 + <b>Notifications</b> + True + + + 2 + 18 + 19 + + + + + + True + 12 + + + Display notifications about connection status + True + True + False + True + + + + + 2 + 19 + 20 + + + @@ -870,8 +966,8 @@ is already active. General Settings - tab False + tab @@ -885,13 +981,13 @@ is already active. True True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE + queue + none True @@ -931,23 +1027,24 @@ is already active. True + Automatic (recommended) True True - Automatic (recommended) - 0 + False True True False + 0 + ip True True - ip - 0 + False True True flush_auto_radio @@ -959,10 +1056,10 @@ is already active. + route True True - route - 0 + False True True flush_auto_radio @@ -990,23 +1087,24 @@ is already active. True + Automatic (recommended) True True - Automatic (recommended) - 0 + False True True False + 0 + ethtool True True - ethtool - 0 + False True True link_auto_radio @@ -1018,10 +1116,10 @@ is already active. + mii-tool True True - mii-tool - 0 + False True True link_auto_radio @@ -1049,38 +1147,54 @@ is already active. True + Automatic (recommended) True True - Automatic (recommended) - 0 + False True True dhclient_radio False + 0 + dhclient True True - dhclient - 0 + False True True + + False + 3 + + + + + dhcpcd + True + True + False + True + True + dhclient_radio + False 1 - + + pump True True - dhcpcd - 0 + False True True dhclient_radio @@ -1091,18 +1205,18 @@ is already active. - + + udhcpc True True - pump - 0 + False True True dhclient_radio False - 3 + 4 @@ -1147,23 +1261,24 @@ is already active. True + Automatic (recommended) True True - Automatic (recommended) - 0 + False True True False + 0 + gksudo True True - gksudo - 0 + False True True sudo_auto_radio @@ -1175,10 +1290,10 @@ is already active. + kdesu True True - kdesu - 0 + False True True sudo_auto_radio @@ -1190,10 +1305,10 @@ is already active. + ktsuss True True - ktsuss - 0 + False True True sudo_auto_radio @@ -1228,9 +1343,9 @@ is already active. External Programs - tab 1 False + tab @@ -1270,6 +1385,7 @@ to read its description. False + 0 @@ -1316,10 +1432,10 @@ to read its description. 12 + Use dBm to measure signal strength True True - Use dBm to measure signal strength - 0 + False True @@ -1337,10 +1453,10 @@ to read its description. 12 + Enable debug mode True True - Enable debug mode - 0 + False True @@ -1477,9 +1593,9 @@ WPA supplicant driver. Advanced Settings - tab 2 False + tab @@ -1490,34 +1606,41 @@ WPA supplicant driver. True - GTK_BUTTONBOX_END + end + gtk-cancel True True True - gtk-cancel True - 0 + + False + False + 0 + + gtk-ok + 1 True True True - gtk-ok True - 1 + False + False 1 False - GTK_PACK_END + end + 0 diff --git a/in/init=debian=wicd.in b/in/init=debian=wicd.in index f08e836..879695b 100755 --- a/in/init=debian=wicd.in +++ b/in/init=debian=wicd.in @@ -153,9 +153,12 @@ case "$1" in ;; esac ;; + status) + status_of_proc -p $PIDFILE $DAEMON $NAME + ;; *) #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2 exit 3 ;; esac diff --git a/in/init=slackware=rc.wicd.in b/in/init=slackware=rc.wicd.in index 10b3317..69c3f77 100755 --- a/in/init=slackware=rc.wicd.in +++ b/in/init=slackware=rc.wicd.in @@ -16,8 +16,8 @@ wicd_start() { echo "$PIDFILE and try again..." exit 1 else - echo "Starting wicd daemon: $DAEMON" - wicd 2>/dev/null 1>&2 + echo "Starting wicd daemon: $DAEMON &" + wicd 2>/dev/null 1>&2 & fi } diff --git a/in/init=suse=wicd.in b/in/init=suse=wicd.in index 2dec20d..96e4934 100755 --- a/in/init=suse=wicd.in +++ b/in/init=suse=wicd.in @@ -3,7 +3,7 @@ ### BEGIN INIT INFO # Provides: wicd-daemon # Required-Start: dbus -# Required-Stop: +# Required-Stop: $null # Default-Start: 3 4 5 # Default-Stop: # Description: wicd, a wired and wireless connection manager. diff --git a/in/man=wicd-curses.8.in b/in/man=wicd-curses.8.in index 99cfd68..7381627 100644 --- a/in/man=wicd-curses.8.in +++ b/in/man=wicd-curses.8.in @@ -1,5 +1,5 @@ .\" First revision was r203 -.TH WICD-CURSES "8" "February 2009" "wicd-curses-%CURSES_REVNO%" +.TH WICD-CURSES "8" "April 2009" "wicd-curses-%CURSES_REVNO%" .SH NAME .B wicd-curses \- curses-based wicd(8) controller @@ -23,7 +23,7 @@ language of choice only uses Latin characters. .SH CONTROLS All of these are case sensitive. .TP -.BR enter +.BR "C " or " enter" Connect to selected network .TP .BR "F8 " or " Q " or " q" @@ -52,7 +52,7 @@ Raise the "About wicd-curses" dialog .\".PP .\"The following is a work in progress and might not be fully functional as of yet. .TP -.BR C +.BR "right-arrow" Bring up network configuration controller for the selected network .TP .BR delete diff --git a/in/man=wicd-wired-settings.conf.5.in b/in/man=wicd-wired-settings.conf.5.in index 6d0b06c..31b33c3 100644 --- a/in/man=wicd-wired-settings.conf.5.in +++ b/in/man=wicd-wired-settings.conf.5.in @@ -33,8 +33,12 @@ The script should be a Bourne-compatible script and should be executable. IMPORTANT - scripts should ONLY be writable by root and located in a directory that is only writable by root. .TP -.BI "disconnectscript = " -This defines a script to run when Wicd disconnects the interface. +.BI "predisconnectscript = " +This defines a script to run before Wicd disconnects the interface. +The script should be a Bourne-compatible script and should be executable. +.TP +.BI "postdisconnectscript = " +This defines a script to run after Wicd disconnects the interface. The script should be a Bourne-compatible script and should be executable. .br IMPORTANT - scripts should ONLY be writable by root and located in a diff --git a/in/man=wicd-wireless-settings.conf.5.in b/in/man=wicd-wireless-settings.conf.5.in index 79ac751..dd567df 100644 --- a/in/man=wicd-wireless-settings.conf.5.in +++ b/in/man=wicd-wireless-settings.conf.5.in @@ -99,8 +99,11 @@ This defines a script to run after Wicd brings up the connection. IMPORTANT - scripts should ONLY be writable by root and located in a directory that is writable by only root. .TP -.BI "disconnectscript = " -This defines a script to run when Wicd disconnects the interface. +.BI "predisconnectscript = " +This defines a script to run before Wicd disconnects the interface. +.TP +.BI "postdisconnectscript = " +This defines a script to run after Wicd disconnects the interface. .br IMPORTANT - scripts should ONLY be writable by root and located in a directory that is writable by only root. diff --git a/in/other=55wicd.in b/in/other=91wicd.in similarity index 100% rename from in/other=55wicd.in rename to in/other=91wicd.in diff --git a/in/other=wicd.conf.in b/in/other=wicd.conf.in index ac2fa88..e82bb6f 100644 --- a/in/other=wicd.conf.in +++ b/in/other=wicd.conf.in @@ -11,20 +11,6 @@ - - - - - - - - - - - - - - @@ -33,9 +19,29 @@ - + + + + + + + + + + + + + + diff --git a/in/wicd=wpath.py.in b/in/wicd=wpath.py.in index a4f17ef..eebd556 100755 --- a/in/wicd=wpath.py.in +++ b/in/wicd=wpath.py.in @@ -27,7 +27,8 @@ lib = '%LIB%' share = '%SHARE%' etc = '%ETC%' scripts = '%SCRIPTS%' -disconnectscripts = '%SCRIPTS%disconnect' +predisconnectscripts = '%SCRIPTS%predisconnect' +postdisconnectscripts = '%SCRIPTS%postdisconnect' preconnectscripts = '%SCRIPTS%preconnect' postconnectscripts = '%SCRIPTS%postconnect' images = '%IMAGES%' @@ -62,6 +63,8 @@ initfile = '%INITFILE%' # stores only the file name, i.e. wicd initfilename = '%INITFILENAME%' wicd_group = '%WICDGROUP%' +log_group = '%LOGGROUP%' +log_perms = '%LOGPERMS%' # BOOLEANS no_install_pmutils = %NO_INSTALL_PMUTILS% @@ -71,6 +74,7 @@ no_install_kde = %NO_INSTALL_KDE% no_install_acpi = %NO_INSTALL_ACPI% no_install_docs = %NO_INSTALL_DOCS% no_install_ncurses = %NO_INSTALL_NCURSES% +no_use_notifications = %NO_USE_NOTIFICATIONS% def chdir(file): """Change directory to the location of the specified file. diff --git a/in/wpath.py.in b/in/wpath.py.in deleted file mode 120000 index 920fa33..0000000 --- a/in/wpath.py.in +++ /dev/null @@ -1 +0,0 @@ -wicd=wpath.py.in \ No newline at end of file diff --git a/man/wicd-client.1 b/man/wicd-client.1 index 9925b0c..a2e71ad 100644 --- a/man/wicd-client.1 +++ b/man/wicd-client.1 @@ -1,6 +1,6 @@ -.TH WICD-CLIENT "1" "September 2008" "wicd-client " "User Commands" +.TH WICD-CLIENT "1" "June 2009" "wicd-client " "User Commands" .SH NAME -wicd-client \- manual page for wicd-client +wicd-client \- frontend to the WICD daemon .SH DESCRIPTION wireless (and wired) connection daemon front\-end. diff --git a/other/wicd-tray.desktop b/other/wicd-tray.desktop index a5f1f6d..d2cc87b 100644 --- a/other/wicd-tray.desktop +++ b/other/wicd-tray.desktop @@ -1,6 +1,5 @@ [Desktop Entry] Categories=Application;Network; -Encoding=UTF-8 Exec=wicd-client GenericName=Network Manager Icon=wicd-client diff --git a/other/wicd.desktop b/other/wicd.desktop index 7221c15..a0f334f 100644 --- a/other/wicd.desktop +++ b/other/wicd.desktop @@ -1,6 +1,5 @@ [Desktop Entry] Categories=Application;Network; -Encoding=UTF-8 Exec=wicd-client --no-tray GenericName=Network Manager Icon=wicd-client diff --git a/setup.cfg b/setup.cfg index 4bd9609..d57f647 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,4 @@ [install] record = install.log +[bdist_rpm] +group = Productivity/Networking/System diff --git a/setup.py b/setup.py index 4b39c74..fbdd0c6 100755 --- a/setup.py +++ b/setup.py @@ -2,6 +2,7 @@ # # 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 @@ -19,19 +20,22 @@ from distutils.core import setup, Command from distutils.extension import Extension import os -import shutil import sys +import shutil import subprocess # Be sure to keep this updated! # VERSIONNUMBER -VERSION_NUM = '1.6.0a1' +VERSION_NUM = '1.6.2' # REVISION_NUM is automatically updated REVISION_NUM = 'unknown' -CURSES_REVNO = 'r279' +CURSES_REVNO = 'uimod' + +# change to the directory setup.py is contained in +os.chdir(os.path.abspath(os.path.split(__file__)[0])) try: - if not os.path.exists('vcsinfo.py'): + if os.path.exists('.bzr') and os.system('bzr > /dev/null 2>&1') == 0: try: os.system('bzr version-info --python > vcsinfo.py') except: @@ -42,7 +46,6 @@ except Exception, e: print 'failed to find revision number:' print e - class configure(Command): description = "configure the paths that Wicd will be installed to" @@ -83,6 +86,9 @@ class configure(Command): ('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"), @@ -91,7 +97,8 @@ class configure(Command): ('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-ncurses', None, 'do not install the ncurses client'), + ('no-use-notifications', None, 'do not ever allow the use of libnotify notifications') ] def initialize_options(self): @@ -118,6 +125,7 @@ class configure(Command): 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 @@ -126,51 +134,41 @@ class configure(Command): self.no_install_pmutils = False self.no_install_docs = False self.no_install_ncurses = 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.init = '/etc/rc.d/init.d/' - self.initfile = 'init/redhat/wicd' + self.ddistro = 'redhat' elif os.path.exists('/etc/SuSE-release'): - self.init = '/etc/init.d/' - self.initfile = 'init/suse/wicd' + self.ddistro = 'suse' elif os.path.exists('/etc/fedora-release'): - self.init = '/etc/rc.d/init.d/' - self.initfile = 'init/redhat/wicd' + self.ddistro = 'redhat' elif os.path.exists('/etc/gentoo-release'): - self.init = '/etc/init.d/' - self.initfile = 'init/gentoo/wicd' + self.ddistro = 'gentoo' elif os.path.exists('/etc/debian_version'): - self.init = '/etc/init.d/' - self.initfile = 'init/debian/wicd' + self.ddistro = 'debian' elif os.path.exists('/etc/arch-release'): - self.init = '/etc/rc.d/' - self.initfile = 'init/arch/wicd' + self.ddistro = 'arch' elif os.path.exists('/etc/slackware-version') or \ - os.path.exists('/etc/slamd64-version'): - 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 + os.path.exists('/etc/slamd64-version') or \ + os.path.exists('/etc/bluewhite64-version'): + self.ddistro = 'slackware' elif os.path.exists('/etc/pld-release'): - self.init = '/etc/rc.d/init.d/' - self.initfile = 'init/pld/wicd' + self.ddistro = 'pld' elif os.path.exists('/usr/bin/crux'): - self.init = '/etc/rc.d/' + self.ddistro = 'crux' elif os.path.exists('/etc/lunar.release'): - self.init='/etc/init.d/' - self.initfile = 'init/lunar/wicd' + self.distro = 'lunar' else: - self.init = 'FAIL' - self.no_install_init = True - self.distro_detect_failed = True + 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 --init and --initfile, configure will continue. ' + \ + '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.' @@ -225,8 +223,58 @@ class configure(Command): 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' + 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 + 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. ' + \ @@ -331,6 +379,26 @@ class test(Command): print 'running tests' tests.run_tests() +class update_translations_py(Command): + description = "download new translations.py from the online translator" + + user_options = [] + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + import urllib, shutil + # grab translations.py + filename, headers = urllib.urlretrieve('http://wicd.net/translator/generate/translations.py/') + # copy it into the right location + shutil.copyfile(filename, + os.path.join(os.path.dirname(os.path.realpath(__file__)), + 'wicd/translations.py')) + class get_translations(Command): description = "download the translations from the online translator" @@ -344,30 +412,29 @@ class get_translations(Command): def run(self): import urllib, shutil - shutil.rmtree('translations/') + if os.path.exists('translations'): + shutil.rmtree('translations/') os.makedirs('translations') - filename, headers = urllib.urlretrieve('http://wicd.net/translator/idlist') + filename, headers = urllib.urlretrieve('http://wicd.sourceforge.net/translator/idlist/') id_file = open(filename, 'r') lines = id_file.readlines() # remove the \n from the end of lines, and remove blank entries lines = [ x.strip() for x in lines if not x.strip() is '' ] for id in lines: - # http://wicd.net/translator/download_po.php?language=11 - pofile, poheaders = urllib.urlretrieve('http://wicd.net/translator/download/'+str(id)) - #for i in `cat ids`; do - #wget "http://wicd.sourceforge.net/translator/download_po.php?language=$i&version=$1" -O "language_$i" - #iden=`python -c "import sys; print open('language_$i','r').readlines()[1].strip()[2:]"` - #mv "language_$i" po/$iden.po - #mkdir -p $iden/LC_MESSAGES/ - #msgfmt --output-file=$iden/LC_MESSAGES/wicd.mo po/$iden.po - lang_identifier = open(pofile,'r').readlines()[0].strip() - lang_identifier = lang_identifier[lang_identifier.rindex('(')+1:lang_identifier.rindex(')')] - shutil.move(pofile, lang_identifier+'.po') - print 'Got',lang_identifier - os.makedirs('translations/'+lang_identifier+'/LC_MESSAGES') - os.system('msgfmt --output-file=translations/' + lang_identifier + - '/LC_MESSAGES/wicd.mo ' + lang_identifier + '.po') - os.remove(lang_identifier+'.po') + pofile, poheaders = urllib.urlretrieve('http://wicd.sourceforge.net/translator/download/'+str(id)+'/') + try: + lang_identifier = open(pofile,'r').readlines()[0].strip() + first_line = lang_identifier + lang_identifier = lang_identifier[lang_identifier.rindex('(')+1:lang_identifier.rindex(')')] + print first_line + except: + print >> sys.stderr, 'error downloading language %s' % id + else: + shutil.move(pofile, lang_identifier+'.po') + os.makedirs('translations/'+lang_identifier+'/LC_MESSAGES') + os.system('msgfmt --output-file=translations/' + lang_identifier + + '/LC_MESSAGES/wicd.mo ' + lang_identifier + '.po') + os.remove(lang_identifier+'.po') class uninstall(Command): @@ -383,7 +450,6 @@ class uninstall(Command): def run(self): os.system("./uninstall.sh") - try: import wpath except ImportError: @@ -425,7 +491,8 @@ try: (wpath.backends, ['wicd/backends/be-external.py', 'wicd/backends/be-ioctl.py']), (wpath.autostart, ['other/wicd-tray.desktop', ]), (wpath.scripts, []), - (wpath.disconnectscripts, []), + (wpath.predisconnectscripts, []), + (wpath.postdisconnectscripts, []), (wpath.preconnectscripts, []), (wpath.postconnectscripts, []), ] @@ -459,34 +526,32 @@ try: 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' ])) + data.append((wpath.pmutils, ['other/91wicd' ])) print 'Using pid path', os.path.basename(wpath.pidfile) print 'Language support for', for language in os.listdir('translations/'): - if not language.startswith('.'): - codes = language.split('_') - short_language = language - if codes[0].lower() == codes[1].lower(): - short_language = codes[0].lower() - print short_language, - data.append((wpath.translations + short_language + '/LC_MESSAGES/', - ['translations/' + language + '/LC_MESSAGES/wicd.mo'])) + 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"]) +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']) +iwscan_ext = Extension(name='iwscan', libraries=['iw'], + sources=['depends/python-iwscan/pyiwscan.c']) setup(cmdclass={'configure' : configure, 'get_translations' : get_translations, - 'uninstall' : uninstall, 'test' : test, 'clear_generated' : clear_generated}, + 'uninstall' : uninstall, 'test' : test, 'clear_generated' : + clear_generated, 'update_translations_py' : + update_translations_py}, name="Wicd", version=VERSION_NUM, description="A wireless and wired network manager", @@ -495,17 +560,16 @@ 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. Wicdl will automatically +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", - author_email="compwiz18@gmail.com, oreilldf@gmail.com", + author="Adam Blackburn, Dan O'Reilly, Andrew Psaltis", + author_email="compwiz18@gmail.com, oreilldf@gmail.com, ampsaltis@gmail.com", url="http://wicd.net", license="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html", py_modules=['wicd.networking','wicd.misc','wicd.gui','wicd.wnettools', 'wicd.wpath','wicd.prefs','wicd.netentry','wicd.dbusmanager', 'wicd.logfile','wicd.backend','wicd.configmanager', 'wicd.guiutil','wicd.translations'], - ext_modules=[iwscan_ext, wpactrl_ext], data_files=data ) diff --git a/wicd/autoconnect.py b/wicd/autoconnect.py index be830dc..b68a5c7 100755 --- a/wicd/autoconnect.py +++ b/wicd/autoconnect.py @@ -1,8 +1,10 @@ #!/usr/bin/python +""" autoconnect -- Triggers an automatic connection attempt. """ + # -# Copyright (C) 2007 - 2008 Adam Blackburn -# Copyright (C) 2007 - 2008 Dan O'Reilly +# 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 @@ -21,7 +23,6 @@ from wicd import dbusmanager import dbus import time -import gobject import sys if getattr(dbus, 'version', (0, 0, 0)) < (0, 80, 0): diff --git a/wicd/backend.py b/wicd/backend.py index bdd2b8b..15b4a7a 100644 --- a/wicd/backend.py +++ b/wicd/backend.py @@ -7,8 +7,8 @@ Manages and loads the pluggable backends for wicd. """ # -# Copyright (C) 2008 Adam Blackburn -# Copyright (C) 2008 Dan O'Reilly +# 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 diff --git a/wicd/backends/be-external.py b/wicd/backends/be-external.py index 2cce772..13f9303 100644 --- a/wicd/backends/be-external.py +++ b/wicd/backends/be-external.py @@ -13,8 +13,8 @@ class WirelessInterface() -- Control a wireless network interface. """ # -# Copyright (C) 2008 Adam Blackburn -# Copyright (C) 2008 Dan O'Reilly +# 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 @@ -29,15 +29,10 @@ class WirelessInterface() -- Control a wireless network interface. # along with this program. If not, see . # -from wicd import misc -from wicd import wnettools -from wicd.wnettools import * -import re -import os -import os.path +from wicd.wnettools import GetDefaultGateway, GetWiredInterfaces, \ +GetWirelessInterfaces, IsValidWpaSuppDriver, BaseWirelessInterface, \ +BaseWiredInterface, BaseInterface -# Regular expressions for wpa_cli output -auth_patten = re.compile('.*wpa_state=(.*?)\n', wnettools.__re_mode) NAME = "external" UPDATE_INTERVAL = 5 DESCRIPTION = """External app (original) backend @@ -49,15 +44,13 @@ it doesn't require any third party libraries and may be more stable for some set ups. """ -RALINK_DRIVER = 'ralink legacy' - def NeedsExternalCalls(*args, **kargs): - """ Return True, since this backend using iwconfig/ifconfig. """ + """ Return True, since this backend uses iwconfig/ifconfig. """ return True -class Interface(wnettools.BaseInterface): +class Interface(BaseInterface): """ Control a network interface. """ def __init__(self, iface, verbose=False): """ Initialize the object. @@ -67,11 +60,11 @@ class Interface(wnettools.BaseInterface): verbose -- whether to print every command run """ - wnettools.BaseInterface.__init__(self, iface, verbose) + BaseInterface.__init__(self, iface, verbose) self.Check() -class WiredInterface(Interface, wnettools.BaseWiredInterface): +class WiredInterface(Interface, BaseWiredInterface): """ Control a wired network interface. """ def __init__(self, iface, verbose=False): """ Initialise the wired network interface class. @@ -81,11 +74,11 @@ class WiredInterface(Interface, wnettools.BaseWiredInterface): verbose -- print all commands """ - wnettools.BaseWiredInterface.__init__(self, iface, verbose) + BaseWiredInterface.__init__(self, iface, verbose) Interface.__init__(self, iface, verbose) -class WirelessInterface(Interface, wnettools.BaseWirelessInterface): +class WirelessInterface(Interface, BaseWirelessInterface): """ Control a wireless network interface. """ def __init__(self, iface, verbose=False, wpa_driver='wext'): """ Initialise the wireless network interface class. @@ -95,7 +88,5 @@ class WirelessInterface(Interface, wnettools.BaseWirelessInterface): verbose -- print all commands """ - wnettools.BaseWirelessInterface.__init__(self, iface, verbose, - wpa_driver) + BaseWirelessInterface.__init__(self, iface, verbose, wpa_driver) Interface.__init__(self, iface, verbose) - diff --git a/wicd/backends/be-ioctl.py b/wicd/backends/be-ioctl.py index 0b80a2b..a51db1b 100644 --- a/wicd/backends/be-ioctl.py +++ b/wicd/backends/be-ioctl.py @@ -14,8 +14,8 @@ class WirelessInterface() -- Control a wireless network interface. """ # -# Copyright (C) 2008 Adam Blackburn -# Copyright (C) 2008 Dan O'Reilly +# 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 @@ -31,13 +31,23 @@ class WirelessInterface() -- Control a wireless network interface. # from wicd import misc -from wicd import wnettools from wicd import wpath -from wicd.wnettools import * -from wicd.wnettools import wep_pattern, signaldbm_pattern, neediface +from wicd.wnettools import GetDefaultGateway, GetWiredInterfaces, \ +GetWirelessInterfaces, IsValidWpaSuppDriver, BaseWirelessInterface, \ +BaseWiredInterface, BaseInterface, wep_pattern, signaldbm_pattern, neediface -import iwscan -import wpactrl +try: + import iwscan + IWSCAN_AVAIL = True +except ImportError: + print "WARNING: python-iwscan not found, falling back to using iwlist scan." + IWSCAN_AVAIL = False +try: + import wpactrl + WPACTRL_AVAIL = True +except ImportError: + print "WARNING: python-wpactrl not found, falling back to using wpa_cli." + WPACTRL_AVAIL = False import re import os @@ -56,7 +66,7 @@ This backend uses IOCTL calls and python libraries to query network information whenever possible. This makes it fast, but it may not work properly on all systems. -Dependencies: +(Optional) Dependencies: python-wpactrl (http://projects.otaku42.de/wiki/PythonWpaCtrl) python-iwscan (http://projects.otaku42.de/browser/python-iwscan/)""" @@ -105,7 +115,7 @@ def NeedsExternalCalls(*args, **kargs): return False -class Interface(wnettools.BaseInterface): +class Interface(BaseInterface): """ Control a network interface. """ def __init__(self, iface, verbose=False): """ Initialise the object. @@ -115,14 +125,14 @@ class Interface(wnettools.BaseInterface): verbose -- whether to print every command run """ - wnettools.BaseInterface.__init__(self, iface, verbose) + BaseInterface.__init__(self, iface, verbose) self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.Check() def CheckWirelessTools(self): """ Check for the existence needed wireless tools """ - # We don't need any external apps so just return - pass + if not WPACTRL_AVAIL: + BaseInterface.CheckWirelessTools(self) @neediface("") def GetIP(self, ifconfig=""): @@ -162,7 +172,7 @@ class Interface(wnettools.BaseInterface): return bool(flags & 1) -class WiredInterface(Interface, wnettools.BaseWiredInterface): +class WiredInterface(Interface, BaseWiredInterface): """ Control a wired network interface. """ def __init__(self, iface, verbose=False): """ Initialise the wired network interface class. @@ -172,7 +182,7 @@ class WiredInterface(Interface, wnettools.BaseWiredInterface): verbose -- print all commands """ - wnettools.BaseWiredInterface.__init__(self, iface, verbose) + BaseWiredInterface.__init__(self, iface, verbose) Interface.__init__(self, iface, verbose) @neediface(False) @@ -240,7 +250,7 @@ class WiredInterface(Interface, wnettools.BaseWiredInterface): return bool(reg & 0x0004) -class WirelessInterface(Interface, wnettools.BaseWirelessInterface): +class WirelessInterface(Interface, BaseWirelessInterface): """ Control a wireless network interface. """ def __init__(self, iface, verbose=False, wpa_driver='wext'): """ Initialise the wireless network interface class. @@ -250,10 +260,11 @@ class WirelessInterface(Interface, wnettools.BaseWirelessInterface): verbose -- print all commands """ - wnettools.BaseWirelessInterface.__init__(self, iface, verbose, + BaseWirelessInterface.__init__(self, iface, verbose, wpa_driver) Interface.__init__(self, iface, verbose) self.scan_iface = None + self.CheckWirelessTools() @neediface([]) def GetNetworks(self): @@ -263,6 +274,10 @@ class WirelessInterface(Interface, wnettools.BaseWirelessInterface): A list containing available wireless networks. """ + if not IWSCAN_AVAIL: + # Use the slow version if python-iwscan isn't available. + return BaseWirelessInterface.GetNetworks(self) + if not self.scan_iface: try: self.scan_iface = iwscan.WirelessInterface(self.iface) @@ -273,7 +288,7 @@ class WirelessInterface(Interface, wnettools.BaseWirelessInterface): try: results = self.scan_iface.Scan() except iwscan.error, e: - print "ERROR: %s" + print "ERROR: %s" % e return [] return filter(None, [self._parse_ap(cell) for cell in results]) @@ -361,9 +376,10 @@ class WirelessInterface(Interface, wnettools.BaseWirelessInterface): False otherwise. """ - error= "Unable to find ctrl_interface for wpa_supplicant. " + \ - "Could not validate authentication." - + if not WPACTRL_AVAIL: + # If we don't have python-wpactrl, use the slow version. + return BaseWirelessInterface.ValidateAuthentication(self, auth_time) + # Right now there's no way to do this for ralink drivers if self.wpa_driver == RALINK_DRIVER: return True @@ -391,7 +407,6 @@ class WirelessInterface(Interface, wnettools.BaseWirelessInterface): except ValueError: return False - result = result if result.endswith("COMPLETED"): return True elif result.endswith("DISCONNECTED"): @@ -410,6 +425,8 @@ class WirelessInterface(Interface, wnettools.BaseWirelessInterface): @neediface(False) def StopWPA(self): """ Terminates wpa_supplicant using its ctrl interface. """ + if not WPACTRL_AVAIL: + return BaseWirelessInterface.StopWPA(self) wpa = self._connect_to_wpa_ctrl_iface() if not wpa: return diff --git a/wicd/configmanager.py b/wicd/configmanager.py index acfb8a1..b93b1a6 100644 --- a/wicd/configmanager.py +++ b/wicd/configmanager.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -""" Wicd Configuration Manager +""" configmanager -- Wicd configuration file manager Wrapper around ConfigParser for wicd, though it should be reusable for other purposes as well. @@ -8,8 +8,8 @@ reusable for other purposes as well. """ # -# Copyright (C) 2008 Adam Blackburn -# Copyright (C) 2008 Dan O'Reilly +# 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 @@ -28,6 +28,7 @@ from ConfigParser import RawConfigParser from wicd.misc import Noneify, to_unicode +from dbus import Int32 class ConfigManager(RawConfigParser): """ A class that can be used to manage a given configuration file. """ @@ -105,10 +106,17 @@ class ConfigManager(RawConfigParser): # Try to intelligently handle the type of the return value. try: - ret = int(ret) - except (ValueError, TypeError): + if not ret.startswith('0') or len(ret) == 1: + ret = int(ret) + except (ValueError, TypeError, AttributeError): ret = Noneify(ret) - return ret + # This is a workaround for a python-dbus issue on 64-bit systems. + if isinstance(ret, (int, long)): + try: + Int32(ret) + except OverflowError: + ret = str(ret) + return to_unicode(ret) def get(self, *args, **kargs): """ Calls the get_option method """ diff --git a/wicd/configscript.py b/wicd/configscript.py index 9e1a7c5..cf10596 100755 --- a/wicd/configscript.py +++ b/wicd/configscript.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -""" Configure the scripts for a particular network. +""" 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 @@ -10,8 +10,8 @@ run as the current user. """ # -# Copyright (C) 2007-2008 Adam Blackburn -# Copyright (C) 2007-2008 Dan O'Reilly +# 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 @@ -33,16 +33,17 @@ import ConfigParser import gtk.glade from wicd import wpath -from wicd import misc +from wicd import translations from wicd import dbusmanager -_ = misc.get_gettext() +_ = translations.get_gettext() language = {} language['configure_scripts'] = _("Configure Scripts") language['before_script'] = _("Pre-connection Script") language['after_script'] = _("Post-connection Script") -language['disconnect_script'] = _("Disconnection Script") +language['pre_disconnect_script'] = _("Pre-disconnection Script") +language['post_disconnect_script'] = _("Post-disconnection Script") dbus = dbusmanager.DBusManager() dbus.connect_to_dbus() @@ -100,14 +101,16 @@ def get_script_info(network, network_type): if con.has_section(network): info["pre_entry"] = get_val(con, network, "beforescript") info["post_entry"] = get_val(con, network, "afterscript") - info["disconnect_entry"] = get_val(con, network, "disconnectscript") + info["pre_disconnect_entry"] = get_val(con, network, "predisconnectscript") + info["post_disconnect_entry"] = get_val(con, network, "postdisconnectscript") else: bssid = wireless.GetWirelessProperty(int(network), "bssid") con.read(wireless_conf) if con.has_section(bssid): info["pre_entry"] = get_val(con, bssid, "beforescript") info["post_entry"] = get_val(con, bssid, "afterscript") - info["disconnect_entry"] = get_val(con, bssid, "disconnectscript") + info["pre_disconnect_entry"] = get_val(con, bssid, "predisconnectscript") + info["post_disconnect_entry"] = get_val(con, bssid, "postdisconnectscript") return info def write_scripts(network, network_type, script_info): @@ -120,7 +123,8 @@ def write_scripts(network, network_type, script_info): con.add_section(network) con.set(network, "beforescript", script_info["pre_entry"]) con.set(network, "afterscript", script_info["post_entry"]) - con.set(network, "disconnectscript", script_info["disconnect_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) @@ -132,7 +136,8 @@ def write_scripts(network, network_type, script_info): con.add_section(bssid) con.set(bssid, "beforescript", script_info["pre_entry"]) con.set(bssid, "afterscript", script_info["post_entry"]) - con.set(bssid, "disconnectscript", script_info["disconnect_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)) @@ -155,25 +160,30 @@ def main (argv): dialog = wTree.get_widget("configure_script_dialog") wTree.get_widget("pre_label").set_label(language['before_script'] + ":") wTree.get_widget("post_label").set_label(language['after_script'] + ":") - wTree.get_widget("disconnect_label").set_label(language['disconnect_script'] + wTree.get_widget("pre_disconnect_label").set_label(language['pre_disconnect_script'] + + ":") + wTree.get_widget("post_disconnect_label").set_label(language['post_disconnect_script'] + ":") wTree.get_widget("window1").hide() pre_entry = wTree.get_widget("pre_entry") post_entry = wTree.get_widget("post_entry") - disconnect_entry = wTree.get_widget("disconnect_entry") + pre_disconnect_entry = wTree.get_widget("pre_disconnect_entry") + post_disconnect_entry = wTree.get_widget("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"))) - disconnect_entry.set_text(none_to_blank(script_info.get("disconnect_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["disconnect_entry"] = blank_to_none(disconnect_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() diff --git a/wicd/dbusmanager.py b/wicd/dbusmanager.py index 0c25b6c..17e9e0c 100644 --- a/wicd/dbusmanager.py +++ b/wicd/dbusmanager.py @@ -7,8 +7,8 @@ A module for managing wicd's dbus interfaces. """ # -# Copyright (C) 2008 Adam Blackburn -# Copyright (C) 2008 Dan O'Reilly +# 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 @@ -24,7 +24,6 @@ A module for managing wicd's dbus interfaces. # import dbus -from dbus import DBusException if getattr(dbus, "version", (0, 0, 0)) < (0, 80, 0): import dbus.glib else: diff --git a/wicd/gui.py b/wicd/gui.py index 6832337..2c426f9 100644 --- a/wicd/gui.py +++ b/wicd/gui.py @@ -1,15 +1,14 @@ #!/usr/bin/python -""" Wicd GUI module. +""" gui -- The main wicd GUI module. -Module containg all the code (other than the tray icon) related to the -Wicd user interface. +Module containing the code for the main wicd GUI. """ # -# Copyright (C) 2007 Adam Blackburn -# Copyright (C) 2007 Dan O'Reilly +# 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 @@ -32,7 +31,6 @@ import pango import gtk import gtk.glade from dbus import DBusException -from dbus import version as dbus_version from wicd import misc from wicd import wpath @@ -42,7 +40,7 @@ from wicd import netentry from wicd.misc import noneToString from wicd.netentry import WiredNetworkEntry, WirelessNetworkEntry from wicd.prefs import PreferencesDialog -from wicd.guiutil import error, GreyLabel, LabelEntry, SmallLabel +from wicd.guiutil import error, LabelEntry from wicd.translations import language if __name__ == '__main__': @@ -58,7 +56,9 @@ def setup_dbus(force=True): except DBusException: if force: print "Can't connect to the daemon, trying to start it automatically..." - misc.PromptToStartDaemon() + if not misc.PromptToStartDaemon(): + print "Failed to find a graphical sudo program, cannot continue." + return False try: dbusmanager.connect_to_dbus() except DBusException: @@ -141,13 +141,16 @@ class WiredProfileChooser: class appGui(object): """ The main wicd GUI class. """ - def __init__(self, standalone=False): + def __init__(self, standalone=False, tray=None): """ Initializes everything needed for the GUI. """ setup_dbus() + self.tray = tray + gladefile = os.path.join(wpath.share, "wicd.glade") self.wTree = gtk.glade.XML(gladefile) self.window = self.wTree.get_widget("window1") + self.window.set_icon_name("wicd-client") size = daemon.ReadWindowSize("main") width = size[0] height = size[1] @@ -283,7 +286,11 @@ class appGui(object): def disconnect_all(self, widget=None): """ Disconnects from any active network. """ - daemon.Disconnect() + def handler(*args): + gobject.idle_add(self.network_list.set_sensitive, True) + + self.network_list.set_sensitive(False) + daemon.Disconnect(reply_handler=handler, error_handler=handler) def about_dialog(self, widget, event=None): """ Displays an about dialog. """ @@ -304,7 +311,7 @@ class appGui(object): def settings_dialog(self, widget, event=None): """ Displays a general settings dialog. """ if not self.pref: - self.pref = PreferencesDialog(self.wTree) + self.pref = PreferencesDialog(self, self.wTree) else: self.pref.load_preferences_diag() if self.pref.run() == 1: @@ -508,11 +515,11 @@ class appGui(object): printLine = True # In this case we print a separator. wirednet = WiredNetworkEntry() self.network_list.pack_start(wirednet, False, False) - wirednet.connect_button.connect("button-press-event", self.connect, + wirednet.connect_button.connect("clicked", self.connect, "wired", 0, wirednet) - wirednet.disconnect_button.connect("button-press-event", self.disconnect, + wirednet.disconnect_button.connect("clicked", self.disconnect, "wired", 0, wirednet) - wirednet.advanced_button.connect("button-press-event", + wirednet.advanced_button.connect("clicked", self.edit_advanced, "wired", 0, wirednet) @@ -530,13 +537,13 @@ class appGui(object): printLine = True tempnet = WirelessNetworkEntry(x) self.network_list.pack_start(tempnet, False, False) - tempnet.connect_button.connect("button-press-event", + tempnet.connect_button.connect("clicked", self.connect, "wireless", x, tempnet) - tempnet.disconnect_button.connect("button-press-event", + tempnet.disconnect_button.connect("clicked", self.disconnect, "wireless", x, tempnet) - tempnet.advanced_button.connect("button-press-event", + tempnet.advanced_button.connect("clicked", self.edit_advanced, "wireless", x, tempnet) else: @@ -595,7 +602,7 @@ class appGui(object): return True - def edit_advanced(self, widget, event, ttype, networkid, networkentry): + def edit_advanced(self, widget, ttype, networkid, networkentry): """ Display the advanced settings dialog. Displays the advanced settings dialog and saves any changes made. @@ -635,7 +642,7 @@ class appGui(object): for entry_info in encryption_info.itervalues(): if entry_info[0].entry.get_text() == "" and \ entry_info[1] == 'required': - error(self, "%s (%s)" % (language['encrypt_info_missing'], + error(self.window, "%s (%s)" % (language['encrypt_info_missing'], entry_info[0].label.get_label()) ) return False @@ -646,21 +653,47 @@ class appGui(object): return False return True - def connect(self, widget, event, nettype, networkid, networkentry): + def _wait_for_connect_thread_start(self): + self.wTree.get_widget("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. """ - cancel_button = self.wTree.get_widget("cancel_button") - cancel_button.set_sensitive(True) + def handler(*args): + self._connect_thread_started = True + + def setup_interface_for_connection(): + cancel_button = self.wTree.get_widget("cancel_button") + cancel_button.set_sensitive(True) + self.network_list.set_sensitive(False) + if self.statusID: + gobject.idle_add(self.status_bar.remove, 1, self.statusID) + gobject.idle_add(self.set_status, language["disconnecting_active"]) + 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, None, nettype, networkid, networkentry) + self.edit_advanced(None, nettype, networkid, networkentry) return False - wireless.ConnectWireless(networkid) + setup_interface_for_connection() + wireless.ConnectWireless(networkid, reply_handler=handler, + error_handler=handler) elif nettype == "wired": - wired.ConnectWired() - self.update_statusbar() + setup_interface_for_connection() + wired.ConnectWired(reply_handler=handler, error_handler=handler) - def disconnect(self, widget, event, nettype, networkid, networkentry): + 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: @@ -671,13 +704,18 @@ class appGui(object): networkentry -- The NetworkEntry containing the disconnect button. """ + def handler(*args): + 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() + wired.DisconnectWired(reply_handler=handler, error_handler=handler) else: - wireless.DisconnectWireless() + 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. @@ -707,7 +745,7 @@ class appGui(object): try: daemon.WriteWindowSize(width, height, "main") daemon.SetGUIOpen(False) - except dbusmanager.DBusException: + except DBusException: pass if self.standalone: diff --git a/wicd/guiutil.py b/wicd/guiutil.py index 8eea489..6d103b9 100644 --- a/wicd/guiutil.py +++ b/wicd/guiutil.py @@ -1,7 +1,7 @@ """ guiutil - A collection of commonly used gtk/gui functions and classes. """ # -# Copyright (C) 2007 - 2008 Adam Blackburn -# Copyright (C) 2007 - 2008 Dan O'Reilly +# 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 @@ -17,11 +17,39 @@ # import gtk +import os.path +import 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) @@ -146,5 +174,5 @@ class GreyLabel(gtk.Label): gtk.Label.__init__(self) def set_label(self, text): - self.set_markup("" + text + "") + self.set_markup(text) self.set_alignment(0, 0) diff --git a/wicd/logfile.py b/wicd/logfile.py index c25dd03..639a912 100644 --- a/wicd/logfile.py +++ b/wicd/logfile.py @@ -2,7 +2,7 @@ # # Copyright (C) 1999-2006 Keith Dart -# Copyright (C) 2008 Dan O'Reilly +# Copyright (C) 2008-2009 Dan O'Reilly # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -25,8 +25,6 @@ import sys import os import time -import wicd.wpath as wpath - class SizeError(IOError): pass diff --git a/wicd/misc.py b/wicd/misc.py index 0c6dbaa..64a877d 100644 --- a/wicd/misc.py +++ b/wicd/misc.py @@ -1,8 +1,13 @@ -""" Misc - miscellaneous functions for wicd """ +""" misc - miscellaneous functions for wicd + +This module contains a large variety of utility functions used +throughout wicd. + +""" # -# Copyright (C) 2007 - 2008 Adam Blackburn -# Copyright (C) 2007 - 2008 Dan O'Reilly +# 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 @@ -44,6 +49,7 @@ AUTO = 0 DHCLIENT = 1 DHCPCD = 2 PUMP = 3 +UDHCPC = 4 # Link detection tools ETHTOOL = 1 @@ -68,7 +74,6 @@ class WicdError(Exception): pass -__LANG = None def Run(cmd, include_stderr=False, return_pipe=False, return_obj=False, return_retcode=True): """ Run a command. @@ -88,7 +93,6 @@ def Run(cmd, include_stderr=False, return_pipe=False, for the command that was run. """ - global __LANG if not isinstance(cmd, list): cmd = to_unicode(str(cmd)) cmd = cmd.split() @@ -105,11 +109,9 @@ def Run(cmd, include_stderr=False, return_pipe=False, # We need to make sure that the results of the command we run # are in English, so we set up a temporary environment. - if not __LANG: - __LANG = get_good_lang() tmpenv = os.environ.copy() - tmpenv["LC_ALL"] = __LANG - tmpenv["LANG"] = __LANG + tmpenv["LC_ALL"] = "C" + tmpenv["LANG"] = "C" try: f = Popen(cmd, shell=False, stdout=PIPE, stdin=std_in, stderr=err, @@ -118,7 +120,6 @@ def Run(cmd, include_stderr=False, return_pipe=False, print "Running command %s failed: %s" % (str(cmd), str(e)) return "" - if return_obj: return f if return_pipe: @@ -126,14 +127,6 @@ def Run(cmd, include_stderr=False, return_pipe=False, else: return f.communicate()[0] -def get_good_lang(): - """ Check if en_US.utf8 is an available locale, if not use C. """ - output = Popen(["locale", "-a"], shell=False, stdout=PIPE).communicate()[0] - if "en_US.utf8" in output: - return "en_US.utf8" - else: - return "C" - def LaunchAndWait(cmd): """ Launches the given program with the given arguments, then blocks. @@ -163,6 +156,8 @@ def PromptToStartDaemon(): """ Prompt the user to start the daemon """ daemonloc = wpath.sbin + 'wicd' sudo_prog = choose_sudo_prog() + if not sudo_prog: + return False if "gksu" in sudo_prog or "ktsuss" in sudo_prog: msg = '--message' else: @@ -171,6 +166,7 @@ def PromptToStartDaemon(): 'Wicd needs to access your computer\'s network cards.', daemonloc] os.spawnvpe(os.P_WAIT, sudo_prog, sudo_args, os.environ) + return True def RunRegex(regex, string): """ runs a regex search on a string """ @@ -186,6 +182,8 @@ def WriteLine(my_file, text): def ExecuteScripts(scripts_dir, verbose=False): """ Execute every executable file in a given directory. """ + if not os.path.exists(scripts_dir): + return for obj in os.listdir(scripts_dir): obj = os.path.abspath(os.path.join(scripts_dir, obj)) if os.path.isfile(obj) and os.access(obj, os.X_OK): @@ -197,7 +195,7 @@ def ExecuteScript(script, verbose=False): print "Executing %s" % script ret = call("%s > /dev/null 2>&1" % script, shell=True) if verbose: - "%s returned %s" % (script, ret) + print "%s returned %s" % (script, ret) def ReadFile(filename): """ read in a file and return it's contents as a string """ @@ -256,7 +254,8 @@ def ParseEncryption(network): else: rep_val = network.get(cur_val[0].lower()) if rep_val: - line = line.replace("$_%s" % cur_val[0], rep_val) + line = line.replace("$_%s" % cur_val[0], + str(rep_val)) config_file = ''.join([config_file, line]) else: print "Ignoring template line: '%s'" % line @@ -450,7 +449,7 @@ def choose_sudo_prog(prog_num=0): paths = [] if desktop_env == "kde": - progs = ["kdesu", "kdesudo", "ktusss"] + progs = ["kdesu", "kdesudo", "ktsuss"] else: progs = ["gksudo", "gksu", "ktsuss"] @@ -460,8 +459,7 @@ def choose_sudo_prog(prog_num=0): for path in paths: if os.path.exists(path): return path - - return None + return "" def find_path(cmd): """ Try to find a full path for a given file name. @@ -497,7 +495,7 @@ def stringToNone(text): def checkboxTextboxToggle(checkbox, textboxes): for textbox in textboxes: textbox.set_sensitive(checkbox.get_active()) - + def threaded(f): """ A decorator that will make any function run in a new thread. """ @@ -547,4 +545,3 @@ def grouper(n, iterable, fillvalue=None): """ args = [iter(iterable)] * n return izip_longest(fillvalue=fillvalue, *args) - diff --git a/wicd/monitor.py b/wicd/monitor.py index f9724b0..b251e02 100755 --- a/wicd/monitor.py +++ b/wicd/monitor.py @@ -8,8 +8,8 @@ when appropriate. """ # -# Copyright (C) 2007 - 2008 Adam Blackburn -# Copyright (C) 2007 - 2008 Dan O'Reilly +# 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 @@ -26,7 +26,6 @@ when appropriate. import gobject import time -import sys from dbus import DBusException @@ -45,7 +44,7 @@ daemon = dbus_dict["daemon"] wired = dbus_dict["wired"] wireless = dbus_dict["wireless"] -monitor = to_time = update_callback = mainloop = None +mainloop = None def diewithdbus(func): def wrapper(self, *__args, **__kargs): @@ -53,7 +52,7 @@ def diewithdbus(func): ret = func(self, *__args, **__kargs) self.__lost_dbus_count = 0 return ret - except dbusmanager.DBusException, e: + except DBusException, e: print "Caught exception %s" % str(e) if not hasattr(self, "__lost_dbus_count"): self.__lost_dbus_count = 0 @@ -86,11 +85,42 @@ class ConnectionStatus(object): self.iwconfig = "" self.trigger_reconnect = False self.__lost_dbus_count = 0 - + self._to_time = daemon.GetBackendUpdateInterval() + + self.add_poll_callback() bus = dbusmanager.get_bus() bus.add_signal_receiver(self._force_update_connection_status, "UpdateState", "org.wicd.daemon") + bus.add_signal_receiver(self._update_timeout_interval, + "SignalBackendChanged", "org.wicd.daemon") + def _update_timeout_interval(self, interval): + """ Update the callback interval when signaled by the daemon. """ + self._to_time = interval + gobject.source_remove(self.update_callback) + self.add_poll_callback() + + def _force_update_connection_status(self): + """ Run a connection status update on demand. + + Removes the scheduled update_connection_status() + call, explicitly calls the function, and reschedules + it. + + """ + gobject.source_remove(self.update_callback) + self.update_connection_status() + self.add_poll_callback() + + def add_poll_callback(self): + """ Registers a polling call at a predetermined interval. + + The polling interval is determined by the backend in use. + + """ + self.update_callback = misc.timeout_add(self._to_time, + self.update_connection_status) + def check_for_wired_connection(self, wired_ip): """ Checks for a wired connection. @@ -144,15 +174,18 @@ class ConnectionStatus(object): self.iwconfig = '' # Reset this, just in case. self.tried_reconnect = False + bssid = wireless.GetApBssid() + if not bssid: + return False - wifi_signal = self._get_printable_sig_strength() - if wifi_signal == 0: + wifi_signal = self._get_printable_sig_strength(always_positive=True) + if wifi_signal <= 0: # If we have no signal, increment connection loss counter. # If we haven't gotten any signal 4 runs in a row (12 seconds), # try to reconnect. self.connection_lost_counter += 1 print self.connection_lost_counter - if self.connection_lost_counter >= 4: + if self.connection_lost_counter >= 4 and daemon.GetAutoReconnect(): wireless.DisconnectWireless() self.connection_lost_counter = 0 return False @@ -229,19 +262,6 @@ class ConnectionStatus(object): self.auto_reconnect(from_wireless) return self.update_state(state) - def _force_update_connection_status(self): - """ Run a connection status update on demand. - - Removes the scheduled update_connection_status() - call, explicitly calls the function, and reschedules - it. - - """ - global update_callback - gobject.source_remove(update_callback) - self.update_connection_status() - add_poll_callback() - def update_state(self, state, wired_ip=None, wifi_ip=None): """ Set the current connection state. """ # Set our connection state/info. @@ -277,13 +297,20 @@ class ConnectionStatus(object): self.last_state = state return True - def _get_printable_sig_strength(self): + def _get_printable_sig_strength(self, always_positive=False): """ Get the correct signal strength format. """ try: if daemon.GetSignalDisplayType() == 0: wifi_signal = int(wireless.GetCurrentSignalStrength(self.iwconfig)) else: - wifi_signal = int(wireless.GetCurrentDBMStrength(self.iwconfig)) + if always_positive: + # because dBm is negative, add 99 to the signal. This way, if + # the signal drops below -99, wifi_signal will == 0, and + # an automatic reconnect will be triggered + # this is only used in check_for_wireless_connection + wifi_signal = 99 + int(wireless.GetCurrentDBMStrength(self.iwconfig)) + else: + wifi_signal = int(wireless.GetCurrentDBMStrength(self.iwconfig)) except TypeError: wifi_signal = 0 @@ -334,12 +361,6 @@ def err_handle(error): """ Just a dummy function needed for asynchronous dbus calls. """ pass -def add_poll_callback(): - global monitor, to_time, update_callback - - update_callback = misc.timeout_add(to_time, - monitor.update_connection_status) - def main(): """ Starts the connection monitor. @@ -347,11 +368,8 @@ def main(): an amount of time determined by the active backend. """ - global monitor, to_time, mainloop - + global mainloop monitor = ConnectionStatus() - to_time = daemon.GetBackendUpdateInterval() - add_poll_callback() mainloop = gobject.MainLoop() mainloop.run() diff --git a/wicd/netentry.py b/wicd/netentry.py index a6e1919..44bfa10 100644 --- a/wicd/netentry.py +++ b/wicd/netentry.py @@ -1,6 +1,13 @@ +""" 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) 2007 Adam Blackburn -# Copyright (C) 2007 Dan O'Reilly +# 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 @@ -22,7 +29,7 @@ import misc import wpath import dbusmanager from misc import noneToString, stringToNone, noneToBlankString, to_bool -from guiutil import error, SmallLabel, LabelEntry, GreyLabel, LeftAlignedLabel, string_input +from guiutil import error, LabelEntry, GreyLabel, LeftAlignedLabel, string_input from translations import language @@ -38,14 +45,20 @@ def setup_dbus(): wired = dbusmanager.get_interface('wired') class AdvancedSettingsDialog(gtk.Dialog): - def __init__(self): + 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. """ - gtk.Dialog.__init__(self, title=language['properties'], + # if no network name was passed, just use Properties as the title + if network_name: + title = '%s - %s' % (network_name, language['properties']) + else: + title = language['properties'] + + gtk.Dialog.__init__(self, title=title, flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_OK, @@ -229,9 +242,9 @@ class AdvancedSettingsDialog(gtk.Dialog): class WiredSettingsDialog(AdvancedSettingsDialog): def __init__(self, name): """ Build the wired settings dialog. """ - AdvancedSettingsDialog.__init__(self) + AdvancedSettingsDialog.__init__(self, language['wired_network']) self.des = self.connect("destroy", self.destroy_called) - self.script_button.connect("button-press-event", self.edit_scripts) + self.script_button.connect("clicked", self.edit_scripts) self.prof_name = name def set_net_prop(self, option, value): @@ -287,7 +300,7 @@ class WiredSettingsDialog(AdvancedSettingsDialog): class WirelessSettingsDialog(AdvancedSettingsDialog): def __init__(self, networkID): """ Build the wireless settings dialog. """ - AdvancedSettingsDialog.__init__(self) + AdvancedSettingsDialog.__init__(self, wireless.GetWirelessProperty(networkID, 'essid')) # Set up encryption stuff self.networkID = networkID self.combo_encryption = gtk.combo_box_new_text() @@ -302,7 +315,7 @@ class WirelessSettingsDialog(AdvancedSettingsDialog): 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)) + information_button.connect('clicked', lambda *a, **k: WirelessInformationDialog(networkID, self)) information_button.show() # Build the encryption menu @@ -328,7 +341,7 @@ class WirelessSettingsDialog(AdvancedSettingsDialog): # Connect signals. self.chkbox_encryption.connect("toggled", self.toggle_encryption) self.combo_encryption.connect("changed", self.change_encrypt_method) - self.script_button.connect("button-press-event", self.edit_scripts) + self.script_button.connect("clicked", self.edit_scripts) self.des = self.connect("destroy", self.destroy_called) def destroy_called(self, *args): @@ -398,9 +411,9 @@ class WirelessSettingsDialog(AdvancedSettingsDialog): def save_settings(self, networkid): # Check encryption info + encrypt_info = self.encryption_info if self.chkbox_encryption.get_active(): print "setting encryption info..." - encrypt_info = self.encryption_info encrypt_methods = self.encrypt_types self.set_net_prop("enctype", encrypt_methods[self.combo_encryption.get_active()]['type']) @@ -424,8 +437,6 @@ class WirelessSettingsDialog(AdvancedSettingsDialog): else: print "no encryption specified..." self.set_net_prop("enctype", "None") - for entry in encrypt_info.iterkeys(): - self.set_net_prop(entry[0].entry, "") AdvancedSettingsDialog.save_settings(self) if self.chkbox_global_settings.get_active(): @@ -550,7 +561,8 @@ class WiredNetworkEntry(NetworkEntry): self.image.show() self.connect_button.show() - self.name_label.set_label(language['wired_network']) + self.name_label.set_use_markup(True) + self.name_label.set_label("" + language['wired_network'] + "") self.is_full_gui = True @@ -643,17 +655,16 @@ class WiredNetworkEntry(NetworkEntry): def add_profile(self, widget): """ Add a profile to the profile list. """ - print "adding profile" - 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:") + "profiles.", "Profile name:").strip() # if response is "" or None if not response: - return + error(None, "Invalid profile name", block=True) + return False profile_name = response profile_list = wired.GetWiredProfileList() @@ -751,7 +762,7 @@ class WirelessNetworkEntry(NetworkEntry): '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.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(), @@ -872,8 +883,8 @@ class WirelessNetworkEntry(NetworkEntry): class WirelessInformationDialog(gtk.Dialog): - def __init__(self, networkID): - gtk.Dialog.__init__(self) + def __init__(self, networkID, parent): + gtk.Dialog.__init__(self,parent=parent) # Make the combo box. self.lbl_strength = gtk.Label() diff --git a/wicd/networking.py b/wicd/networking.py index 6f8e42e..1269e5c 100644 --- a/wicd/networking.py +++ b/wicd/networking.py @@ -19,9 +19,9 @@ class WiredConnectThread() -- Connection thread for wired """ # -# Copyright (C) 2007 - 2008 Adam Blackburn -# Copyright (C) 2007 - 2008 Dan O'Reilly -# Copyright (C) 2007 - 2008 Byron Hillis +# Copyright (C) 2007 - 2009 Adam Blackburn +# Copyright (C) 2007 - 2009 Dan O'Reilly +# Copyright (C) 2007 - 2009 Byron Hillis # # 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 @@ -116,7 +116,9 @@ def expand_script_macros(script, msg, bssid, essid): script -- the script to execute. msg -- the name of the script, %{script} will be expanded to this. bssid -- the bssid of the network we connect to, defaults to 'wired'. - essid -- the essid of the network we connect to, defaults to 'wired'.""" + essid -- the essid of the network we connect to, defaults to 'wired'. + + """ def repl(match): macro = match.group(1).lower() if macro_dict.has_key(macro): @@ -149,10 +151,10 @@ class Controller(object): self.connecting_thread = None self.before_script = None self.after_script = None - self.disconnect_script = None + self.pre_disconnect_script = None + self.post_disconnect_script = None self.driver = None self.iface = None - self.backend_manager = BackendManager() def get_debug(self): return self._debug def set_debug(self, value): @@ -202,17 +204,23 @@ class Controller(object): def Disconnect(self, *args, **kargs): """ Disconnect from the network. """ iface = self.iface - misc.ExecuteScripts(wpath.disconnectscripts, self.debug) - if self.disconnect_script: - print 'Running disconnect script' - misc.ExecuteScript(expand_script_macros(self.disconnect_script, - 'disconnection', *args), + misc.ExecuteScripts(wpath.predisconnectscripts, self.debug) + if self.pre_disconnect_script: + print 'Running pre-disconnect script' + misc.ExecuteScript(expand_script_macros(self.pre_disconnect_script, + 'pre-disconnection', *args), self.debug) iface.ReleaseDHCP() iface.SetAddress('0.0.0.0') iface.FlushRoutes() iface.Down() iface.Up() + misc.ExecuteScripts(wpath.postdisconnectscripts, self.debug) + if self.post_disconnect_script: + print 'Running post-disconnect script' + misc.ExecuteScript(expand_script_macros(self.post_disconnect_script, + 'post-disconnection', *args), + self.debug) def ReleaseDHCP(self): """ Release the DHCP lease for this interface. """ @@ -272,8 +280,8 @@ class ConnectThread(threading.Thread): lock = threading.Lock() def __init__(self, network, interface_name, before_script, after_script, - disconnect_script, gdns1, gdns2, gdns3, gdns_dom, gsearch_dom, - iface, debug): + pre_disconnect_script, post_disconnect_script, gdns1, + gdns2, gdns3, gdns_dom, gsearch_dom, iface, debug): """ Initialise the required object variables and the thread. Keyword arguments: @@ -282,7 +290,8 @@ class ConnectThread(threading.Thread): wired -- name of the wired interface before_script -- script to run before bringing up the interface after_script -- script to run after bringing up the interface - disconnect_script -- script to run after disconnection + pre_disconnect_script -- script to run before disconnection + post_disconnect_script -- script to run after disconnection gdns1 -- global DNS server 1 gdns2 -- global DNS server 2 gdns3 -- global DNS server 3 @@ -296,7 +305,8 @@ class ConnectThread(threading.Thread): self.connect_result = None self.before_script = before_script self.after_script = after_script - self.disconnect_script = disconnect_script + self.pre_disconnect_script = pre_disconnect_script + self.post_disconnect_script = post_disconnect_script self._should_die = False self.abort_reason = "" self.connect_result = "" @@ -314,6 +324,13 @@ class ConnectThread(threading.Thread): self.SetStatus('interface_down') + def run(self): + self.connect_result = "Failed" + try: + self._connect() + finally: + self.is_connecting = False + def set_should_die(self, val): self.lock.acquire() try: @@ -564,23 +581,13 @@ class Wireless(Controller): """ def comp(x, y): - if x.has_key('quality'): - if x['quality'] > y['quality']: - return 1 - elif x['quality'] < y['quality']: - return -1 - else: - return 0 + if 'quality' in x: + key = 'quality' else: - if x['strength'] < y['strength']: - return 1 - elif x['strength'] > y['strength']: - return -1 - else: - return 0 + key = 'strength' + return cmp(x[key], y[key]) if not self.wiface: return [] - wiface = self.wiface # Prepare the interface for scanning @@ -609,7 +616,8 @@ class Wireless(Controller): self.connecting_thread = WirelessConnectThread(network, self.wireless_interface, self.wpa_driver, self.before_script, - self.after_script, self.disconnect_script, self.global_dns_1, + self.after_script, self.pre_disconnect_script, + self.post_disconnect_script, self.global_dns_1, self.global_dns_2, self.global_dns_3, self.global_dns_dom, self.global_search_dom, self.wiface, debug) self.connecting_thread.setDaemon(True) @@ -711,7 +719,7 @@ class Wireless(Controller): wiface = self.wiface print 'Creating ad-hoc network' print 'Stopping dhcp client and wpa_supplicant' - BACKEND.ReleaseDHCP() + wiface.ReleaseDHCP() wiface.StopWPA() print 'Putting wireless interface down' wiface.Down() @@ -771,6 +779,7 @@ class Wireless(Controller): """ Sets the wpa_supplicant driver associated with the interface. """ self.wiface.SetWpaDriver(driver) + class WirelessConnectThread(ConnectThread): """ A thread class to perform the connection to a wireless network. @@ -780,8 +789,9 @@ class WirelessConnectThread(ConnectThread): """ def __init__(self, network, wireless, wpa_driver, before_script, - after_script, disconnect_script, gdns1, gdns2, gdns3, - gdns_dom, gsearch_dom, wiface, debug=False): + after_script, pre_disconnect_script, post_disconnect_script, + gdns1, gdns2, gdns3, gdns_dom, gsearch_dom, wiface, + debug=False): """ Initialise the thread with network information. Keyword arguments: @@ -790,19 +800,21 @@ class WirelessConnectThread(ConnectThread): wpa_driver -- type of wireless interface before_script -- script to run before bringing up the interface after_script -- script to run after bringing up the interface - disconnect_script -- script to run after disconnection + pre_disconnect_script -- script to run before disconnection + post_disconnect_script -- script to run after disconnection gdns1 -- global DNS server 1 gdns2 -- global DNS server 2 gdns3 -- global DNS server 3 """ ConnectThread.__init__(self, network, wireless, before_script, - after_script, disconnect_script, gdns1, gdns2, + after_script, pre_disconnect_script, + post_disconnect_script, gdns1, gdns2, gdns3, gdns_dom, gsearch_dom, wiface, debug) self.wpa_driver = wpa_driver - def run(self): + def _connect(self): """ The main function of the connection thread. This function performs the necessary calls to connect to the @@ -831,17 +843,17 @@ class WirelessConnectThread(ConnectThread): self.reset_ip_addresses(wiface) self.stop_wpa(wiface) self.flush_routes(wiface) - - # Generate PSK and authenticate if needed. - if self.wpa_driver != 'ralink legacy': - self.generate_psk_and_authenticate(wiface) + wiface.SetMode(self.network['mode']) # Put interface up. self.SetStatus('configuring_interface') self.put_iface_up(wiface) + # Generate PSK and authenticate if needed. + if self.wpa_driver != 'ralink legacy': + self.generate_psk_and_authenticate(wiface) + # Associate. - wiface.SetMode(self.network['mode']) wiface.Associate(self.network['essid'], self.network['channel'], self.network['bssid']) @@ -854,7 +866,8 @@ class WirelessConnectThread(ConnectThread): if self.network.get('enctype'): self.SetStatus('validating_authentication') if not wiface.ValidateAuthentication(time.time()): - if not self.connect_result: + print "connect result is %s" % self.connect_result + if not self.connect_result or self.connect_result == 'Failed': self.abort_connection('bad_pass') # Set up gateway, IP address, and DNS servers. @@ -968,9 +981,10 @@ class Wired(Controller): if not self.liface: return False self.connecting_thread = WiredConnectThread(network, self.wired_interface, self.before_script, self.after_script, - self.disconnect_script, self.global_dns_1, self.global_dns_2, - self.global_dns_3, self.global_dns_dom, self.global_search_dom, - self.liface, debug) + self.pre_disconnect_script, self.post_disconnect_script, + self.global_dns_1, self.global_dns_2, self.global_dns_3, + self.global_dns_dom, self.global_search_dom, self.liface, + debug) self.connecting_thread.setDaemon(True) self.connecting_thread.start() return self.connecting_thread @@ -994,8 +1008,8 @@ class WiredConnectThread(ConnectThread): """ def __init__(self, network, wired, before_script, after_script, - disconnect_script, gdns1, gdns2, gdns3, gdns_dom, gsearch_dom, - liface, debug=False): + pre_disconnect_script, post_disconnect_script, gdns1, + gdns2, gdns3, gdns_dom, gsearch_dom, liface, debug=False): """ Initialise the thread with network information. Keyword arguments: @@ -1004,17 +1018,19 @@ class WiredConnectThread(ConnectThread): wired -- name of the wired interface before_script -- script to run before bringing up the interface after_script -- script to run after bringing up the interface - disconnect_script -- script to run after disconnection + pre_disconnect_script -- script to run before disconnection + post_disconnect_script -- script to run after disconnection gdns1 -- global DNS server 1 gdns2 -- global DNS server 2 gdns3 -- global DNS server 3 """ ConnectThread.__init__(self, network, wired, before_script, - after_script, disconnect_script, gdns1, gdns2, + after_script, pre_disconnect_script, + post_disconnect_script, gdns1, gdns2, gdns3, gdns_dom, gsearch_dom, liface, debug) - def run(self): + def _connect(self): """ The main function of the connection thread. This function performs the necessary calls to connect to the @@ -1063,4 +1079,3 @@ class WiredConnectThread(ConnectThread): self.connect_result = "Success" self.is_connecting = False - diff --git a/wicd/prefs.py b/wicd/prefs.py index d25267b..4677463 100644 --- a/wicd/prefs.py +++ b/wicd/prefs.py @@ -1,6 +1,6 @@ #!/usr/bin/python -""" Wicd Preferences Dialog. +""" prefs -- Wicd Preferences Dialog. Displays the main settings dialog window for wicd and handles recieving/sendings the settings from/to the daemon. @@ -8,8 +8,8 @@ handles recieving/sendings the settings from/to the daemon. """ # -# Copyright (C) 2007 Adam Blackburn -# Copyright (C) 2007 Dan O'Reilly +# 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 @@ -26,7 +26,7 @@ handles recieving/sendings the settings from/to the daemon. import gtk import gobject -import pango +#import pango import os import gtk.glade @@ -41,6 +41,8 @@ wired = None from translations import language +USER_SETTINGS_DIR = os.path.expanduser('~/.wicd/') + def setup_dbus(): global daemon, wireless, wired daemon = dbusmanager.get_interface('daemon') @@ -49,20 +51,18 @@ def setup_dbus(): class PreferencesDialog(object): """ Class for handling the wicd preferences dialog window. """ - def __init__(self, wTree): + 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. """ - def set_available(apps): - for app in apps: - app.set_sensitive(daemon.GetAppAvailable(app.get_label())) - # Disable radios for apps that aren't installed. - set_available(radio_list[1:]) + 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"): @@ -82,7 +82,7 @@ class PreferencesDialog(object): self.preferwiredcheckbox.set_active(daemon.GetPreferWiredNetwork()) dhcp_list = [self.dhcpautoradio, self.dhclientradio, self.dhcpcdradio, - self.pumpradio] + self.pumpradio, self.udhcpcradio] self._setup_external_app_radios(dhcp_list, daemon.GetDHCPClient, daemon.SetDHCPClient) @@ -100,7 +100,7 @@ class PreferencesDialog(object): sudo_list = [self.sudoautoradio, self.gksudoradio, self.kdesuradio, self.ktsussradio] self._setup_external_app_radios(sudo_list, daemon.GetSudoApp, - daemon.SetAudoApp) + daemon.SetSudoApp) auto_conn_meth = daemon.GetWiredAutoConnectMethod() if auto_conn_meth == 1: @@ -144,6 +144,24 @@ class PreferencesDialog(object): 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_widget('label2').hide() self.wTree.get_widget("notebook2").set_current_page(0) @@ -192,8 +210,10 @@ class PreferencesDialog(object): dhcp_client = misc.DHCLIENT elif self.dhcpcdradio.get_active(): dhcp_client = misc.DHCPCD - else: + elif self.pumpradio.get_active(): dhcp_client = misc.PUMP + else: + dhcp_client = misc.UDHCPC daemon.SetDHCPClient(dhcp_client) if self.linkautoradio.get_active(): @@ -224,6 +244,19 @@ class PreferencesDialog(object): [width, height] = self.dialog.get_size() daemon.WriteWindowSize(width, height, "pref") + + 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. """ @@ -308,11 +341,15 @@ class PreferencesDialog(object): 'use_last_used_profile') + self.notificationscheckbox = setup_label("pref_use_libnotify", + 'display_notifications') + # DHCP Clients self.dhcpautoradio = setup_label("dhcp_auto_radio", "wicd_auto_config") self.dhclientradio = self.wTree.get_widget("dhclient_radio") self.pumpradio = self.wTree.get_widget("pump_radio") self.dhcpcdradio = self.wTree.get_widget("dhcpcd_radio") + self.udhcpcradio = self.wTree.get_widget("udhcpc_radio") # Wired Link Detection Apps self.linkautoradio = setup_label("link_auto_radio", 'wicd_auto_config') diff --git a/wicd/suspend.py b/wicd/suspend.py index 217a655..e60f5c6 100755 --- a/wicd/suspend.py +++ b/wicd/suspend.py @@ -8,8 +8,8 @@ Used for when a laptop enters hibernation/suspension. """ # -# Copyright (C) 2007 - 2008 Adam Blackburn -# Copyright (C) 2007 - 2008 Dan O'Reilly +# 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 diff --git a/wicd/translations.py b/wicd/translations.py index 82fad11..9fbcde5 100644 --- a/wicd/translations.py +++ b/wicd/translations.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # -* coding: utf-8 -*- +""" translations -- module for handling the translation strings for wicd. """ # # Copyright (C) 2007 - 2009 Adam Blackburn # Copyright (C) 2007 - 2009 Dan O'Reilly @@ -43,19 +44,20 @@ def get_gettext(): lc, encoding = locale.getdefaultlocale(envvars=('LC_MESSAGES', 'LC_ALL', 'LANG', 'LANGUAGE')) + langs += [lc] except ValueError, e: print str(e) print "Default locale unavailable, falling back to en_US" - if (lc): - langs += [lc] langs += ["en_US"] lang = gettext.translation('wicd', local_path, languages=langs, fallback=True) _ = lang.gettext return _ +# Generated automatically on Sun, 05 Jul 2009 13:51:18 CDT _ = get_gettext() language = {} +<<<<<<< TREE language['connect'] = _('Connect') language['ip'] = _('IP') language['netmask'] = _('Netmask') @@ -234,3 +236,165 @@ language['ok'] = _('OK') language['cancel'] = _('Cancel') +======= +language['resetting_ip_address'] = _('''Resetting IP address...''') +language['prefs_help'] = _('''Preferences dialog''') +language['no_dhcp_offers'] = _('''Connection Failed: No DHCP offers received.''') +language['more_help'] = _('''For more detailed help, consult the wicd-curses(8) man page.''') +language['bad_pass'] = _('''Connection Failed: Bad password''') +language['cannot_start_daemon'] = _('''Unable to connect to wicd daemon DBus interface. This typically means there was a problem starting the daemon. Check the wicd log for more information.''') +language['verifying_association'] = _('''Verifying access point association...''') +language['wired_always_on'] = _('''Always show wired interface''') +language['could_not_connect'] = _('''Could not connect to wicd's D-Bus interface. Check the wicd log for error messages.''') +language['path_to_pac_file'] = _('''Path to PAC File''') +language['always_switch_to_wired'] = _('''Always switch to wired connection when available''') +language['disconn_help'] = _('''Disconnect from all networks''') +language['wired_networks'] = _('''Wired Networks''') +language['backend_alert'] = _('''Changes to your backend won't occur until the daemon is restarted.''') +language['about_help'] = _('''Stop a network connection in progress''') +language['connecting'] = _('''Connecting''') +language['pre_disconnect_script'] = _('''Run pre-disconnect script''') +language['cannot_edit_scripts_1'] = _('''To avoid various complications, wicd-curses does not support directly editing the scripts directly. However, you can edit them manually. First, (as root)", open the "$A" config file, and look for the section labeled by the $B in question. In this case, this is:''') +language['cannot_edit_scripts_3'] = _('''You can also configure the wireless networks by looking for the "[]" field in the config file.''') +language['cannot_edit_scripts_2'] = _('''Once there, you can adjust (or add) the "beforescript", "afterscript", and "disconnectscript" variables as needed, to change the preconnect, postconnect, and disconnect scripts respectively. Note that you will be specifying the full path to the scripts - not the actual script contents. You will need to add/edit the script contents separately. Refer to the wicd manual page for more information.''') +language['scripts_need_pass'] = _('''You must enter your password to configure scripts''') +language['dns_domain'] = _('''DNS domain''') +language['aborted'] = _('''Connection Cancelled''') +language['scanning_stand_by'] = _('''Scanning networks... stand by...''') +language['password'] = _('''Password''') +language['no_daemon_tooltip'] = _('''Wicd daemon unreachable''') +language['use_static_dns'] = _('''Use Static DNS''') +language['setting_broadcast_address'] = _('''Setting broadcast address...''') +language['choose_wired_profile'] = _('''Select or create a wired profile to connect with''') +language['make_wired_profile'] = _('''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.''') +language['esc_to_cancel'] = _('''Press ESC to cancel''') +language['scanning'] = _('''Scanning''') +language['flushing_routing_table'] = _('''Flushing the routing table...''') +language['brought_to_you'] = _('''Brought to you by:''') +language['refresh_help'] = _('''Refresh network list''') +language['select_hidden_essid'] = _('''Select Hidden Network ESSID''') +language['ext_programs'] = _('''External Programs''') +language['connect'] = _('''Connect''') +language['help_help'] = _('''Display this help dialog''') +language['use_global_dns'] = _('''Use global DNS servers''') +language['enable_encryption'] = _('''This network requires encryption to be enabled.''') +language['use_last_used_profile'] = _('''Use last used profile on wired autoconnect''') +language['preferences'] = _('''Preferences''') +language['dhcp_failed'] = _('''Connection Failed: Unable to Get IP Address''') +language['setting_static_ip'] = _('''Setting static IP addresses...''') +language['connecting_to_daemon'] = _('''Connecting to daemon...''') +language['automatic_connect'] = _('''Automatically connect to this network''') +language['add_new_wired_profile'] = _('''Add a new wired profile''') +language['dhcp_client'] = _('''DHCP Client''') +language['display_type_dialog'] = _('''Use dBm to measure signal strength''') +language['global_settings'] = _('''Use these settings for all networks sharing this essid''') +language['config_help'] = _('''Configure Selected Network''') +language['use_debug_mode'] = _('''Enable debug mode''') +language['removing_old_connection'] = _('''Removing old connection...''') +language['no_sudo_prog'] = _('''Could not find a graphical sudo program. The script editor could not be launched. You'll have to edit scripts directly your configuration file.''') +language['wireless_networks'] = _('''Wireless Networks''') +language['configuring_wired'] = _('''Configuring preferences for wired profile "$A"''') +language['no_wireless_networks_found'] = _('''No wireless networks found.''') +language['madwifi_for_adhoc'] = _('''Check if using madwifi/atheros drivers''') +language['properties'] = _('''Properties''') +language['setting_encryption_info'] = _('''Setting encryption info''') +language['about'] = _('''About Wicd''') +language['ok'] = _('''OK''') +language['adhoc_help'] = _('''Set up Ad-hoc network''') +language['scripts_help'] = _('''Select scripts''') +language['invalid_address'] = _('''Invalid address in $A entry.''') +language['configuring_interface'] = _('''Configuring wireless interface...''') +language['generating_psk'] = _('''Generating PSK...''') +language['validating_authentication'] = _('''Validating authentication...''') +language['essid'] = _('''ESSID''') +language['anonymous_identity'] = _('''Anonymous Identity''') +language['wireless_interface'] = _('''Wireless Interface''') +language['hidden_network'] = _('''Hidden Network''') +language['key'] = _('''Key''') +language['wicd_curses'] = _('''Wicd Curses Interface''') +language['debugging'] = _('''Debugging''') +language['use_encryption'] = _('''Use Encryption''') +language['wpa_supplicant'] = _('''WPA Supplicant''') +language['global_dns_servers'] = _('''Global DNS servers''') +language['not_connected'] = _('''Not connected''') +language['done'] = _('''Done connecting...''') +language['cannot_connect_to_daemon'] = _('''Can't connect to the daemon, trying to start it automatically...''') +language['cancel'] = _('''Cancel''') +language['case_sensitive'] = _('''All controls are case sensitive''') +language['gateway'] = _('''Gateway''') +language['backend'] = _('''Backend''') +language['dbus_fail'] = _('''DBus failure! This is most likely caused by the wicd daemon stopping while wicd-curses is running. Please restart the daemon, and then restart wicd-curses.''') +language['terminated'] = _('''Terminated by user''') +language['wired_detect'] = _('''Wired Link Detection''') +language['add_new_profile'] = _('''Add a new profile''') +language['use_ics'] = _('''Activate Internet Connection Sharing''') +language['create_adhoc_network'] = _('''Create an Ad-Hoc Network''') +language['interface_up'] = _('''Putting interface up...''') +language['global_dns_not_enabled'] = _('''Global DNS has not been enabled in general preferences.''') +language['dns'] = _('''DNS''') +language['advanced_settings'] = _('''Advanced Settings''') +language['username'] = _('''Username''') +language['wicd_auto_config'] = _('''Automatic (recommended)''') +language['wired_network_found'] = _('''Wired connection detected''') +language['netmask'] = _('''Netmask''') +language['select_a_network'] = _('''Choose from the networks below:''') +language['connect_help'] = _('''Connect to selected network''') +language['no_delete_last_profile'] = _('''wicd-curses does not support deleting the last wired profile. Try renaming it ('F2')''') +language['gen_settings'] = _('''General Settings''') +language['connected_to_wireless'] = _('''Connected to $A at $B (IP: $C)''') +language['exception'] = _('''EXCEPTION! Please report this to the maintainer and file a bug report with the backtrace below:''') +language['configuring_wireless'] = _('''Configuring preferences for wireless network "$A" ($B)''') +language['generating_wpa_config'] = _('''Generating WPA configuration file...''') +language['search_domain'] = _('''Search domain''') +language['encrypt_info_missing'] = _('''Required encryption information is missing.''') +language['running_dhcp'] = _('''Obtaining IP address...''') +language['lost_dbus'] = _('''The wicd daemon has shut down. The UI will not function properly until it is restarted.''') +language['wired_network_instructions'] = _('''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.''') +language['setting_static_dns'] = _('''Setting static DNS servers...''') +language['auto_reconnect'] = _('''Automatically reconnect on connection loss''') +language['use_wep_encryption'] = _('''Use Encryption (WEP only)''') +language['wired_autoconnect_settings'] = _('''Wired Autoconnect Settings''') +language['before_script'] = _('''Run script before connect''') +language['always_use_wext'] = _('''You should almost always use wext as the WPA supplicant driver''') +language['network_interfaces'] = _('''Network Interfaces''') +language['use_default_profile'] = _('''Use default profile on wired autoconnect''') +language['scan'] = _('''Scan''') +language['ip'] = _('''IP''') +language['connected_to_wired'] = _('''Connected to wired network (IP: $A)''') +language['wpa_supplicant_driver'] = _('''WPA Supplicant Driver''') +language['access_cards'] = _('''Wicd needs to access your computer's network cards.''') +language['killswitch_enabled'] = _('''Wireless Kill Switch Enabled''') +language['hidden_network_essid'] = _('''Hidden Network ESSID''') +language['secured'] = _('''Secured''') +language['interface_down'] = _('''Putting interface down...''') +language['authentication'] = _('''Authentication''') +language['after_script'] = _('''Run script after connect''') +language['show_wired_list'] = _('''Prompt for profile on wired autoconnect''') +language['channel'] = _('''Channel''') +language['unsecured'] = _('''Unsecured''') +language['rename_wired_profile'] = _('''Rename wired profile''') +language['daemon_unavailable'] = _('''The wicd daemon is unavailable, so your request cannot be completed''') +language['stop_showing_chooser'] = _('''Stop Showing Autoconnect pop-up temporarily''') +language['scan_help'] = _('''Scan for hidden networks''') +language['use_static_ip'] = _('''Use Static IPs''') +language['raw_screen_arg'] = _('''use urwid's raw screen controller''') +language['route_flush'] = _('''Route Table Flushing''') +language['scripts'] = _('''Scripts''') +language['identity'] = _('''Identity''') +language['automatic_reconnection'] = _('''Automatic Reconnection''') +language['wired_interface'] = _('''Wired Interface''') +language['press_to_quit'] = _('''Press F8 or Q to quit.''') +language['default_wired'] = _('''Use as default profile (overwrites any previous default)''') +language['wired_network'] = _('''Wired Network''') +language['dns_server'] = _('''DNS server''') +language['notifications'] = _('''Notifications''') +language['display_notifications'] = _('''Display notifications about connection status''') +language['connection_established'] = _('''Connection established''') +language['disconnected'] = _('''Disconnected''') +language['establishing_connection'] = _('''Establishing connection...''') +language['association_failed'] = _('''Connection failed: Could not contact the wireless access point.''') +language['access_denied'] = _('''Unable to contact the Wicd daemon due to an access denied error from DBus. Please check that your user is in the $A group.''') +language['disconnecting_active'] = _('''Disconnecting active connections...''') +language['access_denied_wc'] = _('''ERROR: wicd-curses was denied access to the wicd daemon: please check that your user is in the "$A" group.''') +language['post_disconnect_script'] = _('''Run post-disconnect script''') +>>>>>>> MERGE-SOURCE diff --git a/wicd/wicd-client.py b/wicd/wicd-client.py old mode 100755 new mode 100644 index 1b92771..f62e244 --- a/wicd/wicd-client.py +++ b/wicd/wicd-client.py @@ -14,14 +14,14 @@ class TrayIcon() -- Parent class of TrayIconGUI and IconConnectionInfo. 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. + def usage() -- Prints usage information. + def main() -- Runs the wicd frontend main loop. """ # -# Copyright (C) 2007 - 2008 Adam Blackburn -# Copyright (C) 2007 - 2008 Dan O'Reilly +# 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 @@ -46,12 +46,23 @@ 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 gui from wicd import dbusmanager -from wicd.guiutil import error +from wicd.guiutil import error, can_use_notify from wicd.translations import language @@ -79,8 +90,9 @@ def catchdbus(func): try: return func(*args, **kwargs) except DBusException, e: - if "DBus.Error.AccessDenied" in e: - error(None, language['access_denied']) + if e.get_dbus_name() != None and "DBus.Error.AccessDenied" in e.get_dbus_name(): + error(None, language['access_denied'].replace("$A",""+wpath.wicd_group+"")) + #raise raise DBusException(e) else: print "warning: ignoring exception %s" % e @@ -112,7 +124,7 @@ class TrayIcon(object): Base Class for implementing a tray icon to display network status. """ - def __init__(self, animate): + def __init__(self, animate, displaytray=True): self.cur_sndbytes = -1 self.cur_rcvbytes = -1 self.last_sndbytes = -1 @@ -125,10 +137,13 @@ class TrayIcon(object): else: self.tr = self.StatusTrayIconGUI(self) 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 + raise NotImplementedError() else: return self.tr.is_embedded() @@ -152,12 +167,19 @@ class TrayIcon(object): 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. + """ 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 @@ -166,6 +188,12 @@ class TrayIcon(object): 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: @@ -198,6 +226,20 @@ class TrayIcon(object): return True + def _show_notification(self, title, details, image=None): + if self.should_notify: + 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() + + self.should_notify = False + @catchdbus def wired_profile_chooser(self): """ Launch the wired profile chooser. """ @@ -210,14 +252,24 @@ class TrayIcon(object): self.network_addr = str(info[0]) self.network_type = "wired" self.tr.set_from_file(os.path.join(wpath.images, "wired.png")) + # status_string = language['connected_to_wired'].replace('$A', + wired_ip) + # self.tr.set_tooltip(status_string) + self._show_notification(language['wired_network'], + language['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(info[2])) + sig_string = daemon.FormatSignalForPrinting(str(strength)) self.network_type = "wireless" self.network_addr = str(info[0]) self.network_name = info[1] @@ -227,31 +279,57 @@ class TrayIcon(object): if wireless.GetWirelessProperty(cur_net_id, "encryption"): lock = "-lock" + # status_string = (language['connected_to_wireless'] + .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, + language['connection_established'], + 'network-wireless') + self.update_tooltip() def set_connecting_state(self, info): """ Sets the icon info for a connecting state. """ - self.network_type = info[0] - - if info[0] == 'wireless': - self.network_name = info[1] - + wired = False + if info[0] == 'wired' and len(info) == 1: + cur_network = language['wired_network'] + wired = True + else: + cur_network = info[1] + status_string = language['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, + language['establishing_connection'], + 'network-wired') + else: + self._show_notification(cur_network, + language['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: - self.network_type = "no_daemon" + status = language['no_daemon_tooltip'] elif wireless.GetKillSwitchEnabled(): - self.network_type = "killswitch" + status = (language['not_connected'] + " (" + + language['killswitch_enabled'] + ")") else: - self.network_type = "none" - + status = language['not_connected'] + # self.tr.set_tooltip(status) + self._show_notification(language['disconnected'], None, 'stop') self.update_tooltip() + @catchdbus def update_tray_icon(self, state=None, info=None): """ Updates the tray icon and current connection status. """ @@ -259,6 +337,12 @@ class TrayIcon(object): 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) @@ -277,8 +361,7 @@ class TrayIcon(object): 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() + prefix = self.get_bandwidth_state() else: prefix = 'idle-' if daemon.GetSignalDisplayType() == 0: @@ -304,26 +387,40 @@ class TrayIcon(object): self.tr.set_from_file(img_file) @catchdbus - def get_bandwidth_activity(self): + def get_bandwidth_state(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) + activity = self.is_network_active(rcvbytes, self.max_rcv_gain, + self.last_rcvbytes) receiving = activity[0] - self.parent.max_rcv_gain = activity[1] - self.parent.last_rcvbytes = activity[2] + self.max_rcv_gain = activity[1] + self.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) + activity = self.is_network_active(sndbytes, self.max_snd_gain, + self.last_sndbytes) transmitting = activity[0] - self.parent.max_snd_gain = activity[1] - self.parent.last_sndbytes = activity[2] + self.max_snd_gain = activity[1] + self.last_sndbytes = activity[2] if transmitting and receiving: return 'both-' @@ -369,7 +466,7 @@ class TrayIcon(object): tray icons. """ - def __init__(self, parent): + def __init__(self): menu = """ @@ -377,7 +474,6 @@ class TrayIcon(object): - @@ -387,9 +483,6 @@ class TrayIcon(object): 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), ('About', gtk.STOCK_ABOUT, '_About...', None, 'About wicd-tray-icon', self.on_about), ('Quit',gtk.STOCK_QUIT,'_Quit',None,'Quit wicd-tray-icon', @@ -408,11 +501,6 @@ class TrayIcon(object): 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 @@ -446,96 +534,6 @@ class TrayIcon(object): 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.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 = (language['conn_info_wired'] - .replace('$A', str(info[0])) #IP - .replace('$B', str(rx)) #RX - .replace('$C', str(tx))) #TX - elif state == misc.WIRELESS: - text = (language['conn_info_wireless'] - .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(text) - if state == misc.WIRED: - self.list[1].set_text(language['conn_info_wired_labels']) - elif state == misc.WIRELESS: - self.list[1].set_text(language['conn_info_wireless_labels']) - elif state == misc.CONNECTING: - self.list[1].set_text(language['conn_info_connecting']) - elif state in (misc.SUSPENDED, misc.NOT_CONNECTED): - self.list[1].set_text(language['conn_info_not_connected']) - - 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): @@ -600,29 +598,29 @@ class TrayIcon(object): 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. + Clear the network menu, and schedule a method to be + called in .8 seconds to trigger a scan if the menu + is still being moused over. """ - def dummy(x=None): pass - if self._is_scanning: return True self.init_network_menu() - time.sleep(.4) + 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 + return False wireless.Scan(False) + return False @catchdbus def populate_network_menu(self, data=None): @@ -671,7 +669,7 @@ class TrayIcon(object): net_menuitem.show() def init_network_menu(self): - """ Set the right-click menu for to the scanning state. """ + """ 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) @@ -691,7 +689,7 @@ class TrayIcon(object): def toggle_wicd_gui(self): """ Toggles the wicd GUI. """ if not self.gui_win: - self.gui_win = gui.appGui() + self.gui_win = gui.appGui(tray=self) elif not self.gui_win.is_visible: self.gui_win.show_win() else: @@ -708,9 +706,9 @@ class TrayIcon(object): for machines running versions of GTK < 2.10. """ - def __init__(self, parent): + def __init__(self): """Initializes the tray icon""" - TrayIcon.TrayIconGUI.__init__(self, parent) + TrayIcon.TrayIconGUI.__init__(self) self.tooltip = gtk.Tooltips() self.eb = gtk.EventBox() self.tray = egg.trayicon.TrayIcon("WicdTrayIcon") @@ -744,6 +742,18 @@ class TrayIcon(object): """ 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): @@ -752,8 +762,8 @@ class TrayIcon(object): Uses gtk.StatusIcon to implement a tray icon. """ - def __init__(self, parent): - TrayIcon.TrayIconGUI.__init__(self, parent) + def __init__(self): + TrayIcon.TrayIconGUI.__init__(self) gtk.StatusIcon.__init__(self) self.current_icon_path = '' @@ -774,6 +784,14 @@ class TrayIcon(object): 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. """ @@ -785,6 +803,7 @@ Arguments: \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): @@ -798,7 +817,7 @@ def setup_dbus(force=True): misc.PromptToStartDaemon() try: dbusmanager.connect_to_dbus() - except dbusmanager.DBusException: + except DBusException: error(None, "Could not connect to wicd's D-Bus interface. " + "Check the wicd log for error messages.") return False @@ -820,7 +839,7 @@ def on_exit(): if DBUS_AVAIL: try: daemon.SetGUIOpen(False) - except dbusmanager.DBusException: + except DBusException: pass def handle_no_dbus(): @@ -842,8 +861,9 @@ def main(argv): """ try: - opts, args = getopt.getopt(sys.argv[1:], 'nha', ['help', 'no-tray', - 'no-animate']) + opts, args = getopt.getopt(sys.argv[1:], 'nhao', ['help', 'no-tray', + 'no-animate', + 'only-notifications']) except getopt.GetoptError: # Print help information and exit usage() @@ -851,6 +871,7 @@ def main(argv): use_tray = True animate = True + display_app = True for opt, a in opts: if opt in ('-h', '--help'): usage() @@ -859,6 +880,10 @@ def main(argv): 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) @@ -867,14 +892,14 @@ def main(argv): setup_dbus() atexit.register(on_exit) - if not use_tray or not ICON_AVAIL: + 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) + tray_icon = TrayIcon(animate, displaytray=display_app) # Check to see if wired profile chooser was called before icon # was launched (typically happens on startup or daemon restart). diff --git a/wicd/wicd-daemon.py b/wicd/wicd-daemon.py index 07b310c..2aee9e1 100644 --- a/wicd/wicd-daemon.py +++ b/wicd/wicd-daemon.py @@ -8,19 +8,16 @@ connection management, for both wireless and wired networks. The daemon must be run as root to control the networks, however the user interface components should be run as a normal user. -class LogWriter() -- Class to redirect stdout and stderr to a log file. -class ConnectionWizard() -- DBUS interface to manage the network. -class ConnectionStatus() -- Updates the current connection state -def usage() -- Print usage information. -def daemonize() -- Daemonize the current process with a double fork. -def main() -- The wicd daemon main loop. +class WicdDaemon() -- DBus interface to manage general wicd processes. +class WiredDaemon() -- DBus interface to managed the wired network. +class WirelessDaemon() -- DBus interface to managed the wireless network. """ # -# Copyright (C) 2007 - 2008 Adam Blackburn -# Copyright (C) 2007 - 2008 Dan O'Reilly -# Copyright (C) 2007 - 2008 Byron Hillis +# Copyright (C) 2007 - 2009 Adam Blackburn +# Copyright (C) 2007 - 2009 Dan O'Reilly +# Copyright (C) 2007 - 2009 Byron Hillis # # 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 @@ -40,6 +37,8 @@ import sys import time import getopt import signal +import atexit +from subprocess import Popen # DBUS import gobject @@ -61,7 +60,7 @@ from wicd.configmanager import ConfigManager if __name__ == '__main__': wpath.chdir(__file__) - + misc.RenameProcess("wicd") wireless_conf = wpath.etc + "wireless-settings.conf" @@ -69,11 +68,11 @@ wired_conf = wpath.etc + "wired-settings.conf" class WicdDaemon(dbus.service.Object): """ The main wicd daemon class. - + This class mostly contains exported DBus methods that are not associated directly with either wired or wireless actions. There are a few exceptions to this, due to architectural limitations. - + """ def __init__(self, bus_name, object_path="/org/wicd/daemon", auto_connect=True): @@ -85,7 +84,7 @@ class WicdDaemon(dbus.service.Object): self._debug_mode = bool(self.config.get("Settings", "debug_mode")) self.wifi = networking.Wireless(debug=self._debug_mode) self.wired = networking.Wired(debug=self._debug_mode) - self.wired_bus= WiredDaemon(bus_name, self, wired=self.wired) + self.wired_bus = WiredDaemon(bus_name, self, wired=self.wired) self.wireless_bus = WirelessDaemon(bus_name, self, wifi=self.wifi) self.forced_disconnect = False self.need_profile_chooser = False @@ -102,40 +101,40 @@ class WicdDaemon(dbus.service.Object): self.link_detect_tool = 0 self.flush_tool = 0 self.sudo_app = 0 - + # This will speed up the scanning process - if a client doesn't # need a fresh scan, just feed them the old one. A fresh scan # can be done by calling Scan(fresh=True). self.LastScan = [] - + # Load the config file self.ReadConfig() - + signal.signal(signal.SIGTERM, self.DaemonClosing) self.DaemonStarting() - + # Scan since we just got started if not auto_connect: print "--no-autoconnect detected, not autoconnecting..." self.SetForcedDisconnect(True) self.wireless_bus.Scan() - + def get_debug_mode(self): return self._debug_mode def set_debug_mode(self, mode): self._debug_mode = mode self.config.debug = mode debug_mode = property(get_debug_mode, set_debug_mode) - + @dbus.service.method('org.wicd.daemon') def Hello(self): """ Returns the version number. - + This number is major-minor-micro. Major is only incremented if minor reaches > 9. Minor is incremented if changes that break core stucture are implemented. Micro is for everything else, and micro may be anything >= 0. This number is effective starting wicd v1.2.0. - + """ return wpath.version @@ -199,43 +198,54 @@ class WicdDaemon(dbus.service.Object): print 'domain is %s' % dns_dom print 'search domain is %s' % search_dom self.config.write() - + @dbus.service.method('org.wicd.daemon') def SetBackend(self, backend): """ Sets a new backend. """ print "setting backend to %s" % backend + backends = networking.BACKEND_MGR.get_available_backends() + if backend not in backends: + print "backend %s not available, trying to fallback to another" % backend + try: + backend = backends[0] + except IndexError: + print "ERROR: no backends available!" + return + else: + print "Fell back to backend %s" % backend self.config.set("Settings", "backend", backend, write=True) if backend != self.GetCurrentBackend(): self.suspended = True self.wifi.LoadBackend(backend) self.wired.LoadBackend(backend) + self.SignalBackendChanged(self.GetBackendUpdateInterval()) self.SetSuspend(False) - + @dbus.service.method('org.wicd.daemon') def GetCurrentBackend(self): """ Returns the currently loaded backend. """ return networking.get_current_backend() - + @dbus.service.method('org.wicd.daemon') def GetBackendUpdateInterval(self): """ Returns status update interval for the loaded backend. """ return networking.get_backend_update_interval() - + @dbus.service.method('org.wicd.daemon') def GetBackendDescription(self, backend_name): """ Returns the description of the given backend. """ return networking.get_backend_description(backend_name) - + @dbus.service.method('org.wicd.daemon') def GetBackendDescriptionDict(self): """ Returns a dict of all backend names mapped to their description. """ return networking.get_backend_description_dict() - + @dbus.service.method('org.wicd.daemon') def GetSavedBackend(self): """ Returns the backend saved to disk. """ return self.config.get("Settings", "backend") - + @dbus.service.method('org.wicd.daemon') def GetBackendList(self): """ Returns a list of all backends available. """ @@ -260,7 +270,7 @@ class WicdDaemon(dbus.service.Object): def GetWirelessInterface(self): """ Returns the wireless interface the daemon is using. """ return str(self.wifi.wireless_interface) - + @dbus.service.method('org.wicd.daemon') def NeedsExternalCalls(self): """ Returns true if the loaded backend needs external calls. """ @@ -299,8 +309,14 @@ class WicdDaemon(dbus.service.Object): if self.GetSignalDisplayType() == 1: return (signal + " dBm") else: - return (signal + "%") - + try: + if int(signal) == 101: + return '??%' + else: + return (signal + "%") + except ValueError: + return (signal + "%") + @dbus.service.method('org.wicd.daemon') def SetSuspend(self, val): """ Toggles whether or not monitoring connection status is suspended """ @@ -318,7 +334,7 @@ class WicdDaemon(dbus.service.Object): @dbus.service.method('org.wicd.daemon') def AutoConnect(self, fresh): """ Attempts to autoconnect to a wired or wireless network. - + Autoconnect will first try to connect to a wired network, if that fails it tries a wireless connection. @@ -350,11 +366,11 @@ class WicdDaemon(dbus.service.Object): @dbus.service.method('org.wicd.daemon') def SetAutoReconnect(self, value): """ Sets the value of self.auto_reconnect. - + If True, wicd will try to reconnect as soon as it detects that an internet connection is lost. If False, it will do nothing, and wait for the user to initiate reconnection. - + """ print 'setting automatically reconnect when connection drops %s' % value self.config.set("Settings", "auto_reconnect", misc.to_bool(value), @@ -376,7 +392,7 @@ class WicdDaemon(dbus.service.Object): return True else: return False - + @dbus.service.method('org.wicd.daemon') def CancelConnect(self): """ Cancels the wireless connection attempt """ @@ -394,12 +410,12 @@ class WicdDaemon(dbus.service.Object): self.wired.ReleaseDHCP() self.wired.KillDHCP() self.wired.connecting_thread.connect_result = 'aborted' - + @dbus.service.method('org.wicd.daemon') def GetCurrentInterface(self): """ Returns the active interface """ return self.current_interface - + @dbus.service.method('org.wicd.daemon') def SetCurrentInterface(self, iface): """ Sets the current active interface """ @@ -408,15 +424,15 @@ class WicdDaemon(dbus.service.Object): @dbus.service.method('org.wicd.daemon') def SetNeedWiredProfileChooser(self, val): """ Sets the need_wired_profile_chooser variable. - + If set to True, that alerts the wicd frontend to display the chooser, if False the frontend will do nothing. This function is only needed when the frontend starts up, to determine if the chooser was requested before the frontend was launched. - + """ self.need_profile_chooser = misc.to_bool(val) - + @dbus.service.method('org.wicd.daemon') def ShouldAutoReconnect(self): """ Returns True if it's the right time to try autoreconnecting. """ @@ -435,15 +451,15 @@ class WicdDaemon(dbus.service.Object): @dbus.service.method('org.wicd.daemon') def SetForcedDisconnect(self, value): """ Sets the forced_disconnect status. - + Set to True when a user manually disconnects or cancels a connection. It gets set to False as soon as the connection process is manually started. - + """ if self.debug_mode and value: print "Forced disconnect on" self.forced_disconnect = bool(value) - + @dbus.service.method('org.wicd.daemon') def GetSignalDisplayType(self): """ Returns the signal display type. @@ -454,14 +470,13 @@ class WicdDaemon(dbus.service.Object): """ return int(self.signal_display_type) - - + @dbus.service.method('org.wicd.daemon') def SetSignalDisplayType(self, value): """ Sets the signal display type and writes it the wicd config file. """ self.config.set("Settings", "signal_display_type", value, write=True) self.signal_display_type = int(value) - + @dbus.service.method('org.wicd.daemon') def GetGUIOpen(self): """ Returns the value of gui_open. @@ -470,21 +485,21 @@ class WicdDaemon(dbus.service.Object): of the state of the wicd GUI. If the GUI is open, wicd will not try to automatically reconnect to networks, as this behavior can be annoying for the user while trying to use the GUI. - + NOTE: It's possible for this to become out of sync, particularly if the wicd.py is not exited properly while the GUI is open. We should probably implement some kind of pid system to do it properly. - + ANOTHER NOTE: This isn't used by anything yet! - + """ return bool(self.gui_open) - + @dbus.service.method('org.wicd.daemon') def SetGUIOpen(self, val): """ Sets the value of gui_open. """ self.gui_open = bool(val) - + @dbus.service.method('org.wicd.daemon') def SetAlwaysShowWiredInterface(self, value): """ Sets always_show_wired_interface to the given value. """ @@ -496,14 +511,14 @@ class WicdDaemon(dbus.service.Object): def GetAlwaysShowWiredInterface(self): """ Returns always_show_wired_interface """ return bool(self.always_show_wired_interface) - + @dbus.service.method('org.wicd.daemon') def SetWiredAutoConnectMethod(self, method): """ Sets which method to use to autoconnect to wired networks. """ # 1 = default profile # 2 = show list # 3 = last used profile - self.config.set("Settings","wired_connect_mode", int(method), + self.config.set("Settings", "wired_connect_mode", int(method), write=True) self.wired_connect_mode = int(method) self.wired_bus.connect_mode = int(method) @@ -512,34 +527,34 @@ class WicdDaemon(dbus.service.Object): def GetWiredAutoConnectMethod(self): """ Returns the wired autoconnect method. """ return int(self.wired_connect_mode) - + @dbus.service.method('org.wicd.daemon') def GetPreferWiredNetwork(self): """ Returns True if wired network preference is set. - + If this is True, wicd will switch from a wireless connection to a wired one if an ethernet connection is available. - + """ return self.prefer_wired - + @dbus.service.method('org.wicd.daemon') def SetPreferWiredNetwork(self, value): """ Sets the prefer_wired state. """ self.config.set("Settings", "prefer_wired", bool(value), write=True) self.prefer_wired = bool(value) - + @dbus.service.method('org.wicd.daemon') def SetConnectionStatus(self, state, info): """ Sets the connection status. - + Keyword arguments: state - An int representing the state of the connection as defined in misc.py. - + info - a list of strings containing data about the connection state. The contents of this list are dependent on the connection state. - + state - info contents: NOT_CONNECTED - info[0] = "" CONNECTING - info[0] = "wired" or "wireless" @@ -551,32 +566,32 @@ class WicdDaemon(dbus.service.Object): info[3] = internal networkid info[4] = bitrate SUSPENDED - info[0] = "" - - + + """ self.connection_state = state self.connection_info = info - + @dbus.service.method('org.wicd.daemon', out_signature='(uas)') def GetConnectionStatus(self): """ Returns the current connection state in list form. - + See SetConnectionStatus for more information about the data structure being returned. - + """ return [self.connection_state, self.connection_info] @dbus.service.method('org.wicd.daemon') def GetNeedWiredProfileChooser(self): """ Returns need_profile_chooser. - + Returns a boolean specifying if the wired profile chooser needs to be launched. - + """ return bool(self.need_profile_chooser) - + @dbus.service.method("org.wicd.daemon") def GetAppAvailable(self, app): """ Determine if a given application is available.""" @@ -585,18 +600,18 @@ class WicdDaemon(dbus.service.Object): @dbus.service.method('org.wicd.daemon') def GetDHCPClient(self): """ Returns the current DHCP client constant. - + See misc.py for a definition of the constants. - + """ return self.dhcp_client - + @dbus.service.method('org.wicd.daemon') def SetDHCPClient(self, client): """ Sets the DHCP client constant. - + See misc.py for a definition of the constants. - + """ print "Setting dhcp client to %i" % (int(client)) self.dhcp_client = int(client) @@ -612,13 +627,13 @@ class WicdDaemon(dbus.service.Object): @dbus.service.method('org.wicd.daemon') def SetLinkDetectionTool(self, link_tool): """ Sets the link detection tool. - + Sets the value of the tool wicd should use to detect if a cable is plugged in. If using a backend that doesn't use an external call to get this information (such as ioctl) it will instead use the ioctls provided by the specified tool to query for link status. - + """ self.link_detect_tool = int(link_tool) self.wired.link_detect = int(link_tool) @@ -632,11 +647,11 @@ class WicdDaemon(dbus.service.Object): @dbus.service.method('org.wicd.daemon') def SetFlushTool(self, flush_tool): """ Sets the flush tool. - + Sets the value of the tool wicd should use to flush routing tables. The value is associated with a particular tool, as specified in misc.py - + """ self.flush_tool = int(flush_tool) self.wired.flush_tool = int(flush_tool) @@ -647,21 +662,21 @@ class WicdDaemon(dbus.service.Object): def GetSudoApp(self): """ Get the preferred sudo app. """ return self.sudo_app - + @dbus.service.method('org.wicd.daemon') def SetSudoApp(self, sudo_app): """ Set the preferred sudo app. """ self.sudo_app = sudo_app self.config.set("Settings", "sudo_app", sudo_app, write=True) - + @dbus.service.method('org.wicd.daemon') def WriteWindowSize(self, width, height, win_name): """ Write the desired default window size. - + win_name should be either 'main' or 'pref', and specifies whether the size being given applies to the main GUI window or the preferences dialog window. - + """ if win_name == "main": height_str = "window_height" @@ -673,14 +688,14 @@ class WicdDaemon(dbus.service.Object): self.config.set("Settings", width_str, width) self.config.set("Settings", height_str, height) self.config.write() - + @dbus.service.method('org.wicd.daemon') def ReadWindowSize(self, win_name): """Returns a list containing the desired default window size - + Attempts to read the default size from the config file, and if that fails, returns a default of 605 x 400. - + """ if win_name == "main": default_width = -1 @@ -696,12 +711,12 @@ class WicdDaemon(dbus.service.Object): width = self.config.get("Settings", width_str, default=default_width) height = self.config.get("Settings", height_str, default=default_height) self.config.write() - + size = [] size.append(int(width)) size.append(int(height)) return size - + def _wired_autoconnect(self, fresh=True): """ Attempts to autoconnect to a wired network. """ wiredb = self.wired_bus @@ -715,7 +730,7 @@ class WicdDaemon(dbus.service.Object): not self.GetNeedWiredProfileChooser(): self.LaunchChooser() return True - + # Default Profile. elif self.GetWiredAutoConnectMethod() == 1: network = wiredb.GetDefaultWiredNetwork() @@ -752,7 +767,7 @@ class WicdDaemon(dbus.service.Object): Helper method called on a timer that monitors a wired connection attempt and makes decisions about what to do next based on the result. - + """ wiredb = self.wired_bus if wiredb.CheckIfWiredConnecting(): @@ -765,7 +780,7 @@ class WicdDaemon(dbus.service.Object): return False self.auto_connecting = False return False - + @dbus.service.method("org.wicd.daemon") def ConnectResultsAvailable(self): if ((self.wired.connecting_thread and self.wired.connecting_thread.connect_result) or @@ -773,12 +788,12 @@ class WicdDaemon(dbus.service.Object): return True else: return False - + @dbus.service.method("org.wicd.daemon") def SendConnectResultsIfAvail(self): if self.ConnectResultsAvailable(): self.SendConnectResult() - + @dbus.service.method("org.wicd.daemon") def SendConnectResult(self): if self.wired.connecting_thread and self.wired.connecting_thread.connect_result: @@ -787,32 +802,32 @@ class WicdDaemon(dbus.service.Object): elif self.wifi.connecting_thread and self.wifi.connecting_thread.connect_result: self.ConnectResultsSent(self.wifi.connecting_thread.connect_result) self.wifi.connecting_thread.connect_result = "" - + @dbus.service.signal(dbus_interface="org.wicd.daemon",signature='s') def ConnectResultsSent(self, result): print "Sending connection attempt result %s" % result - + @dbus.service.method("org.wicd.daemon") @dbus.service.signal(dbus_interface="org.wicd.daemon", signature='') def UpdateState(self): pass - + @dbus.service.signal(dbus_interface='org.wicd.daemon', signature='') def LaunchChooser(self): """ Emits the wired profile chooser dbus signal. """ print 'calling wired profile chooser' self.SetNeedWiredProfileChooser(True) - + @dbus.service.signal(dbus_interface="org.wicd.daemon", signature='') def DaemonStarting(self): """ Emits a signa indicating the daemon is starting. """ pass - + @dbus.service.signal(dbus_interface='org.wicd.daemon', signature='') def DaemonClosing(self): """ Emits a signal indicating the daemon will be closing. """ pass - + @dbus.service.method('org.wicd.daemon', in_signature='uav') def EmitStatusChanged(self, state, info): """ Calls the StatusChanged signal method. """ @@ -821,27 +836,32 @@ class WicdDaemon(dbus.service.Object): @dbus.service.signal(dbus_interface='org.wicd.daemon', signature='uav') def StatusChanged(self, state, info): """ Emits a "status changed" dbus signal. - + This D-Bus signal is emitted when the connection status changes. This signal can be hooked to monitor the network state. - + """ pass + @dbus.service.signal(dbus_interface='org.wicd.daemon', signature='i') + def SignalBackendChanged(self, interval): + """ Emits a signal when the current backend changes. """ + pass + def ReadConfig(self): """ Reads the manager-settings.conf file. - + Reads the manager-settings.conf file and loads the stored values into memory. - + """ b_wired = self.wired_bus b_wifi = self.wireless_bus - app_conf= self.config + app_conf = self.config # Load the backend. be_def = 'external' self.SetBackend(app_conf.get("Settings", "backend", default=be_def)) - + # Load network interfaces. iface = self.wireless_bus.DetectWirelessInterface() if not iface: iface = 'wlan0' @@ -851,7 +871,7 @@ class WicdDaemon(dbus.service.Object): if not iface: iface = 'eth0' self.SetWiredInterface(app_conf.get("Settings", "wired_interface", default=iface)) - + self.SetWPADriver(app_conf.get("Settings", "wpa_driver", default="wext")) self.SetAlwaysShowWiredInterface(app_conf.get("Settings", "always_show_wired_interface", @@ -861,7 +881,7 @@ class WicdDaemon(dbus.service.Object): dns1 = app_conf.get("Settings", "global_dns_1", default='None') dns2 = app_conf.get("Settings", "global_dns_2", default='None') dns3 = app_conf.get("Settings", "global_dns_3", default='None') - dns_dom =app_conf.get("Settings", "global_dns_dom", default='None') + dns_dom = app_conf.get("Settings", "global_dns_dom", default='None') search_dom = app_conf.get("Settings", "global_search_dom", default='None') self.SetGlobalDNS(dns1, dns2, dns3, dns_dom, search_dom) self.SetAutoReconnect(app_conf.get("Settings", "auto_reconnect", @@ -910,11 +930,11 @@ class WicdDaemon(dbus.service.Object): print "Using wireless interface..." + self.GetWirelessInterface() print "Using wired interface..." + self.GetWiredInterface() - + ############################## ###### Wireless Daemon ####### ############################## - + class WirelessDaemon(dbus.service.Object): """ DBus interface for wireless connection operations. """ def __init__(self, bus_name, daemon, wifi=None, debug=False): @@ -930,29 +950,29 @@ class WirelessDaemon(dbus.service.Object): self.config = ConfigManager(os.path.join(wpath.etc, "wireless-settings.conf"), debug=debug) - + def get_debug_mode(self): return self._debug_mode def set_debug_mode(self, mode): self._debug_mode = mode self.config.debug = mode debug_mode = property(get_debug_mode, set_debug_mode) - + @dbus.service.method('org.wicd.daemon.wireless') def SetHiddenNetworkESSID(self, essid): """ Sets the ESSID of a hidden network for use with Scan(). """ self.hidden_essid = str(misc.Noneify(essid)) - + @dbus.service.method('org.wicd.daemon.wireless') def Scan(self, sync=False): """ Scan for wireless networks. - + Scans for wireless networks, optionally using a (hidden) essid set with SetHiddenNetworkESSID. - + The sync keyword argument specifies whether the scan should be done synchronously. - + """ if self._scanning: if self.debug_mode: @@ -966,12 +986,12 @@ class WirelessDaemon(dbus.service.Object): else: self._async_scan() return True - + @misc.threaded def _async_scan(self): """ Run a scan in its own thread. """ self._sync_scan() - + def _sync_scan(self): """ Run a scan and send a signal when its finished. """ scan = self.wifi.Scan(str(self.hidden_essid)) @@ -992,7 +1012,7 @@ class WirelessDaemon(dbus.service.Object): def GetNumberOfNetworks(self): """ Returns number of networks. """ return len(self.LastScan) - + @dbus.service.method('org.wicd.daemon.wireless') def GetApBssid(self): """ Gets the MAC address for the active network. """ @@ -1036,14 +1056,14 @@ class WirelessDaemon(dbus.service.Object): return value @dbus.service.method('org.wicd.daemon.wireless') - def SetWirelessProperty(self, networkid, property, value): + def SetWirelessProperty(self, netid, prop, value): """ Sets property to value in network specified. """ # We don't write script settings here. - if (property.strip()).endswith("script"): + if (prop.strip()).endswith("script"): print "Setting script properties through the daemon is not" \ - + " permitted." + + " permitted." return False - self.LastScan[networkid][property] = misc.Noneify(value) + self.LastScan[netid][prop] = misc.to_unicode(misc.Noneify(value)) @dbus.service.method('org.wicd.daemon.wireless') def DetectWirelessInterface(self): @@ -1054,7 +1074,7 @@ class WirelessDaemon(dbus.service.Object): else: print "Couldn't detect a wireless interface." return str(iface) - + @dbus.service.method('org.wicd.daemon.wireless') def DisconnectWireless(self): """ Disconnects the wireless network. """ @@ -1106,13 +1126,13 @@ class WirelessDaemon(dbus.service.Object): """ Calls a method to enable the wireless interface. """ result = self.wifi.EnableInterface() return result - + @dbus.service.method('org.wicd.daemon.wireless') def DisableWirelessInterface(self): """ Calls a method to disable the wireless interface. """ result = self.wifi.DisableInterface() return result - + @dbus.service.method('org.wicd.daemon.wireless') def ConnectWireless(self, id): """ Connects the the wireless network specified by i""" @@ -1121,8 +1141,10 @@ class WirelessDaemon(dbus.service.Object): # is done. self.wifi.before_script = self.GetWirelessProperty(id, 'beforescript') self.wifi.after_script = self.GetWirelessProperty(id, 'afterscript') - self.wifi.disconnect_script = self.GetWirelessProperty(id, - 'disconnectscript') + self.wifi.pre_disconnect_script = self.GetWirelessProperty(id, + 'predisconnectscript') + self.wifi.post_disconnect_script = self.GetWirelessProperty(id, + 'postdisconnectscript') print 'Connecting to wireless network ' + self.LastScan[id]['essid'] self.daemon.wired_bus.wired.Disconnect() self.daemon.SetForcedDisconnect(False) @@ -1143,12 +1165,6 @@ class WirelessDaemon(dbus.service.Object): ip = self.wifi.GetIP(ifconfig) return ip - @dbus.service.method('org.wicd.daemon.wireless') - def GetOperationalMode(self, ifconfig=""): - """ Returns the IP associated with the wireless interface. """ - ip = self.wifi.GetOperationalMode(ifconfig) - return ip - @dbus.service.method('org.wicd.daemon.wireless') def CheckWirelessConnectingMessage(self): """ Returns the wireless interface's status message. """ @@ -1157,14 +1173,14 @@ class WirelessDaemon(dbus.service.Object): return stat else: return False - + @dbus.service.method('org.wicd.daemon.wireless') def ReadWirelessNetworkProfile(self, id): """ Reads in wireless profile as the active network """ cur_network = self.LastScan[id] essid_key = "essid:%s" % cur_network["essid"] bssid_key = cur_network["bssid"] - + if self.config.get(essid_key, 'use_settings_globally'): section = essid_key elif self.config.has_section(bssid_key): @@ -1172,23 +1188,24 @@ class WirelessDaemon(dbus.service.Object): else: cur_network["has_profile"] = False return "500: Profile Not Found" - + cur_network["has_profile"] = True - # Read the essid because we need to name those hidden - # wireless networks now - but only read it if it is hidden. - if cur_network["hidden"]: - cur_network["essid"] = self.config.get(section, "essid") - if cur_network["essid"] in ["", "Hidden", ""]: - cur_network["essid"] = "" for x in self.config.options(section): if not cur_network.has_key(x) or x.endswith("script"): cur_network[x] = misc.Noneify(self.config.get(section, x)) for option in ['use_static_dns', 'use_global_dns', 'encryption', 'use_settings_globally']: cur_network[option] = bool(cur_network.get(option)) + # Read the essid because we need to name those hidden + # wireless networks now - but only read it if it is hidden. + if cur_network["hidden"]: + if cur_network.get("essid") in ["", "Hidden", "", None]: + cur_network["essid"] = "" + else: + cur_network['essid'] = self.config.get(section, 'essid') return "100: Loaded Profile" - + @dbus.service.method('org.wicd.daemon.wireless') def SaveWirelessNetworkProfile(self, id): """ Writes a wireless profile to disk. """ @@ -1202,27 +1219,29 @@ class WirelessDaemon(dbus.service.Object): self.config.remove_section(bssid_key) self.config.add_section(bssid_key) - + # We want to write the essid in addition to bssid # sections if global settings are enabled. + self.config.remove_section(essid_key) if cur_network["use_settings_globally"]: - self.config.remove_section(essid_key) self.config.add_section(essid_key) for x in cur_network: self.config.set(bssid_key, x, cur_network[x]) if cur_network["use_settings_globally"]: self.config.set(essid_key, x, cur_network[x]) - + write_script_ent(bssid_key, "beforescript") write_script_ent(bssid_key, "afterscript") - write_script_ent(bssid_key, "disconnectscript") - + write_script_ent(bssid_key, "predisconnectscript") + write_script_ent(bssid_key, "postdisconnectscript") + if cur_network["use_settings_globally"]: write_script_ent(essid_key, "beforescript") write_script_ent(essid_key, "afterscript") - write_script_ent(essid_key, "disconnectscript") - + write_script_ent(essid_key, "predisconnectscript") + write_script_ent(essid_key, "postdisconnectscript") + self.config.write() @dbus.service.method('org.wicd.daemon.wireless') @@ -1235,40 +1254,40 @@ class WirelessDaemon(dbus.service.Object): config = self.config cur_network = self.LastScan[id] essid_key = "essid:" + cur_network["essid"] - + config.set(cur_network["bssid"], option, str(cur_network[option])) # Write the global section as well, if required. if config.get(essid_key, 'use_settings_globally'): config.set(essid_key, option, str(cur_network[option])) config.write() - + @dbus.service.method('org.wicd.daemon.wireless') def RemoveGlobalEssidEntry(self, networkid): """ Removes the global entry for the networkid provided. """ essid_key = "essid:" + str(self.LastScan[networkid]) self.config.remove_section(essid_key) - + @dbus.service.method('org.wicd.daemon.wireless') def GetWpaSupplicantDrivers(self, drivers): """ Returns all valid wpa_supplicant drivers in a given list. """ return self.wifi.GetWpaSupplicantDrivers(drivers) - + @dbus.service.method('org.wicd.daemon.wireless') def ReloadConfig(self): """ Reloads the active config file. """ self.config.reload() - + @dbus.service.signal(dbus_interface='org.wicd.daemon.wireless', signature='') def SendStartScanSignal(self): """ Emits a signal announcing a scan has started. """ self._scanning = True - + @dbus.service.signal(dbus_interface='org.wicd.daemon.wireless', signature='') def SendEndScanSignal(self): """ Emits a signal announcing a scan has finished. """ self._scanning = False - + def _wireless_autoconnect(self, fresh=True): """ Attempts to autoconnect to a wireless network. """ print "No wired connection present, attempting to autoconnect " + \ @@ -1278,7 +1297,7 @@ class WirelessDaemon(dbus.service.Object): return if fresh: self.Scan(sync=True) - + for x, network in enumerate(self.LastScan): if bool(network["has_profile"]): if self.debug_mode: @@ -1290,11 +1309,11 @@ class WirelessDaemon(dbus.service.Object): time.sleep(1) return print "Unable to autoconnect, you'll have to manually connect" - + ########################### ###### Wired Daemon ####### ########################### - + class WiredDaemon(dbus.service.Object): """ DBus interface for wired connection operations. """ def __init__(self, bus_name, daemon, wired=None, debug=False): @@ -1304,6 +1323,7 @@ class WiredDaemon(dbus.service.Object): self.daemon = daemon self.wired = wired self._debug_mode = debug + self._cur_wired_prof_name = "" self.WiredNetwork = {} self.config = ConfigManager(os.path.join(wpath.etc, "wired-settings.conf"), @@ -1315,7 +1335,7 @@ class WiredDaemon(dbus.service.Object): self._debug_mode = mode self.config.debug = mode debug_mode = property(get_debug_mode, set_debug_mode) - + @dbus.service.method('org.wicd.daemon.wired') def GetWiredIP(self, ifconfig=""): """ Returns the wired interface's ip address. """ @@ -1337,7 +1357,7 @@ class WiredDaemon(dbus.service.Object): return self.wired.connecting_thread.GetStatus() else: return False - + @dbus.service.method('org.wicd.daemon.wired') def DetectWiredInterface(self): """ Returns an automatically detected wireless interface. """ @@ -1356,7 +1376,7 @@ class WiredDaemon(dbus.service.Object): print "Setting script properties through the daemon" \ + " is not permitted." return False - self.WiredNetwork[property] = misc.Noneify(value) + self.WiredNetwork[property] = misc.to_unicode(misc.Noneify(value)) return True else: print 'SetWiredProperty: WiredNetwork does not exist' @@ -1379,7 +1399,7 @@ class WiredDaemon(dbus.service.Object): return True else: return False - + @dbus.service.method('org.wicd.daemon.wired') def DisconnectWired(self): """ Disconnects the wired network. """ @@ -1393,12 +1413,12 @@ class WiredDaemon(dbus.service.Object): return self.wired.CheckPluggedIn() else: return None - + @dbus.service.method('org.wicd.daemon.wired') def IsWiredUp(self): """ Returns a boolean specifying if wired iface is up or down. """ return self.wired.IsUp() - + @dbus.service.method('org.wicd.daemon.wired') def EnableWiredInterface(self): """ Calls a method to enable the wired interface. """ @@ -1414,12 +1434,15 @@ class WiredDaemon(dbus.service.Object): """ Connects to a wired network. """ self.wired.before_script = self.GetWiredProperty("beforescript") self.wired.after_script = self.GetWiredProperty("afterscript") - self.wired.disconnect_script = self.GetWiredProperty("disconnectscript") + self.wired.pre_disconnect_script = self.GetWiredProperty("predisconnectscript") + self.wired.post_disconnect_script = self.GetWiredProperty("postdisconnectscript") self.daemon.wireless_bus.wifi.Disconnect() self.daemon.SetForcedDisconnect(False) + self.UnsetWiredLastUsed() + self.config.set(self._cur_wired_prof_name, "lastused", True, write=True) self.wired.Connect(self.WiredNetwork, debug=self.debug_mode) self.daemon.UpdateState() - + @dbus.service.method('org.wicd.daemon.wired') def CreateWiredNetworkProfile(self, profilename, default=False): """ Creates a wired network profile. """ @@ -1428,9 +1451,10 @@ class WiredDaemon(dbus.service.Object): if self.config.has_section(profilename): return False - for option in ["ip", "broadcast", "netmask","gateway", "search_domain", + for option in ["ip", "broadcast", "netmask", "gateway", "search_domain", "dns_domain", "dns1", "dns2", "dns3", "beforescript", - "afterscript", "disconnectscript"]: + "afterscript", "predisconnectscript", + "postdisconnectscript"]: self.config.set(profilename, option, None) self.config.set(profilename, "default", default) self.config.write() @@ -1484,9 +1508,11 @@ class WiredDaemon(dbus.service.Object): def write_script_ent(prof, script): if not self.config.has_option(prof, script): self.config.set(prof, script, None) - - if profilename == "": + + profilename = profilename.strip() + if not profilename: self.config.write() + print "Warning: Bad wired profile name given, ignoring." return "500: Bad Profile name" if self.debug_mode: print "saving wired profile %s" % profilename @@ -1495,10 +1521,11 @@ class WiredDaemon(dbus.service.Object): self.config.add_section(profilename) for x in self.WiredNetwork: self.config.set(profilename, x, self.WiredNetwork[x]) - + write_script_ent(profilename, "beforescript") write_script_ent(profilename, "afterscript") - write_script_ent(profilename, "disconnectscript") + write_script_ent(profilename, "predisconnectscript") + write_script_ent(profilename, "postdisconnectscript") self.config.write() return "100: Profile Written" @@ -1515,8 +1542,10 @@ class WiredDaemon(dbus.service.Object): profile['use_global_dns'] = bool(profile.get('use_global_dns')) profile['use_static_dns'] = bool(profile.get('use_static_dns')) self.WiredNetwork = profile + self._cur_wired_prof_name = profilename return "100: Loaded Profile" else: + self._cur_wired_prof_name = "" self.WiredNetwork = {} return "500: Profile Not Found" @@ -1527,7 +1556,7 @@ class WiredDaemon(dbus.service.Object): if not sections: sections = [""] return sections - + @dbus.service.method('org.wicd.daemon.wired') def ReloadConfig(self): """ Reloads the active config file. """ @@ -1571,14 +1600,12 @@ def daemonize(): # Decouple from parent environment to stop us from being a zombie. os.setsid() - os.umask(0) # Fork the second time to prevent us from opening a file that will # become our controlling terminal. try: pid = os.fork() if pid > 0: - print wpath.pidfile dirname = os.path.dirname(wpath.pidfile) if not os.path.exists(dirname): os.makedirs(dirname) @@ -1586,20 +1613,34 @@ def daemonize(): pidfile.write(str(pid) + '\n') pidfile.close() sys.exit(0) + else: + os.umask(0) + os.chdir('/') except OSError, e: print >> sys.stderr, "Fork #2 failed: %d (%s)" % (e.errno, e.strerror) sys.exit(1) - - sys.stdout.flush() - sys.stderr.flush() - os.close(sys.__stdin__.fileno()) - os.close(sys.__stdout__.fileno()) - os.close(sys.__stderr__.fileno()) - - # stdin always from /dev/null - sys.stdin = open('/dev/null', 'r') -child_pid = None + sys.stdin.close() + sys.stdout.close() + sys.stderr.close() + + try: + maxfd = os.sysconf("SC_OPEN_MAX") + except (AttributeError, ValueError): + maxfd = 1024 + + for fd in range(0, maxfd): + try: + os.close(fd) + except OSError: + pass + + os.open(os.devnull, os.O_RDWR) + + # Duplicate standard input to standard output and standard error. + os.dup2(0, 1) + os.dup2(0, 2) + def main(argv): """ The main daemon program. @@ -1608,7 +1649,6 @@ def main(argv): argv -- The arguments passed to the script. """ - global child_pid do_daemonize = True redirect_stderr = True redirect_stdout = True @@ -1616,8 +1656,8 @@ def main(argv): try: opts, args = getopt.getopt(sys.argv[1:], 'fenoah', - ['help', 'no-daemon', 'no-poll', 'no-stderr', 'no-stdout', - 'no-autoconnect']) + ['help', 'no-daemon', 'no-poll', 'no-stderr', 'no-stdout', + 'no-autoconnect']) except getopt.GetoptError: # Print help information and exit usage() @@ -1640,7 +1680,7 @@ def main(argv): no_poll = True if do_daemonize: daemonize() - + if redirect_stderr or redirect_stdout: logpath = os.path.join(wpath.log, 'wicd.log') if not os.path.exists(wpath.log): @@ -1649,9 +1689,17 @@ def main(argv): output = ManagedStdio(logpath) if os.path.exists(logpath): try: - os.chmod(logpath, 0600) + os.chmod(logpath, int(wpath.log_perms,8)) except: - print 'unable to chmod log file to 0600' + print 'unable to chmod log file to %s' % wpath.log_perms + + try: + if wpath.log_group: + import grp + group = grp.getgrnam(wpath.log_group) + os.chown(logpath, 0, group[2]) + except: + print 'unable to chown log file to %s' % group[2] if redirect_stdout: sys.stdout = output if redirect_stderr: sys.stderr = output @@ -1660,15 +1708,18 @@ def main(argv): print 'wicd initializing...' print '---------------------------' + print 'wicd is version', wpath.version, wpath.revision + # Open the DBUS session bus = dbus.SystemBus() wicd_bus = dbus.service.BusName('org.wicd.daemon', bus=bus) daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect) if not no_poll: - (child_pid, x, y, z) = gobject.spawn_async( - [misc.find_path("python"), "-O", os.path.join(wpath.lib, "monitor.py")]) - signal.signal(signal.SIGTERM, sigterm_caught) - + child_pid = Popen([misc.find_path("python"), "-O", + os.path.join(wpath.lib, "monitor.py")], + shell=False, close_fds=True).pid + atexit.register(on_exit, child_pid) + # Enter the main loop mainloop = gobject.MainLoop() try: @@ -1676,11 +1727,9 @@ def main(argv): except KeyboardInterrupt: pass daemon.DaemonClosing() - sigterm_caught() -def sigterm_caught(sig=None, frame=None): +def on_exit(child_pid): """ Called when a SIGTERM is caught, kills monitor.py before exiting. """ - global child_pid if child_pid: print 'Daemon going down, killing wicd-monitor...' try: @@ -1701,4 +1750,3 @@ if __name__ == '__main__': sys.exit(1) gobject.threads_init() main(sys.argv) - diff --git a/wicd/wnettools.py b/wicd/wnettools.py index 968d3be..a94617d 100644 --- a/wicd/wnettools.py +++ b/wicd/wnettools.py @@ -6,18 +6,16 @@ This module implements functions to control and obtain information from network interfaces. -def SetDNS() -- Set the DNS servers of the system. -def GetWirelessInterfaces() -- Get the wireless interfaces available. -class Interface() -- Control a network interface. -class WiredInterface() -- Control a wired network interface. -class WirelessInterface() -- Control a wireless network interface. +class BaseInterface() -- Control a network interface. +class BaseWiredInterface() -- Control a wired network interface. +class BaseWirelessInterface() -- Control a wireless network interface. """ # -# Copyright (C) 2007 - 2008 Adam Blackburn -# Copyright (C) 2007 - 2008 Dan O'Reilly -# Copyright (C) 2007 - 2008 Byron Hillis +# Copyright (C) 2007 - 2009 Adam Blackburn +# Copyright (C) 2007 - 2009 Dan O'Reilly +# Copyright (C) 2007 - 2009 Byron Hillis # # 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 @@ -43,30 +41,30 @@ import misc from misc import find_path # Regular expressions. -__re_mode = (re.I | re.M | re.S) -essid_pattern = re.compile('.*ESSID:"?(.*?)"?\s*\n', __re_mode) -ap_mac_pattern = re.compile('.*Address: (.*?)\n', __re_mode) -channel_pattern = re.compile('.*Channel:? ?(\d\d?)', __re_mode) -strength_pattern = re.compile('.*Quality:?=? ?(\d+)\s*/?\s*(\d*)', __re_mode) -altstrength_pattern = re.compile('.*Signal level:?=? ?(\d+)\s*/?\s*(\d*)', __re_mode) -signaldbm_pattern = re.compile('.*Signal level:?=? ?(-\d\d*)', __re_mode) -bitrates_pattern = re.compile('.*Bit Rates:(.*?)E', __re_mode) -mode_pattern = re.compile('.*Mode:(.*?)\n', __re_mode) -freq_pattern = re.compile('.*Frequency:(.*?)\n', __re_mode) -wep_pattern = re.compile('.*Encryption key:(.*?)\n', __re_mode) -altwpa_pattern = re.compile('(wpa_ie)', __re_mode) -wpa1_pattern = re.compile('(WPA Version 1)', __re_mode) -wpa2_pattern = re.compile('(WPA2)', __re_mode) +_re_mode = (re.I | re.M | re.S) +essid_pattern = re.compile('.*ESSID:"?(.*?)"?\s*\n', _re_mode) +ap_mac_pattern = re.compile('.*Address: (.*?)\n', _re_mode) +channel_pattern = re.compile('.*Channel:?=? ?(\d\d?)', _re_mode) +strength_pattern = re.compile('.*Quality:?=? ?(\d+)\s*/?\s*(\d*)', _re_mode) +altstrength_pattern = re.compile('.*Signal level:?=? ?(\d+)\s*/?\s*(\d*)', _re_mode) +signaldbm_pattern = re.compile('.*Signal level:?=? ?(-\d\d*)', _re_mode) +bitrates_pattern = re.compile('(\d+\s+\S+/s)', _re_mode) +mode_pattern = re.compile('.*Mode:(.*?)\n', _re_mode) +freq_pattern = re.compile('.*Frequency:(.*?)\n', _re_mode) +wep_pattern = re.compile('.*Encryption key:(.*?)\n', _re_mode) +altwpa_pattern = re.compile('(wpa_ie)', _re_mode) +wpa1_pattern = re.compile('(WPA Version 1)', _re_mode) +wpa2_pattern = re.compile('(WPA2)', _re_mode) #iwconfig-only regular expressions. -ip_pattern = re.compile(r'inet [Aa]d?dr[^.]*:([^.]*\.[^.]*\.[^.]*\.[0-9]*)',re.S) -bssid_pattern = re.compile('.*Access Point: (([0-9A-Z]{2}:){5}[0-9A-Z]{2})', __re_mode) -bitrate_pattern = re.compile('.*Bit Rate=(.*?/s)', __re_mode) -opmode_pattern = re.compile('.*Mode:(.*?) ', __re_mode) -authmethods_pattern = re.compile('.*Authentication capabilities :\n(.*?)Current', __re_mode) +ip_pattern = re.compile(r'inet [Aa]d?dr[^.]*:([^.]*\.[^.]*\.[^.]*\.[0-9]*)', re.S) +bssid_pattern = re.compile('.*Access Point: (([0-9A-Z]{2}:){5}[0-9A-Z]{2})', _re_mode) +bitrate_pattern = re.compile('.*Bit Rate=(.*?/s)', _re_mode) +opmode_pattern = re.compile('.*Mode:(.*?) ', _re_mode) +authmethods_pattern = re.compile('.*Authentication capabilities :\n(.*?)Current', _re_mode) # Regular expressions for wpa_cli output -auth_pattern = re.compile('.*wpa_state=(.*?)\n', __re_mode) +auth_pattern = re.compile('.*wpa_state=(.*?)\n', _re_mode) RALINK_DRIVER = 'ralink legacy' @@ -74,9 +72,6 @@ blacklist_strict = '!"#$%&\'()*+,./:;<=>?@[\\]^`{|}~ ' blacklist_norm = ";`$!*|><&\\" blank_trans = maketrans("", "") -__all__ = ["GetDefaultGateway", "GetWiredInterfaces", - "GetWirelessInterfaces", "IsValidWpaSuppDriver"] - def _sanitize_string(string): if string: return translate(str(string), blank_trans, blacklist_norm) @@ -88,6 +83,31 @@ def _sanitize_string_strict(string): return translate(str(string), blank_trans, blacklist_strict) else: return string + +_cache = {} +def timedcache(duration=5): + """ A caching decorator for use with wnettools methods. + + Caches the results of a function for a given number of + seconds (defaults to 5). + + """ + def _timedcache(f): + def __timedcache(self, *args, **kwargs): + key = str(args) + str(kwargs) + str(f) + if hasattr(self, 'iface'): + key += self.iface + if (key in _cache and + (time.time() - _cache[key]['time']) < duration): + return _cache[key]['value'] + else: + value = f(self, *args, **kwargs) + _cache[key] = { 'time' : time.time(), 'value' : value } + return value + + return __timedcache + + return _timedcache def GetDefaultGateway(): """ Attempts to determine the default gateway by parsing route -n. """ @@ -117,18 +137,18 @@ def GetWirelessInterfaces(): """ dev_dir = '/sys/class/net/' - ifnames = [] - - ifnames = [iface for iface in os.listdir(dev_dir) if os.path.isdir(dev_dir + iface) - and 'wireless' in os.listdir(dev_dir + iface)] + ifnames = [iface for iface in os.listdir(dev_dir) + if os.path.isdir(dev_dir + iface) and + 'wireless' in os.listdir(dev_dir + iface)] return ifnames def GetWiredInterfaces(): """ Returns a list of wired interfaces on the system. """ basedir = '/sys/class/net/' - return [iface for iface in os.listdir(basedir) if not 'wireless' - in os.listdir(basedir + iface) and + return [iface for iface in os.listdir(basedir) + if os.path.isdir(basedir + iface) and not 'wireless' + in os.listdir(basedir + iface) and open(basedir + iface + "/type").readlines()[0].strip() == "1"] def NeedsExternalCalls(): @@ -139,10 +159,7 @@ def IsValidWpaSuppDriver(driver): """ Returns True if given string is a valid wpa_supplicant driver. """ output = misc.Run(["wpa_supplicant", "-D%s" % driver, "-iolan19", "-c/etc/abcd%sdefzz.zconfz" % random.randint(1, 1000)]) - if re.match("Unsupported driver", output): - return False - else: - return True + return not "Unsupported driver" in output def neediface(default_response): """ A decorator for only running a method if self.iface is defined. @@ -154,7 +171,8 @@ def neediface(default_response): """ def wrapper(func): def newfunc(self, *args, **kwargs): - if not self.iface: + if not self.iface or \ + not os.path.exists('/sys/class/net/%s' % self.iface): return default_response return func(self, *args, **kwargs) newfunc.__dict__ = func.__dict__ @@ -222,15 +240,20 @@ class BaseInterface(object): """ def get_client_name(cl): """ Converts the integer value for a dhcp client to a string. """ - if self.dhclient_cmd and cl in [misc.DHCLIENT, misc.AUTO]: - client = "dhclient" - cmd = self.dhclient_cmd - elif self.dhcpcd_cmd and cl in [misc.DHCPCD, misc.AUTO]: + if self.dhcpcd_cmd and cl in [misc.DHCPCD, misc.AUTO]: client = "dhcpcd" cmd = self.dhcpcd_cmd elif self.pump_cmd and cl in [misc.PUMP, misc.AUTO]: client = "pump" cmd = self.pump_cmd + elif self.dhclient_cmd and cl in [misc.DHCLIENT, misc.AUTO]: + client = "dhclient" + cmd = self.dhclient_cmd + if self.dhclient_needs_verbose: + cmd += ' -v' + elif self.udhcpc_cmd and cl in [misc.UDHCPC, misc.AUTO]: + client = "udhcpc" + cmd = self.udhcpc_cmd else: client = None cmd = "" @@ -238,20 +261,25 @@ class BaseInterface(object): client_dict = { "dhclient" : - {'connect' : r"%s %s", - 'release' : r"%s -r %s", + {'connect' : r"%(cmd)s %(iface)s", + 'release' : r"%(cmd)s -r %(iface)s", 'id' : misc.DHCLIENT, }, "pump" : - { 'connect' : r"%s -i %s", - 'release' : r"%s -r -i %s", + { 'connect' : r"%(cmd)s -i %(iface)s", + 'release' : r"%(cmd)s -r -i %(iface)s", 'id' : misc.PUMP, }, "dhcpcd" : - {'connect' : r"%s %s", - 'release' : r"%s -k %s", + {'connect' : r"%(cmd)s %(iface)s", + 'release' : r"%(cmd)s -k %(iface)s", 'id' : misc.DHCPCD, }, + "udhcpc": + {'connect' : r"%(cmd)s -n -i %(iface)s", + 'release' : r"killall -SIGUSR2 %(cmd)s", + 'id' : misc.UDHCPC, + }, } (client_name, cmd) = get_client_name(self.DHCP_CLIENT) if not client_name or not cmd: @@ -259,9 +287,9 @@ class BaseInterface(object): return "" if flavor == "connect": - return client_dict[client_name]['connect'] % (cmd, self.iface) + return client_dict[client_name]['connect'] % {"cmd":cmd, "iface":self.iface} elif flavor == "release": - return client_dict[client_name]['release'] % (cmd, self.iface) + return client_dict[client_name]['release'] % {"cmd":cmd, "iface":self.iface} else: return client_dict[client_name]['id'] @@ -299,8 +327,16 @@ class BaseInterface(object): """ self.dhclient_cmd = self._find_program_path("dhclient") + if self.dhclient_cmd != None: + output = misc.Run(self.dhclient_cmd + " --version", + include_stderr=True) + if '4.' in output: + self.dhclient_needs_verbose = True + else: + self.dhclient_needs_verbose = False self.dhcpcd_cmd = self._find_program_path("dhcpcd") self.pump_cmd = self._find_program_path("pump") + self.udhcpc_cmd = self._find_program_path("udhcpc") def CheckWiredTools(self): """ Check for the existence of ethtool and mii-tool. """ @@ -348,6 +384,14 @@ class BaseInterface(object): if self.verbose: print cmd misc.Run(cmd) return True + + @timedcache(2) + @neediface("") + def GetIfconfig(self): + """ Runs ifconfig and returns the output. """ + cmd = "ifconfig %s" % self.iface + if self.verbose: print cmd + return misc.Run(cmd) @neediface("") def SetAddress(self, ip=None, netmask=None, broadcast=None): @@ -397,7 +441,7 @@ class BaseInterface(object): if line == '': # Empty string means dhclient is done. dhclient_complete = True else: - print line.strip('\n') + print misc.to_unicode(line.strip('\n')) if line.startswith('bound'): dhclient_success = True dhclient_complete = True @@ -424,7 +468,7 @@ class BaseInterface(object): elif line.strip().lower().startswith('Operation failed.'): pump_success = False pump_complete = True - print line + print misc.to_unicode(line) return self._check_dhcp_result(pump_success) @@ -448,10 +492,34 @@ class BaseInterface(object): dhcpcd_complete = True elif line == '': dhcpcd_complete = True - print line + print misc.to_unicode(line) return self._check_dhcp_result(dhcpcd_success) - + + def _parse_udhcpc(self, pipe): + """ Determines if obtaining an IP using udhcpc succeeded. + + Keyword arguments: + pipe -- stdout pipe to the dhcpcd process. + + Returns: + 'success' if successful, an error code string otherwise. + + """ + udhcpc_complete = False + udhcpc_success = True + + while not udhcpc_complete: + line = pipe.readline() + if line.endswith("failing"): + udhcpc_success = False + udhcpc_complete = True + elif line == '': + udhcpc_complete = True + print line + + return self._check_dhcp_result(udhcpc_success) + def _check_dhcp_result(self, success): """ Print and return the correct DHCP connection result. @@ -490,6 +558,8 @@ class BaseInterface(object): return self._parse_pump(pipe) elif DHCP_CLIENT == misc.DHCPCD: return self._parse_dhcpcd(pipe) + elif DHCP_CLIENT == misc.UDHCPC: + return self._parse_udhcpc(pipe) else: print 'ERROR no dhclient found!' @@ -595,9 +665,7 @@ class BaseInterface(object): """ if not ifconfig: - cmd = 'ifconfig ' + self.iface - if self.verbose: print cmd - output = misc.Run(cmd) + output = self.GetIfconfig() else: output = ifconfig return misc.RunRegex(ip_pattern, output) @@ -634,9 +702,7 @@ class BaseInterface(object): def _slow_is_up(self, ifconfig=None): """ Determine if an interface is up using ifconfig. """ if not ifconfig: - cmd = "ifconfig " + self.iface - if self.verbose: print cmd - output = misc.Run(cmd) + output = self.GetIfconfig() else: output = ifconfig lines = output.split('\n') @@ -799,6 +865,7 @@ class BaseWirelessInterface(BaseInterface): return radiostatus + @timedcache(2) @neediface(False) def GetIwconfig(self): """ Returns the output of iwconfig for this interface. """ @@ -964,12 +1031,17 @@ class BaseWirelessInterface(BaseInterface): """ cmd = ['iwconfig', self.iface, 'essid', essid] - if channel and str(channel).isdigit(): - cmd.extend(['channel', str(channel)]) - if bssid: - cmd.extend(['ap', bssid]) if self.verbose: print str(cmd) misc.Run(cmd) + base = "iwconfig %s" % self.iface + if channel and str(channel).isdigit(): + cmd = "%s channel %s" % (base, str(channel)) + if self.verbose: print cmd + misc.Run(cmd) + if bssid: + cmd = "%s ap %s" % (base, bssid) + if self.verbose: print cmd + misc.Run(cmd) def GeneratePSK(self, network): """ Generate a PSK using wpa_passphrase. @@ -982,7 +1054,7 @@ class BaseWirelessInterface(BaseInterface): if not wpa_pass_path: return None key_pattern = re.compile('network={.*?\spsk=(.*?)\n}.*', re.I | re.M | re.S) - cmd = [wpa_pass_path, network['essid'], network['key']] + cmd = [wpa_pass_path, network['essid'], str(network['key'])] if self.verbose: print cmd return misc.RunRegex(key_pattern, misc.Run(cmd)) @@ -1070,15 +1142,21 @@ class BaseWirelessInterface(BaseInterface): # An array for the access points access_points = [] + access_points = {} for cell in networks: # Only use sections where there is an ESSID. if 'ESSID:' in cell: # Add this network to the list of networks entry = self._ParseAccessPoint(cell, ralink_info) if entry is not None: - access_points.append(entry) + # Normally we only get duplicate bssids with hidden + # networks. If we hit this, we only want the entry + # with the real essid to be in the network list. + if (entry['bssid'] not in access_points + or not entry['hidden']): + access_points[entry['bssid']] = entry - return access_points + return access_points.values() def _ParseAccessPoint(self, cell, ralink_info): """ Parse a single cell from the output of iwlist. @@ -1099,7 +1177,8 @@ class BaseWirelessInterface(BaseInterface): except (UnicodeDecodeError, UnicodeEncodeError): print 'Unicode problem with current network essid, ignoring!!' return None - if ap['essid'] in ['', ""]: + if ap['essid'] in ['', "", None]: + print 'hidden' ap['hidden'] = True ap['essid'] = "" else: @@ -1113,9 +1192,9 @@ class BaseWirelessInterface(BaseInterface): ap['channel'] = self._FreqToChannel(freq) # Bit Rate - ap['bitrates'] = misc.RunRegex(bitrates_pattern, cell).split('\n') - ap['bitrates'] = '; '.join(m.strip() for m in ap['bitrates']).rstrip('; ') - + ap['bitrates'] = misc.RunRegex(bitrates_pattern, + cell.split("Bit Rates")[-1]) + # BSSID ap['bssid'] = misc.RunRegex(ap_mac_pattern, cell) @@ -1181,6 +1260,7 @@ class BaseWirelessInterface(BaseInterface): MAX_TIME = 35 MAX_DISCONNECTED_TIME = 3 disconnected_time = 0 + forced_rescan = False while (time.time() - auth_time) < MAX_TIME: cmd = '%s -i %s status' % (self.wpa_cli_cmd, self.iface) output = misc.Run(cmd) @@ -1192,11 +1272,12 @@ class BaseWirelessInterface(BaseInterface): return False if result == "COMPLETED": return True - elif result == "DISCONNECTED": + elif result == "DISCONNECTED" and not forced_rescan: disconnected_time += 1 if disconnected_time > MAX_DISCONNECTED_TIME: disconnected_time = 0 # Force a rescan to get wpa_supplicant moving again. + forced_rescan = True self._ForceSupplicantScan() MAX_TIME += 5 else: @@ -1233,9 +1314,7 @@ class BaseWirelessInterface(BaseInterface): def GetBSSID(self, iwconfig=None): """ Get the MAC address for the interface. """ if not iwconfig: - cmd = 'iwconfig ' + self.iface - if self.verbose: print cmd - output = misc.Run(cmd) + output = self.GetIwconfig() else: output = iwconfig @@ -1246,9 +1325,7 @@ class BaseWirelessInterface(BaseInterface): def GetCurrentBitrate(self, iwconfig=None): """ Get the current bitrate for the interface. """ if not iwconfig: - cmd = 'iwconfig ' + self.iface - if self.verbose: print cmd - output = misc.Run(cmd) + output = self.GetIwconfig() else: output = iwconfig @@ -1259,9 +1336,7 @@ class BaseWirelessInterface(BaseInterface): def GetOperationalMode(self, iwconfig=None): """ Get the operational mode for the interface. """ if not iwconfig: - cmd = 'iwconfig ' + self.iface - if self.verbose: print cmd - output = misc.Run(cmd) + output = self.GetIwconfig() else: output = iwconfig @@ -1292,7 +1367,14 @@ class BaseWirelessInterface(BaseInterface): (strength, max_strength) = (None, None) if strength in ['', None]: - [(strength, max_strength)] = altstrength_pattern.findall(output) + try: + [(strength, max_strength)] = altstrength_pattern.findall(output) + except ValueError: + # if the pattern was unable to match anything + # we'll return 101, which will allow us to stay + # connected even though we don't know the strength + # it also allows us to tell if + return 101 if strength not in ['', None] and max_strength: return (100 * int(strength) // int(max_strength)) elif strength not in ["", None]: @@ -1309,9 +1391,7 @@ class BaseWirelessInterface(BaseInterface): """ if not iwconfig: - cmd = 'iwconfig ' + self.iface - if self.verbose: print cmd - output = misc.Run(cmd) + output = self.GetIwconfig() else: output = iwconfig return self._get_link_quality(output) @@ -1325,9 +1405,7 @@ class BaseWirelessInterface(BaseInterface): """ if not iwconfig: - cmd = 'iwconfig ' + self.iface - if self.verbose: print cmd - output = misc.Run(cmd) + output = self.GetIwconfig() else: output = iwconfig signaldbm_pattern = re.compile('.*Signal level:?=? ?(-\d\d*)', @@ -1344,9 +1422,7 @@ class BaseWirelessInterface(BaseInterface): """ if not iwconfig: - cmd = 'iwconfig ' + self.iface - if self.verbose: print cmd - output = misc.Run(cmd) + output = self.GetIwconfig() else: output = iwconfig network = misc.RunRegex(re.compile('.*ESSID:"(.*?)"',