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 786736 - WiFi enhancements for AP list
WiFi enhancements for AP list
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-24 08:57 UTC by Xiang Fan
Modified: 2018-01-21 15:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-wifi-update-the-list-when-signal-strength-changes.patch (2.57 KB, patch)
2017-08-24 08:57 UTC, Xiang Fan
none Details | Review
0002-wifi-add-a-scan-button.patch (26.23 KB, patch)
2017-08-24 08:58 UTC, Xiang Fan
none Details | Review
0001-wifi-update-the-list-when-AP-properties-change.patch (3.83 KB, patch)
2017-08-24 15:48 UTC, Xiang Fan
committed Details | Review
0002-network-wifi.ui-fix-indentation.patch (23.17 KB, patch)
2017-08-24 15:49 UTC, Xiang Fan
committed Details | Review
0003-wifi-add-a-scan-button.patch (3.86 KB, patch)
2017-08-24 15:49 UTC, Xiang Fan
none Details | Review

Description Xiang Fan 2017-08-24 08:57:30 UTC
Patches:

wifi: update the list when signal strength changes
The best AP can be chosen even if no AP is added/removed.

wifi: add a scan button
Manual scanning is useful when you want to discover new APs while
connected to another AP.
Comment 1 Xiang Fan 2017-08-24 08:57:55 UTC
Created attachment 358302 [details] [review]
0001-wifi-update-the-list-when-signal-strength-changes.patch
Comment 2 Xiang Fan 2017-08-24 08:58:19 UTC
Created attachment 358303 [details] [review]
0002-wifi-add-a-scan-button.patch
Comment 3 Rui Matos 2017-08-24 14:13:42 UTC
Review of attachment 358302 [details] [review]:

::: panels/network/net-device-wifi.c
@@ +274,3 @@
+        for (i = 0; i < aps->len; i++) {
+                ap = NM_ACCESS_POINT (g_ptr_array_index (aps, i));
+                g_signal_connect_object (ap, "notify",

this will notify us for things other strength. should be notify::strength

@@ +292,2 @@
         populate_ap_list (device_wifi);
+        nm_device_wifi_connect_access_points (nm_device_wifi, device_wifi);

this means we'll potentially add multiple signal connections to the same AP instance, overloading us with redundant notify signals emissions. we should only connect the AP instance that appeared here. note that, right now, this function is used both to handle APs being added as well as removed
Comment 4 Rui Matos 2017-08-24 14:16:22 UTC
Review of attachment 358303 [details] [review]:

this needs UI design. perhaps a better approach, and one that doesn't require UI changes, is to have a background timer that periodically asks for scans while the wifi panel is open.

also, doesn't NM scan all the time anyway? doesn't it have an API to request scans to be more frequent for a while?
Comment 5 Xiang Fan 2017-08-24 15:48:29 UTC
Created attachment 358358 [details] [review]
0001-wifi-update-the-list-when-AP-properties-change.patch
Comment 6 Xiang Fan 2017-08-24 15:49:17 UTC
Created attachment 358359 [details] [review]
0002-network-wifi.ui-fix-indentation.patch
Comment 7 Xiang Fan 2017-08-24 15:49:49 UTC
Created attachment 358360 [details] [review]
0003-wifi-add-a-scan-button.patch
Comment 8 Xiang Fan 2017-08-24 16:02:32 UTC
(In reply to Rui Matos from comment #3)
> Review of attachment 358302 [details] [review] [review]:
> 
> ::: panels/network/net-device-wifi.c
> @@ +274,3 @@
> +        for (i = 0; i < aps->len; i++) {
> +                ap = NM_ACCESS_POINT (g_ptr_array_index (aps, i));
> +                g_signal_connect_object (ap, "notify",
> 
> this will notify us for things other strength. should be notify::strength

I actually meant all the properties including security and others that could possibly appear in the future.

> @@ +292,2 @@
>          populate_ap_list (device_wifi);
> +        nm_device_wifi_connect_access_points (nm_device_wifi, device_wifi);
> 
> this means we'll potentially add multiple signal connections to the same AP
> instance, overloading us with redundant notify signals emissions. we should
> only connect the AP instance that appeared here. note that, right now, this
> function is used both to handle APs being added as well as removed

Fixed and separated add/remove.


(In reply to Rui Matos from comment #4)
> this needs UI design. perhaps a better approach, and one that doesn't
> require UI changes, is to have a background timer that periodically asks for
> scans while the wifi panel is open.
>
> also, doesn't NM scan all the time anyway? doesn't it have an API to request
> scans to be more frequent for a while?

Scanning doesn't have to be too frequent. The user can decide when they really need to re-scan (and that's what most other implementations do). Instead of wating for an unknown amount of time, I'd personally prefer to start scanning right away.
Comment 9 Xiang Fan 2017-08-25 12:57:02 UTC
(In reply to Rui Matos from comment #4)
> Review of attachment 358303 [details] [review] [review]:
> 
> this needs UI design.

And by this did you mean the UI in my patch needs improving? If so, what's the preferred UI layout?

Thanks for your comments.
Comment 10 Xiang Fan 2017-11-03 15:15:39 UTC
Comment on attachment 358360 [details] [review]
0003-wifi-add-a-scan-button.patch

Separating this patch into #789869 as the refresh button is not related with the rest of the patches.
Comment 11 Georges Basile Stavracas Neto 2018-01-21 15:02:39 UTC
Review of attachment 358358 [details] [review]:

Looks good to me (except a nit in the commit message that i'll fix)
Comment 12 Georges Basile Stavracas Neto 2018-01-21 15:03:04 UTC
Review of attachment 358359 [details] [review]:

Sure.
Comment 13 Georges Basile Stavracas Neto 2018-01-21 15:04:24 UTC
Thanks for the patches. I updated the commit message, and pushed.