From 71b137a9c223a3256fcdb2ebb9ecac2da2abf8c1 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Fri, 29 Sep 2023 01:16:48 +0100 Subject: [PATCH] use self.kind --- src/nvda_voicemeeter/builder.py | 4 ++-- src/nvda_voicemeeter/window.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nvda_voicemeeter/builder.py b/src/nvda_voicemeeter/builder.py index 87e50f6..2d012d5 100644 --- a/src/nvda_voicemeeter/builder.py +++ b/src/nvda_voicemeeter/builder.py @@ -197,7 +197,7 @@ class Builder: """tab0 row3 represents patch composite""" def add_physical_device_opts(layout): - outputs = util.get_patch_composite_list(self.vm.kind) + outputs = util.get_patch_composite_list(self.kind) layout.append( [ psg.ButtonMenu( @@ -479,7 +479,7 @@ class Builder: def add_strip_outputs(layout): params = ["MONO", "EQ", "MUTE"] - if self.vm.kind.name == "basic": + if self.kind.name == "basic": params.remove("EQ") busmodes = [util._bus_mode_map[mode] for mode in util.get_bus_modes(self.vm)] layout.append( diff --git a/src/nvda_voicemeeter/window.py b/src/nvda_voicemeeter/window.py index 9ee078a..0cd0b12 100644 --- a/src/nvda_voicemeeter/window.py +++ b/src/nvda_voicemeeter/window.py @@ -180,17 +180,17 @@ class NVDAVMWindow(psg.Window): self.bind(f"", f"ALT CTRL {direction.upper()}||{event_id}") # Hardware In - for i in range(self.vm.kind.phys_in): + for i in range(self.kind.phys_in): self[f"HARDWARE IN||{i + 1}"].bind("", "||FOCUS IN") self[f"HARDWARE IN||{i + 1}"].bind("", "||KEY SPACE", propagate=False) self[f"HARDWARE IN||{i + 1}"].bind("", "||KEY ENTER", propagate=False) # Hardware Out - for i in range(self.vm.kind.phys_out): + for i in range(self.kind.phys_out): self[f"HARDWARE OUT||A{i + 1}"].bind("", "||FOCUS IN") self[f"HARDWARE OUT||A{i + 1}"].bind("", "||KEY SPACE", propagate=False) self[f"HARDWARE OUT||A{i + 1}"].bind("", "||KEY ENTER", propagate=False) - if self.vm.kind.name == "basic": + if self.kind.name == "basic": self["HARDWARE OUT||A2"].bind("", "||FOCUS IN") self["HARDWARE OUT||A2"].bind("", "||KEY SPACE", propagate=False) self["HARDWARE OUT||A2"].bind("", "||KEY ENTER", propagate=False) @@ -262,7 +262,7 @@ class NVDAVMWindow(psg.Window): # Bus Params params = ["MONO", "EQ", "MUTE"] - if self.vm.kind.name == "basic": + if self.kind.name == "basic": params.remove("EQ") for i in range(self.kind.num_bus): for param in params: