update default values for each driver type

open advanced settings popup if current tab is settings.

minor version bump
This commit is contained in:
onyx-and-iris 2023-09-13 12:16:28 +01:00
parent 245476adfd
commit bfdc0306e3
2 changed files with 17 additions and 5 deletions

View File

@ -1,6 +1,6 @@
[project] [project]
name = "nvda_voicemeeter" name = "nvda_voicemeeter"
version = "0.1.5" version = "0.2.0"
description = "A Voicemeeter app compatible with NVDA" description = "A Voicemeeter app compatible with NVDA"
authors = [ authors = [
{ name = "onyx-and-iris", email = "code@onyxandiris.online" }, { name = "onyx-and-iris", email = "code@onyxandiris.online" },

View File

@ -168,6 +168,7 @@ class NVDAVMWindow(psg.Window):
# Advanced Settings # Advanced Settings
if self.kind.name != "basic": if self.kind.name != "basic":
self["ADVANCED SETTINGS"].bind("<FocusIn>", "||FOCUS IN")
self["ADVANCED SETTINGS"].bind("<Return>", "||KEY ENTER") self["ADVANCED SETTINGS"].bind("<Return>", "||KEY ENTER")
# Strip Params # Strip Params
@ -297,8 +298,11 @@ class NVDAVMWindow(psg.Window):
] ]
return psg.Frame("BUFFERING", buffer) return psg.Frame("BUFFERING", buffer)
buffer_frame = _make_buffering_frame() layout = []
layout = [[buffer_frame], [psg.Button("Exit")]] steps = (_make_buffering_frame,)
for step in steps:
layout.append([step()])
layout.append([psg.Button("Exit", size=(8, 2))])
window = psg.Window(title, layout, finalize=True) window = psg.Window(title, layout, finalize=True)
buttonmenu_opts = {"takefocus": 1, "highlightthickness": 1} buttonmenu_opts = {"takefocus": 1, "highlightthickness": 1}
@ -318,7 +322,12 @@ class NVDAVMWindow(psg.Window):
match parsed_cmd := self.parser.match.parseString(event): match parsed_cmd := self.parser.match.parseString(event):
case ["BUFFER MME" | "BUFFER WDM" | "BUFFER KS" | "BUFFER ASIO"]: case ["BUFFER MME" | "BUFFER WDM" | "BUFFER KS" | "BUFFER ASIO"]:
if values[event] == "Default": if values[event] == "Default":
val = 0 if "MME" in event:
val = 1024
elif "WDM" in event or "KS" in event:
val = 512
else:
val = 0
else: else:
val = int(values[event]) val = int(values[event])
driver = event.split()[1] driver = event.split()[1]
@ -546,7 +555,10 @@ class NVDAVMWindow(psg.Window):
# Advanced Settings # Advanced Settings
case ["ADVANCED SETTINGS"] | ["CTRL-A"]: case ["ADVANCED SETTINGS"] | ["CTRL-A"]:
self.popup_advanced_settings(title="Advanced Settings") if values["tabs"] == "Settings":
self.popup_advanced_settings(title="Advanced Settings")
case [["ADVANCED", "SETTINGS"], ["FOCUS", "IN"]]:
self.nvda.speak("ADVANCED SETTINGS")
case [["ADVANCED", "SETTINGS"], ["KEY", "ENTER"]]: case [["ADVANCED", "SETTINGS"], ["KEY", "ENTER"]]:
self.find_element_with_focus().click() self.find_element_with_focus().click()