[network-manager-applet] applet: fix animation glitches and freezes
- From: Dan Williams <dcbw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [network-manager-applet] applet: fix animation glitches and freezes
- Date: Thu, 1 Oct 2009 06:08:33 +0000 (UTC)
commit d45a2d05745379d13271d03330eb8d3213c0e51d
Author: Dan Williams <dcbw redhat com>
Date: Wed Sep 30 23:05:20 2009 -0700
applet: fix animation glitches and freezes
applet_common_device_state_changed() gets called for all devices; but since
it starts/stops animations, which should only happen for active devices,
it should only get called for active or activating devices.
Fixes a problem where animation would start, but then the client would
receive a state update for other devices which would end up stopping
the animation even though the other device wasn't active or activating.
src/applet.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index 0fec6a0..542145e 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -1936,6 +1936,10 @@ applet_common_device_state_changed (NMDevice *device,
NMConnection *connection;
NMActiveConnection *active = NULL;
+ connection = applet_find_active_connection_for_device (device, applet, &active);
+ if (!connection)
+ return;
+
switch (new_state) {
case NM_DEVICE_STATE_PREPARE:
case NM_DEVICE_STATE_CONFIG:
@@ -1947,8 +1951,7 @@ applet_common_device_state_changed (NMDevice *device,
/* If the device activation was successful, update the corresponding
* connection object with a current timestamp.
*/
- connection = applet_find_active_connection_for_device (device, applet, &active);
- if (connection && active)
+ if (active)
update_connection_timestamp (active, connection, applet);
/* Fall through */
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]