diff --git a/ChangeLog b/ChangeLog index e990cbb0d6..fd81a20893 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-02-27 Dan Williams + + 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 * configure.in: Added "it" (Italian) to ALL_LINGUAS. diff --git a/panel-applet/NMWirelessAppletDbus.c b/panel-applet/NMWirelessAppletDbus.c index 12ea53dd75..9ff1d56005 100644 --- a/panel-applet/NMWirelessAppletDbus.c +++ b/panel-applet/NMWirelessAppletDbus.c @@ -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 *