use self.kind

This commit is contained in:
onyx-and-iris 2023-09-29 01:16:48 +01:00
parent 912eb8c14d
commit 71b137a9c2
2 changed files with 6 additions and 6 deletions

View File

@ -197,7 +197,7 @@ class Builder:
"""tab0 row3 represents patch composite""" """tab0 row3 represents patch composite"""
def add_physical_device_opts(layout): 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( layout.append(
[ [
psg.ButtonMenu( psg.ButtonMenu(
@ -479,7 +479,7 @@ class Builder:
def add_strip_outputs(layout): def add_strip_outputs(layout):
params = ["MONO", "EQ", "MUTE"] params = ["MONO", "EQ", "MUTE"]
if self.vm.kind.name == "basic": if self.kind.name == "basic":
params.remove("EQ") params.remove("EQ")
busmodes = [util._bus_mode_map[mode] for mode in util.get_bus_modes(self.vm)] busmodes = [util._bus_mode_map[mode] for mode in util.get_bus_modes(self.vm)]
layout.append( layout.append(

View File

@ -180,17 +180,17 @@ class NVDAVMWindow(psg.Window):
self.bind(f"<Alt-Control-{event}-{direction}>", f"ALT CTRL {direction.upper()}||{event_id}") self.bind(f"<Alt-Control-{event}-{direction}>", f"ALT CTRL {direction.upper()}||{event_id}")
# Hardware In # 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("<FocusIn>", "||FOCUS IN") self[f"HARDWARE IN||{i + 1}"].bind("<FocusIn>", "||FOCUS IN")
self[f"HARDWARE IN||{i + 1}"].bind("<space>", "||KEY SPACE", propagate=False) self[f"HARDWARE IN||{i + 1}"].bind("<space>", "||KEY SPACE", propagate=False)
self[f"HARDWARE IN||{i + 1}"].bind("<Return>", "||KEY ENTER", propagate=False) self[f"HARDWARE IN||{i + 1}"].bind("<Return>", "||KEY ENTER", propagate=False)
# Hardware Out # 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("<FocusIn>", "||FOCUS IN") self[f"HARDWARE OUT||A{i + 1}"].bind("<FocusIn>", "||FOCUS IN")
self[f"HARDWARE OUT||A{i + 1}"].bind("<space>", "||KEY SPACE", propagate=False) self[f"HARDWARE OUT||A{i + 1}"].bind("<space>", "||KEY SPACE", propagate=False)
self[f"HARDWARE OUT||A{i + 1}"].bind("<Return>", "||KEY ENTER", propagate=False) self[f"HARDWARE OUT||A{i + 1}"].bind("<Return>", "||KEY ENTER", propagate=False)
if self.vm.kind.name == "basic": if self.kind.name == "basic":
self["HARDWARE OUT||A2"].bind("<FocusIn>", "||FOCUS IN") self["HARDWARE OUT||A2"].bind("<FocusIn>", "||FOCUS IN")
self["HARDWARE OUT||A2"].bind("<space>", "||KEY SPACE", propagate=False) self["HARDWARE OUT||A2"].bind("<space>", "||KEY SPACE", propagate=False)
self["HARDWARE OUT||A2"].bind("<Return>", "||KEY ENTER", propagate=False) self["HARDWARE OUT||A2"].bind("<Return>", "||KEY ENTER", propagate=False)
@ -262,7 +262,7 @@ class NVDAVMWindow(psg.Window):
# Bus Params # Bus Params
params = ["MONO", "EQ", "MUTE"] params = ["MONO", "EQ", "MUTE"]
if self.vm.kind.name == "basic": if self.kind.name == "basic":
params.remove("EQ") params.remove("EQ")
for i in range(self.kind.num_bus): for i in range(self.kind.num_bus):
for param in params: for param in params: