From 84e349f943c9c3734a567745ac04db0937192b27 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 26 Aug 2023 17:29:24 +0100 Subject: [PATCH] fixes regressoin in event bindings --- src/nvda_voicemeeter/builder.py | 6 +++--- src/nvda_voicemeeter/window.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/nvda_voicemeeter/builder.py b/src/nvda_voicemeeter/builder.py index 29590b7..a6389b7 100644 --- a/src/nvda_voicemeeter/builder.py +++ b/src/nvda_voicemeeter/builder.py @@ -35,9 +35,9 @@ class Builder: for step in steps: layout2.append([step()]) - tab1 = psg.Tab("settings", layout0, key="settings") - tab2 = psg.Tab("physical strips", layout1, key="physical strip") - tab3 = psg.Tab("virtual strips", layout2, key="virtual strip") + tab1 = psg.Tab("Settings", layout0, key="settings") + tab2 = psg.Tab("Physical Strips", layout1, key="physical strip") + tab3 = psg.Tab("Virtual Strips", layout2, key="virtual strip") tab_group = psg.TabGroup([[tab1, tab2, tab3]], change_submits=True, key="tabs") return [[tab_group]] diff --git a/src/nvda_voicemeeter/window.py b/src/nvda_voicemeeter/window.py index 75dd903..65668b5 100644 --- a/src/nvda_voicemeeter/window.py +++ b/src/nvda_voicemeeter/window.py @@ -65,7 +65,7 @@ class NVDAVMWindow(psg.Window): # Patch Insert if self.kind.name != "basic": for i in range(self.kind.num_strip): - if i <= self.kind.phys_in: + if i < self.kind.phys_in: self[f"INSERT CHECKBOX||IN{i + 1} 0"].bind("", "||FOCUS IN") self[f"INSERT CHECKBOX||IN{i + 1} 1"].bind("", "||FOCUS IN") else: @@ -174,6 +174,7 @@ class NVDAVMWindow(psg.Window): val = not self.cache["outputs"][f"STRIP {index}||{output}"] setattr(self.vm.strip[int(index)], output, val) self.cache["outputs"][f"STRIP {index}||{output}"] = val + self.nvda.speak(f"STRIP {index} {output} {label if label else ''} {'on' if val else 'off'}") case [["STRIP", index], [output], ["FOCUS", "IN"]]: val = self.cache["outputs"][f"STRIP {index}||{output}"] label = self.vm.strip[int(index)].label