[gnome-calculator] math-preferences: Fix setting the switch state
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator] math-preferences: Fix setting the switch state
- Date: Thu, 25 Mar 2021 23:56:19 +0000 (UTC)
commit f8b6dffc117f900e2cca7d51338b169371bf3dcc
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri Mar 19 14:03:56 2021 +0100
math-preferences: Fix setting the switch state
The callback should return true to stop propagation and false otherwise.
Here we don't return anything, which is wrong and make the propagation
stop, which isn't what we want. This makes the callbacks correctly
propagate the set-state signal so the switchs can acquire the checked
state.
src/math-preferences.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/math-preferences.vala b/src/math-preferences.vala
index bc8704f2..7978624e 100644
--- a/src/math-preferences.vala
+++ b/src/math-preferences.vala
@@ -37,8 +37,8 @@ public class MathPreferencesDialog : Gtk.Dialog
settings = new Settings ("org.gnome.calculator");
spinbutton_decimals.value_changed.connect (() => { equation.accuracy =
spinbutton_decimals.get_value_as_int (); });
- switch_trailing_zeroes.state_set.connect ((state) => { equation.show_trailing_zeroes = state; });
- switch_thousands_separators.state_set.connect ((state) => { equation.show_thousands_separators =
state; });
+ switch_trailing_zeroes.state_set.connect ((state) => { equation.show_trailing_zeroes = state; return
false; });
+ switch_thousands_separators.state_set.connect ((state) => { equation.show_thousands_separators =
state; return false; });
combo_angle_units.changed.connect (combo_angle_units_changed_cb);
combo_word_size.changed.connect (combo_word_size_changed_cb);
combo_refresh_interval.changed.connect (combo_refresh_interval_changed_cb);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]