sharing: Connect to the 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:
parent
b892e6ff15
commit
4cacdb3544
1 changed files with 5 additions and 5 deletions
|
@ -1063,9 +1063,9 @@ enable_gnome_remote_desktop (CcSharingPanel *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_remote_desktop_state_changed (GtkWidget *widget,
|
on_remote_desktop_active_changed (GtkWidget *widget,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
CcSharingPanel *self)
|
CcSharingPanel *self)
|
||||||
{
|
{
|
||||||
if (gtk_switch_get_active (GTK_SWITCH (widget)))
|
if (gtk_switch_get_active (GTK_SWITCH (widget)))
|
||||||
enable_gnome_remote_desktop (self);
|
enable_gnome_remote_desktop (self);
|
||||||
|
@ -1313,8 +1313,8 @@ cc_sharing_panel_setup_remote_desktop_dialog (CcSharingPanel *self)
|
||||||
"clicked", G_CALLBACK (on_password_copy_clicked),
|
"clicked", G_CALLBACK (on_password_copy_clicked),
|
||||||
self);
|
self);
|
||||||
|
|
||||||
g_signal_connect (self->remote_desktop_switch, "notify::state",
|
g_signal_connect (self->remote_desktop_switch, "notify::active",
|
||||||
G_CALLBACK (on_remote_desktop_state_changed), self);
|
G_CALLBACK (on_remote_desktop_active_changed), self);
|
||||||
|
|
||||||
if (is_remote_desktop_enabled (self))
|
if (is_remote_desktop_enabled (self))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue