sharing: Set active property instead of state

The ability to tweak the state property was mainly introduced in
order to implement delayed state change via the state-set signal.
Since GTK 4.9.3[1] the active and state properties are no more
interchangeable.

[1] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5442
This commit is contained in:
Alessandro Bono 2023-02-05 15:00:33 +01:00 committed by Georges Basile Stavracas Neto
parent 4cacdb3544
commit 9d2844e02f

View file

@ -334,7 +334,7 @@ cc_sharing_update_networks_box (CcSharingNetworks *self)
if (g_strcmp0 (net->uuid, current_network) == 0) {
g_signal_handlers_block_by_func (self->current_switch,
cc_sharing_networks_enable_network, self);
gtk_switch_set_state (GTK_SWITCH (self->current_switch), TRUE);
gtk_switch_set_active (GTK_SWITCH (self->current_switch), TRUE);
g_signal_handlers_unblock_by_func (self->current_switch,
cc_sharing_networks_enable_network, self);
continue;