Settings: Connect to Switch.notify-active instead of to activate

As per the documentation of the activate signal "Applications should never connect to this signal, but use the notify:active signal."
https://valadoc.org/gtk+-3.0/Gtk.Switch.activate.html
This commit is contained in:
fiaxh 2023-02-09 11:19:38 +01:00
parent 430a8df4f6
commit 634302217c
1 changed files with 5 additions and 5 deletions

View File

@ -22,11 +22,11 @@ class SettingsDialog : Adw.PreferencesWindow {
emoji_switch.active = settings.convert_utf8_smileys;
check_spelling_switch.active = settings.check_spelling;
typing_switch.activate.connect(() => { settings.send_typing = typing_switch.active; } );
marker_switch.activate.connect(() => { settings.send_marker = marker_switch.active; } );
notification_switch.activate.connect(() => { settings.notifications = notification_switch.active; } );
emoji_switch.activate.connect(() => { settings.convert_utf8_smileys = emoji_switch.active; });
check_spelling_switch.activate.connect(() => { settings.check_spelling = check_spelling_switch.active; });
typing_switch.notify["active"].connect(() => { settings.send_typing = typing_switch.active; } );
marker_switch.notify["active"].connect(() => { settings.send_marker = marker_switch.active; } );
notification_switch.notify["active"].connect(() => { settings.notifications = notification_switch.active; } );
emoji_switch.notify["active"].connect(() => { settings.convert_utf8_smileys = emoji_switch.active; });
check_spelling_switch.notify["active"].connect(() => { settings.check_spelling = check_spelling_switch.active; });
}
}