2005-03-25 Dan Williams <dcbw@redhat.com>

* panel-applet/NMWirelessApplet.c
		- (nmwa_about_cb): Add some more contributors
		- (nmwa_update_state): show the applet when there's no connection
		- Enable the "Stop/Resume all wireless devices" option in the
			context menu
		- New "no connection" icon

	* src/NetworkManager.c
		- (nm_poll_and_update_wireless_link_state): don't do anything if
			wireless is disabled or we're asleep

	* src/NetworkManagerDHCP.c
		- Remove trailing "\n" on debug messages

	* src/NetworkManagerDbus.c
		- (nm_dbus_network_status_from_data): new state "asleep"

	* src/NetworkManagerDevice.c
		- Merge most of Peter Jones' "completion" patch that greatly reduces
			latency and wait times for most operations
		- (nm_device_wireless_scan): Don't scan when asleep

	* src/NetworkManagerPolicy.c
		- (nm_policy_get_best_device): return no device when asleep
		- (nm_policy_allowed_ap_list_update): From Bill Moss: merge properties
			for all wireless devices on update, not just active device

	* src/NetworkManagerUtils.c
		- Merge Peter Jones' "completion" patch

	* src/nm-dbus-nm.c
		- (nm_dbus_nm_set_wireless_enabled): bring down wireless devices when
			we're told to disable them
		- (nm_dbus_nm_sleep, nm_dbus_nm_wake): new functions for sleep/wake

	* utils/nm-utils.h
		- New variants of the warn/info/error/debug print functions that can take
			variables rather than static strings


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@510 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2005-03-26 03:42:05 +00:00
parent 8284a62c39
commit 4acd2f31dc
19 changed files with 822 additions and 151 deletions

View File

@@ -166,6 +166,12 @@ static NMDevice * nm_policy_get_best_device (NMDevice *switch_to_dev, NMData *da
if (should_lock_on_activate)
*should_lock_on_activate = FALSE;
if (data->asleep == TRUE)
{
data->active_device_locked = FALSE;
return NULL;
}
/* Prefer a device forced on us by the user */
if (switch_to_dev && !nm_device_get_removed (switch_to_dev))
{
@@ -469,7 +475,8 @@ void nm_policy_schedule_device_switch (NMDevice *switch_to_dev, NMData *app_data
*/
static gboolean nm_policy_allowed_ap_list_update (gpointer user_data)
{
NMData *data = (NMData *)user_data;
NMData *data = (NMData *)user_data;
GSList *elt;
g_return_val_if_fail (data != NULL, FALSE);
@@ -482,6 +489,20 @@ static gboolean nm_policy_allowed_ap_list_update (gpointer user_data)
if (data->allowed_ap_list)
nm_ap_list_populate_from_nmi (data->allowed_ap_list, data);
for (elt = data->dev_list; elt != NULL; elt = g_slist_next (elt))
{
NMDevice *dev = (NMDevice *)(elt->data);
if (nm_device_is_wireless (dev))
{
/* Once we have the list, copy in any relevant information from our Allowed list and fill
* in the ESSID of base stations that aren't broadcasting their ESSID, if we have their
* MAC address in our allowed list.
*/
nm_ap_list_copy_essids_by_address (nm_device_ap_list_get (dev), data->allowed_ap_list);
nm_ap_list_copy_properties (nm_device_ap_list_get (dev), data->allowed_ap_list);
}
}
/* If the active device doesn't have a best_ap already, make it update to
* get the new data.
*/
@@ -491,13 +512,6 @@ static gboolean nm_policy_allowed_ap_list_update (gpointer user_data)
{
NMAccessPoint *best_ap;
/* Once we have the list, copy in any relevant information from our Allowed list and fill
* in the ESSID of base stations that aren't broadcasting their ESSID, if we have their
* MAC address in our allowed list.
*/
nm_ap_list_copy_essids_by_address (nm_device_ap_list_get (data->active_device), data->allowed_ap_list);
nm_ap_list_copy_properties (nm_device_ap_list_get (data->active_device), data->allowed_ap_list);
best_ap = nm_device_get_best_ap (data->active_device);
if (!best_ap)
nm_device_update_best_ap (data->active_device);