2005-02-27 Dan Williams <dcbw@redhat.com>

Patch from Bill Moss:
	* panel-applet/NMWirelessAppletDbus.c
		- Make sure strength for current access point is up-to-date when we
			update the gui data model


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@481 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2005-02-28 00:51:57 +00:00
parent 1229434f73
commit bdb8a4db6a
2 changed files with 34 additions and 26 deletions

View file

@ -1,3 +1,10 @@
2005-02-27 Dan Williams <dcbw@redhat.com>
Patch from Bill Moss:
* panel-applet/NMWirelessAppletDbus.c
- Make sure strength for current access point is up-to-date when we
update the gui data model
2005-02-27 Alessio Frusciante <algol@firenze.linux.it>
* configure.in: Added "it" (Italian) to ALL_LINGUAS.

View file

@ -1179,6 +1179,32 @@ void nmwa_copy_data_model (NMWirelessApplet *applet)
}
/*
* nmwa_dbus_update_active_device_strength
*
* Update the active device's current wireless network strength
*
*/
static gboolean nmwa_dbus_update_active_device_strength (gpointer user_data)
{
NMWirelessApplet *applet;
g_return_val_if_fail (user_data != NULL, FALSE);
applet = (NMWirelessApplet *)user_data;
if (applet->gui_active_device && (applet->gui_active_device->type == DEVICE_TYPE_WIRELESS_ETHERNET))
{
guint8 strength = nmwa_dbus_get_object_strength (applet, applet->gui_active_device->nm_device);
applet->gui_active_device->strength = strength;
if (applet->gui_active_device == applet->dbus_active_device)
applet->dbus_active_device->strength = strength;
}
return (TRUE);
}
/*
* nmwa_dbus_device_update_one_network
*
@ -1283,37 +1309,12 @@ static void nmwa_dbus_device_update_one_network (NMWirelessApplet *applet, DBusM
g_mutex_lock (applet->data_mutex);
nmwa_copy_data_model (applet);
g_mutex_unlock (applet->data_mutex);
nmwa_dbus_update_active_device_strength (applet);
}
}
}
/*
* nmwa_dbus_update_active_device_strength
*
* Update the active device's current wireless network strength
*
*/
static gboolean nmwa_dbus_update_active_device_strength (gpointer user_data)
{
NMWirelessApplet *applet;
g_return_val_if_fail (user_data != NULL, FALSE);
applet = (NMWirelessApplet *)user_data;
if (applet->gui_active_device && (applet->gui_active_device->type == DEVICE_TYPE_WIRELESS_ETHERNET))
{
guint8 strength = nmwa_dbus_get_object_strength (applet, applet->gui_active_device->nm_device);
applet->gui_active_device->strength = strength;
if (applet->gui_active_device == applet->dbus_active_device)
applet->dbus_active_device->strength = strength;
}
return (TRUE);
}
/*
* sort_devices_function
*