[gnome-control-center] wifi: Disable periodic scan only when Wi-Fi is disabled
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] wifi: Disable periodic scan only when Wi-Fi is disabled
- Date: Wed, 24 Oct 2018 04:48:00 +0000 (UTC)
commit a0998bbb03d3fc5c133652435ce72ad3ca0869d4
Author: Jonathan Kang <jonathankang gnome org>
Date: Tue Oct 23 14:56:09 2018 +0800
wifi: Disable periodic scan only when Wi-Fi is disabled
The periodic Wi-Fi scan is introduced in 84279c4a. It's designed to
scan the Wi-Fi list every 15 seconds and disable the scan when Wi-Fi is
disabled.
But currently the periodic check is disabled every time
wireless_enabled_toggled() is called, which is wrong. Because it can
mean Wi-Fi is enabled or disabled.
Fix that by disabling periodic scan only when Wi-Fi is disabled.
fixes 84279c4a
panels/network/net-device-wifi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index 3d3a54d80..4290ac79a 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -342,7 +342,8 @@ wireless_enabled_toggled (NMClient *client,
device_wifi->priv->updating_device = TRUE;
gtk_switch_set_active (sw, enabled);
- disable_scan_timeout (device_wifi);
+ if (!enabled)
+ disable_scan_timeout (device_wifi);
device_wifi->priv->updating_device = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]