Files
mousam/mousam-toggle-unit-settings-button.patch
Atri Bhattacharya a9af34a852 Accepting request 1276437 from home:badshah400:branches:GNOME:Apps
* Update to version 1.4.0.
* Add mousam-toggle-unit-settings-button.patch -- fix: use Gtk.ToggleButton.toggled for setting unit; upstream commit (gh#amit9838/mousam#179).

OBS-URL: https://build.opensuse.org/request/show/1276437
OBS-URL: https://build.opensuse.org/package/show/GNOME:Apps/mousam?expand=0&rev=5
2025-05-10 13:13:01 +00:00

34 lines
1.6 KiB
Diff

From 0ec1d98a02c2a10e8520e21e5002709905ac799c Mon Sep 17 00:00:00 2001
From: Phqen1x <Drew@vandine.org>
Date: Sat, 11 Jan 2025 05:28:57 -0500
Subject: [PATCH] fix: use Gtk.ToggleButton.toggled for setting unit, fixes
#179 (#194)
Co-authored-by: Drew VanDine <avandine23@gmail.com>
---
src/windowPreferences.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/windowPreferences.py b/src/windowPreferences.py
index efa519a..36abbec 100644
--- a/src/windowPreferences.py
+++ b/src/windowPreferences.py
@@ -88,7 +88,7 @@ def __init__(self, application, **kwargs):
self.metric_check_btn = Gtk.CheckButton.new()
self.metric_unit.add_prefix(self.metric_check_btn)
self.metric_unit.set_activatable_widget(self.metric_check_btn)
- self.metric_unit.connect("activated", self._change_unit,'metric')
+ self.metric_check_btn.connect("toggled", self._change_unit,'metric')
self.measurement_group.add(self.metric_unit)
self.imperial_unit = Adw.ActionRow.new()
@@ -98,7 +98,7 @@ def __init__(self, application, **kwargs):
self.imperial_unit.add_prefix(self.imperial_check_btn)
self.imperial_check_btn.set_group(self.metric_check_btn)
self.imperial_unit.set_activatable_widget(self.imperial_check_btn)
- self.imperial_unit.connect("activated", self._change_unit,'imperial')
+ self.imperial_check_btn.connect("toggled", self._change_unit,'imperial')
self.measurement_group.add(self.imperial_unit)
GLib.idle_add(self.metric_unit.activate) if settings.unit == 'metric' else GLib.idle_add(self.imperial_unit.activate)