From e4d543732bb92fa8887c75bd0117a719ca82c89a Mon Sep 17 00:00:00 2001 From: Ken Sanislo Date: Wed, 13 May 2026 21:24:48 -0700 Subject: [PATCH] config_panel: don't show failed-write alert for unreadable settings Write-only HeteroKey settings (e.g. 0x8071 zone effects) legitimately return None on first read. Gate null_okay on validator.readable so genuine read failures on readable settings still surface; drop the unconditional alert in HeteroKeyControl.set_value(None). --- lib/solaar/ui/config_panel.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/solaar/ui/config_panel.py b/lib/solaar/ui/config_panel.py index e7e2c61b..ea82314a 100644 --- a/lib/solaar/ui/config_panel.py +++ b/lib/solaar/ui/config_panel.py @@ -57,7 +57,8 @@ def _read_async(setting, force_read, sbox, device_is_online, sensitive): except Exception as e: v = None logger.warning("%s: error reading so use None (%s): %s", s.name, s._device, repr(e)) - GLib.idle_add(_update_setting_item, sb, v, online, sensitive, True, priority=99) + null_okay = not getattr(getattr(s, "_validator", None), "readable", True) + GLib.idle_add(_update_setting_item, sb, v, online, sensitive, null_okay, priority=99) ui_async(_do_read, setting, force_read, sbox, device_is_online, sensitive) @@ -722,8 +723,6 @@ class HeteroKeyControl(Gtk.HBox, Control): box.set_rgba(rgba) else: box.set_value(v) - else: - self.sbox._failed.set_visible(True) self.setup_visibles(id_) def setup_visibles(self, id_):