Commit bdb8a4db authored by Dan Williams's avatar Dan Williams
Browse files

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
parent 1229434f
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.
......
......@@ -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
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment