diff --git a/wicd/autoconnect.py b/wicd/autoconnect.py index be830dc..b591076 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 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..9bd0fbb 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 diff --git a/wicd/backends/be-ioctl.py b/wicd/backends/be-ioctl.py index 0b80a2b..fc9a278 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 diff --git a/wicd/configmanager.py b/wicd/configmanager.py index acfb8a1..19da2bc 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 diff --git a/wicd/configscript.py b/wicd/configscript.py index 9e1a7c5..bb6fa28 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 diff --git a/wicd/dbusmanager.py b/wicd/dbusmanager.py index 0c25b6c..6cd3ec3 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 diff --git a/wicd/gui.py b/wicd/gui.py index 6832337..61b0b5b 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 diff --git a/wicd/guiutil.py b/wicd/guiutil.py index 8eea489..454f37d 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 diff --git a/wicd/logfile.py b/wicd/logfile.py index c25dd03..408aea2 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 diff --git a/wicd/misc.py b/wicd/misc.py index 0c6dbaa..2d552fd 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 diff --git a/wicd/monitor.py b/wicd/monitor.py index 7333724..d47add5 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 diff --git a/wicd/netentry.py b/wicd/netentry.py index a6e1919..6ccd36c 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 diff --git a/wicd/networking.py b/wicd/networking.py index 6f8e42e..084b8e3 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 diff --git a/wicd/prefs.py b/wicd/prefs.py index d25267b..f511c42 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 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 308d620..327951c 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 diff --git a/wicd/wicd-client.py b/wicd/wicd-client.py index 8cac87e..715de5a 100755 --- a/wicd/wicd-client.py +++ b/wicd/wicd-client.py @@ -14,14 +14,12 @@ 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. """ # -# 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 @@ -464,7 +462,6 @@ 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. @@ -475,18 +472,20 @@ class TrayIcon(object): mousing past the menu to select another menu item. """ - 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): 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): @@ -535,7 +534,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) @@ -592,6 +591,7 @@ class TrayIcon(object): if event.button == 1: self.toggle_wicd_gui() elif event.button == 3: + self._menu_just_opened = True self.init_network_menu() self.menu.popup(None, None, None, event.button, event.time) @@ -629,6 +629,7 @@ class TrayIcon(object): def on_popup_menu(self, status, button, timestamp): """ Opens the right click menu for the tray icon. """ + self._menu_just_opened = True self.init_network_menu() self.menu.popup(None, None, None, button, timestamp) diff --git a/wicd/wicd-daemon.py b/wicd/wicd-daemon.py index 6525f27..5344d9c 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 diff --git a/wicd/wnettools.py b/wicd/wnettools.py index 968d3be..52cdda6 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