network: Replace deprecated nm_client_wireless_set_enabled

This commit is contained in:
Robert Ancell 2022-05-31 15:44:42 +12:00 committed by Robert Ancell
parent 6911110111
commit 4159a5ca68

View file

@ -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);