Report foobar2000 Advanced settings check and radio states
Native tree descriptions previously omitted state-image bits. As a result, foobar2000 Advanced Preferences read setting names without their boolean values, and changing a checkbox without moving focus could go unnoticed. Include TVIS_STATEIMAGEMASK in the native item key so polling observes state changes even when Wine omits WinEvents. Report checked and not-checked states for standard checkbox-tree images while preserving selected and expanded/collapsed states. All queries remain read-only and retain the existing target-architecture buffer layouts and bounded query behavior. Foobar2000 also uses image indexes 3 and 4 for radio choices in its Advanced settings tree. Expose those entries as radio buttons with the corresponding check state. Restrict this application-defined mapping to foobar2000.exe and its Preferences category/settings control identities. Leave unrelated state images uninterpreted rather than inventing mixed checkbox states. Extend the controls fixture with checkbox changes that emit no WinEvent, custom images, and foobar-style radio transitions. Add a foobar-controls runner mode using the application's basename. Exercise identical control IDs and images under an unrelated basename to guard against applying the compatibility mapping to other programs. Account for Wine initializing checkbox images when the fixture first appears. Document support and the manual Preferences acceptance procedure. Validation: - Controls and foobar-controls fixtures passed in both 64-bit and 32-bit. - All six CTests passed: foreground focus, MSAA states, text limits, 64/32-bit review capture, and hook safety. - Existing menu and editor integrations passed, including Unicode, selection/deletion feedback, password exclusion and read-only controls. - A private copy of foobar2000 2.26.1 exposed Advanced setting labels, numeric values, checkbox Space toggles and radio states, plus Components row names and version/module descriptions through the recording reader. - Installed the verified helper alongside the Cthulhu session-bus fix; the user subsequently confirmed that the live changes look good. Recorded events alone do not establish physical Braille acceptance. No foobar2000 settings were changed in the user's live installation.
This commit is contained in:
1 parent
24c35d7954
commit
0763498472
5 files changed
+161
-8
No files matched your search
@@ -20,7 +20,7 @@ parser.add_argument("--build-dir", default="build")
|
||||
parser.add_argument("--session", action="store_true")
|
||||
parser.add_argument("--reader", choices=("cthulhu", "orca"))
|
||||
parser.add_argument("--extension-endpoint", action="store_true")
|
||||
parser.add_argument("--fixture", choices=("menu", "edit", "hooks", "notepad", "list", "listbox", "delphi", "winforms", "controls", "scintilla", "goldwave", "bootstrapper"), default="menu")
|
||||
parser.add_argument("--fixture", choices=("menu", "edit", "hooks", "notepad", "list", "listbox", "delphi", "winforms", "controls", "foobar-controls", "scintilla", "goldwave", "bootstrapper"), default="menu")
|
||||
parser.add_argument("--notepadpp-exe", type=Path)
|
||||
parser.add_argument("--goldwave-exe", type=Path)
|
||||
parser.add_argument("--32-bit", dest="is32Bit", action="store_true")
|
||||
@@ -28,7 +28,7 @@ parser.add_argument("--late-helper", action="store_true")
|
||||
parser.add_argument("--restart-helper", action="store_true")
|
||||
add_test_options(parser)
|
||||
args = parser.parse_args()
|
||||
if args.is32Bit and args.fixture not in ("menu", "edit", "hooks", "winforms", "list", "listbox", "delphi", "controls", "bootstrapper"):
|
||||
if args.is32Bit and args.fixture not in ("menu", "edit", "hooks", "winforms", "list", "listbox", "delphi", "controls", "foobar-controls", "bootstrapper"):
|
||||
parser.error("32-bit checks currently require --fixture menu, edit, hooks, winforms, list, listbox, delphi, controls or bootstrapper")
|
||||
if (args.late_helper or args.restart_helper) and args.fixture not in ("edit", "winforms", "scintilla"):
|
||||
parser.error("helper lifecycle checks require --fixture edit, winforms or scintilla")
|
||||
@@ -103,9 +103,9 @@ with wine_test_directory(prefix="wine-access-menus-") as temporary:
|
||||
"x" * 1100000 + "\r\n" + "x" * 1022 + "😀tail").encode("utf-8"))
|
||||
env["WINE_ACCESS_NOTEPADPP_EXE"] = "Z:" + str(appDir / args.notepadpp_exe.name).replace("/", "\\")
|
||||
env["WINE_ACCESS_SCINTILLA_DOCUMENT"] = "Z:" + str(document).replace("/", "\\")
|
||||
fixture = Path(temporary) / "menu-fixture.exe"
|
||||
fixture = Path(temporary) / ("foobar2000.exe" if args.fixture == "foobar-controls" else "menu-fixture.exe")
|
||||
compiler = "i686-w64-mingw32-gcc" if args.is32Bit or args.fixture == "goldwave" else "x86_64-w64-mingw32-gcc"
|
||||
sourceName = "edit" if args.fixture == "winforms" else args.fixture
|
||||
sourceName = "edit" if args.fixture == "winforms" else "controls" if args.fixture == "foobar-controls" else args.fixture
|
||||
if args.fixture == "delphi":
|
||||
sourceName = "list"
|
||||
isBootstrapper = args.fixture == "bootstrapper"
|
||||
@@ -219,7 +219,7 @@ with wine_test_directory(prefix="wine-access-menus-") as temporary:
|
||||
assert len(values) >= 3 and len(set(values)) >= 2, f"GoldWave combo arrow feedback missing: {values!r}"
|
||||
print("PASS: actual 32-bit GoldWave menus and file-type combo arrows without tabbing away")
|
||||
sys.exit(0)
|
||||
if args.fixture == "controls":
|
||||
if args.fixture in ("controls", "foobar-controls"):
|
||||
for event in events:
|
||||
print(event[1:9])
|
||||
for caption in ("Albums & artists β", "Details", "Default Playlist", "Second Playlist"):
|
||||
@@ -246,6 +246,28 @@ with wine_test_directory(prefix="wine-access-menus-") as temporary:
|
||||
for e in events), "empty tabs retained stale caption"
|
||||
assert any(e[2] == "" and e[3] == "tree" for e in events), "empty tree retained stale item"
|
||||
assert not any(e[2] == "Tree1" for e in events), "generic tree name leaked"
|
||||
for state in ("not checked", "checked"):
|
||||
assert any(e[2] == "Enable playback β" and state in e[5].split(", ")
|
||||
for e in events), f"settings tree checkbox state missing: {state}"
|
||||
assert any(e[2] == "Enable playback β" and e[1] == "selection"
|
||||
and "checked" in e[5].split(", ") for e in events), "tree toggle without focus change missing"
|
||||
statusEvents = [e for e in events if e[2] in ("Status image", "Custom checkbox icon")
|
||||
and e[3] == "tree item"]
|
||||
assert {e[2] for e in statusEvents} == {"Status image", "Custom checkbox icon"}, "custom state images missing"
|
||||
assert statusEvents, "non-checkbox state-image tree missing"
|
||||
assert all(not any(state in e[5].split(", ") for state in
|
||||
("checked", "not checked", "half checked"))
|
||||
for e in statusEvents), "unrelated state image announced as checkbox"
|
||||
radioEvents = [e for e in events if e[2] == "Radio option"]
|
||||
assert radioEvents, "radio-image tree missing"
|
||||
if args.fixture == "foobar-controls":
|
||||
for state in ("not checked", "checked"):
|
||||
assert any(e[3] == "radio button" and state in e[5].split(", ")
|
||||
for e in radioEvents), f"foobar radio state missing: {state}"
|
||||
else:
|
||||
assert all(e[3] == "tree item" and not any(state in e[5].split(", ")
|
||||
for state in ("checked", "not checked", "half checked"))
|
||||
for e in radioEvents), "foobar mapping affected another application"
|
||||
print("PASS: native/ATL tabs, tree selection/states/return, named button, combo and edit labels, empty controls")
|
||||
sys.exit(0)
|
||||
if args.fixture == "delphi":
|
||||
|
||||
Reference in new issue
Block a user