GNOME Bugzilla – Bug 774848
[review] Request WiFi scans when UI is shown [bg/menu-wifi-scan-bgo774848]
Last modified: 2017-04-05 12:28:48 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.
(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.
lgtm
*** Bug 766428 has been marked as a duplicate of this bug. ***
LGTM, tested
Merged: https://git.gnome.org/browse/network-manager-applet/commit/?id=397d5541c0a0d785ab56891b131e2ceb6fe6a643