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 774848 - [review] Request WiFi scans when UI is shown [bg/menu-wifi-scan-bgo774848]
[review] Request WiFi scans when UI is shown [bg/menu-wifi-scan-bgo774848]
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nm-applet
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
: 766428 (view as bug list)
Depends on:
Blocks: nm-review 778152
 
 
Reported: 2016-11-22 17:02 UTC by Dan Williams
Modified: 2017-04-05 12:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Williams 2016-11-22 17:02:53 UTC
When https://bugzilla.gnome.org/show_bug.cgi?id=766482 gets merged, NM will no longer periodically scan while connected, and without explicit requests from clients like nm-applet the AP list will drop down to a single AP (the connected one).

The applet never requests an explicit scan, and thus it will never get its menu updated with new APs while connected.  Following GNOME Shell and KDE updates, the applet should explicitly request a scan when relevant WiFi UI is being shown.

Three options come to mind:

1) request a scan when the menu is pulled down.  The next time the user drops the menu down, the new scan results will be shown.  This is pretty awful interaction though, and will train users to keep checking the menu every few seconds until the results come in.

2) modify the menu to dynamically update the list of APs while it is displayed, and request a scan when the menu is shown.  This is what Mac OS X does for the Airport menu and seems to work OK there.  However, this will require a much larger reorganization of applet code to be able to change the menu dynamically, inserting and deleting combined AP objects as necessary.  The menu is currently rebuilt and destroyed each time it is displayed.  I'm also not sure if this works correctly with App Indicators.

3) switch the applet to a dialog-based wifi network UI like GNOME Shell, where instead of showing the APs in the menu itself, you choose "Select network..." menu item that closes the menu and displays a dialog of WiFi networks, in which it would be very easy to request scans and update dynamically.
Comment 1 Beniamino Galvani 2017-01-09 10:14:23 UTC
(In reply to Dan Williams from comment #0)

> 2) modify the menu to dynamically update the list of APs while it is
> displayed, and request a scan when the menu is shown.  This is what Mac OS X
> does for the Airport menu and seems to work OK there.  However, this will
> require a much larger reorganization of applet code to be able to change the
> menu dynamically, inserting and deleting combined AP objects as necessary. 
> The menu is currently rebuilt and destroyed each time it is displayed.  I'm
> also not sure if this works correctly with App Indicators.

I tried to implement this in branch bg/menu-wifi-scan-bgo774848 and it
seems to work fine also with AppIndicators. To simplify the
implementation, the whole menu is always rebuilt every time the AP
list changes; probably this can be improved.
Comment 2 Thomas Haller 2017-01-09 14:32:20 UTC
lgtm
Comment 3 Beniamino Galvani 2017-04-04 13:39:07 UTC
*** Bug 766428 has been marked as a duplicate of this bug. ***
Comment 4 Lubomir Rintel 2017-04-04 14:55:42 UTC
LGTM, tested