fix: an application a device does not offer does not start either
Taking the launcher off the bar is half of a feature switch. The command has to refuse as well, or a device that does not offer an application can still be talked into running it by a stale desktop entry, a leftover window rule or a technician's muscle memory. Wonder Ink already did this. Parent Call now does the same, through the same helper and with the same default: absent means yes, so every existing room is unaffected. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
52301084a5
commit
a5c7d1d057
@@ -211,6 +211,19 @@ else:
|
||||
every and every["config"].get(
|
||||
"org.kde.plasma.icontasks.separateLaunchers") == "true")
|
||||
|
||||
print("7. a disabled application does not start either")
|
||||
# Taking the launcher off the bar is half of it. The command itself has
|
||||
# to refuse, so a device that does not offer an application cannot be
|
||||
# talked into running it by a stale desktop entry or a technician's
|
||||
# muscle memory.
|
||||
for script, setting in (("classroom-wonderink", "WONDERINK_ENABLED"),
|
||||
("classroom-parent-call", "PARENT_CALL_ENABLED")):
|
||||
text = (root / "scripts" / script).read_text()
|
||||
check(f"{script} refuses when {setting} is false",
|
||||
setting in text and "not starting" in text)
|
||||
check(f"{script} defaults to starting, so existing rooms are unaffected",
|
||||
'default=True' in text or 'feature(' in text)
|
||||
|
||||
print()
|
||||
print(f"{passed} passed, {failed} failed")
|
||||
raise SystemExit(1 if failed else 0)
|
||||
|
||||
Reference in New Issue
Block a user