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 650007 - Signal strength icon is different between the indicator and the menu
Signal strength icon is different between the indicator and the menu
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: network-indicator
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-05-12 05:53 UTC by Elad Alfassa
Modified: 2011-11-04 09:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (369.07 KB, image/png)
2011-05-12 05:53 UTC, Elad Alfassa
  Details
NetworkMenu: fix logic for updating wifi icon (3.09 KB, patch)
2011-10-29 12:47 UTC, Giovanni Campagna
reviewed Details | Review
NetworkMenu: fix logic for updating wifi icon (2.53 KB, patch)
2011-11-03 12:23 UTC, Giovanni Campagna
committed Details | Review

Description Elad Alfassa 2011-05-12 05:53:34 UTC
Created attachment 187673 [details]
Screenshot

The menu shows a different (stronger) signal strength, and it's not clear which is the correct one.
Comment 1 Giovanni Campagna 2011-05-12 14:59:48 UTC
Given that the code for converting the strength to the icon is the same in both cases, I guess that something was not updated. Do you see anything strange in .xsession-errors?
Comment 2 Elad Alfassa 2011-05-12 17:03:05 UTC
Nothing relevant in there.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 3 Cosimo Cecchi 2011-10-24 23:53:48 UTC
Still happening in 3.2.1.
Comment 4 Giovanni Campagna 2011-10-29 10:39:21 UTC
(In reply to comment #3)
> Still happening in 3.2.1.

I believe it is because notify::strength is not emitted reliably by libnm-glib (and we update the icons at different times in the indicator and in the menu).
I've added some logging to my local copy, let's see what turns out.
Comment 5 Giovanni Campagna 2011-10-29 12:47:10 UTC
Created attachment 200248 [details] [review]
NetworkMenu: fix logic for updating wifi icon

Previously, we connected to notify::strength only if there was
already a signal connected, and the AP changed (thus, by induction,
we never connected). As a result, the icon became stale and different
from that shown inside the menu (which is correctly updated).
Comment 6 Jasper St. Pierre (not reading bugmail) 2011-10-29 14:30:44 UTC
Review of attachment 200248 [details] [review]:

Can connecting to the same AP twice in a row happen? If yes, I'd like to see my review comments addressed. If no, treat this as ACN.

::: js/ui/status/network.js
@@ +2066,3 @@
                         this.setIcon('network-wireless-connected');
                     } else {
+                        if (this._accessPointUpdateId)

This is still inefficient for connecting to the same AP twice. How about:

if (this._activeAccessPoint != ap) {
    if (this._accessPointUpdateId > 0)
        this._activeAccessPoint.disconnect(this._accessPointUpdateId;
    this._activeAccessPoint = ap;
    this._activeAccessPointUpdateId = ap.connect(...);
}

@@ +2095,3 @@
                 }
 
+                if (this._mobileUpdateId)

Same for down here.
Comment 7 Giovanni Campagna 2011-11-03 12:23:19 UTC
Created attachment 200585 [details] [review]
NetworkMenu: fix logic for updating wifi icon

Previously, we connected to notify::strength only if there was
already a signal connected, and the AP changed (thus, by induction,
we never connected). As a result, the icon became stale and different
from that shown inside the menu (which is correctly updated).

---

Yes, _updateIcon can be called multiple time even if the primary
connection is the same, so what you proposed is a real performance improvement.
Comment 8 Jasper St. Pierre (not reading bugmail) 2011-11-03 19:14:27 UTC
Review of attachment 200585 [details] [review]:

LGTM.
Comment 9 Giovanni Campagna 2011-11-04 09:20:29 UTC
Attachment 200585 [details] pushed as d7d5da0 - NetworkMenu: fix logic for updating wifi icon