summaryrefslogtreecommitdiff
path: root/panels
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2022-05-31 15:44:42 +1200
committerRobert Ancell <robert.ancell@gmail.com>2022-06-20 02:29:39 +0000
commit4159a5ca6858e3d281a4fd29adb54eb633c195fc (patch)
tree2ff001ecf0b96dfb75821d972a0c33d8f9b661a7 /panels
parent6911110111a9bc820c1403e3a03367c868fca08b (diff)
downloadgnome-control-center-4159a5ca6858e3d281a4fd29adb54eb633c195fc.tar.gz
network: Replace deprecated nm_client_wireless_set_enabled
Diffstat (limited to 'panels')
-rw-r--r--panels/network/net-device-wifi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index 0a79016e9..3a92f324e 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -377,7 +377,13 @@ device_off_switch_changed_cb (NetDeviceWifi *self)
return;
active = gtk_switch_get_active (self->device_off_switch);
- nm_client_wireless_set_enabled (self->client, active);
+ nm_client_dbus_set_property (self->client,
+ NM_DBUS_PATH,
+ NM_DBUS_INTERFACE,
+ "WirelessEnabled",
+ g_variant_new_boolean (active),
+ -1,
+ NULL, NULL, NULL);
if (!active)
disable_scan_timeout (self);
gtk_widget_set_sensitive (GTK_WIDGET (self->connect_hidden_row), active);