After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 646443 - network: fix updating the access point strength
network: fix updating the access point strength
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: network-indicator
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-04-01 13:50 UTC by Giovanni Campagna
Modified: 2011-04-11 14:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
NetworkMenu: fix updating the access point strength (1.05 KB, patch)
2011-04-01 13:50 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2011-04-01 13:50:08 UTC
See patch...
Comment 1 Giovanni Campagna 2011-04-01 13:50:40 UTC
Created attachment 184874 [details] [review]
NetworkMenu: fix updating the access point strength

A notify signal does not include the new value of the property in
its signature, so the handler was trying to compare a GParamSpec with
a number when updating. Fix it to always retrieve the value from the
object.
Comment 2 Dan Winship 2011-04-01 15:18:02 UTC
Comment on attachment 184874 [details] [review]
NetworkMenu: fix updating the access point strength

looks good, but it looks like NMApplet._notifyActiveConnection() has the same problem
Comment 3 Owen Taylor 2011-04-01 21:56:49 UTC
What's the impact of this on users?
Comment 4 Dan Winship 2011-04-02 11:31:12 UTC
Actually, the impact is pretty small; the top bar icon updates correctly, so this only affects the icons in the menu itself. And the menu gets rebuilt any time a new wireless network appears, or any time the wifi device changes state, so a lot of times the icon in the menu will be correct anyway. So it's 3.0.1-able.

(The other issue I mentioned is also not a problem, because most of the code in that callback is ignored because it would duplicate stuff nm-applet is already doing.)
Comment 5 Giovanni Campagna 2011-04-02 17:27:55 UTC
(In reply to comment #4)
> Actually, the impact is pretty small; the top bar icon updates correctly, so
> this only affects the icons in the menu itself. And the menu gets rebuilt any
> time a new wireless network appears, or any time the wifi device changes state,
> so a lot of times the icon in the menu will be correct anyway. So it's
> 3.0.1-able.

The impact is even less: the bug exists only if you have more than one AP for the same network (SSID), in which case it fails to find the best one. But I still don't see strength updates at home (where I have just one AP), so the bug is somewhere else.

> (The other issue I mentioned is also not a problem, because most of the code in
> that callback is ignored because it would duplicate stuff nm-applet is already
> doing.)

_notifyActiveConnection looks right to me, active is the NMActiveConnection object that is emitting the signal.
Comment 6 Dan Winship 2011-04-06 19:13:54 UTC
Comment on attachment 184874 [details] [review]
NetworkMenu: fix updating the access point strength

(updating status since I was wrong about _notifyActiveConnection needing to be changed)
Comment 7 Dan Winship 2011-04-11 14:44:22 UTC
Attachment 184874 [details] pushed as 3c3ea2f - NetworkMenu: fix updating the access point strength