From 634302217ce21e6c8d15b003542ec28f3330e11e Mon Sep 17 00:00:00 2001 From: fiaxh Date: Thu, 9 Feb 2023 11:19:38 +0100 Subject: 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 --- main/src/ui/settings_dialog.vala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'main') diff --git a/main/src/ui/settings_dialog.vala b/main/src/ui/settings_dialog.vala index 5dc338bc..068cc894 100644 --- a/main/src/ui/settings_dialog.vala +++ b/main/src/ui/settings_dialog.vala @@ -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; }); } } -- cgit v1.2.3-70-g09d2