aboutsummaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorfiaxh <fiaxh@users.noreply.github.com>2023-02-09 11:19:38 +0100
committerfiaxh <fiaxh@users.noreply.github.com>2023-02-09 11:36:33 +0100
commit634302217ce21e6c8d15b003542ec28f3330e11e (patch)
treefd49b2dd1071b4d2685d878b4e2bea0fb79ed75e /main/src
parent430a8df4f6722bb78f2babbdb2c82dcd9c840175 (diff)
downloaddino-634302217ce21e6c8d15b003542ec28f3330e11e.tar.gz
dino-634302217ce21e6c8d15b003542ec28f3330e11e.zip
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
Diffstat (limited to 'main/src')
-rw-r--r--main/src/ui/settings_dialog.vala10
1 files changed, 5 insertions, 5 deletions
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; });
}
}