Initial support for application specific overrides.

This commit is contained in:
Storm Dragon committed 2026-10-28 03:31:33 -04:00
1 parent 901fd58ba8
commit b45f800489
37 files changed
+3909 -475

No files matched your search

+12
View File
@@ -147,6 +147,10 @@ func (a *application) open_settings() {
}
func (a *application) save_settings() {
if a.saves_unavailable() {
a.voice.Say(i18n.T("Save unavailable."))
return
}
if a.speechPending {
a.voice.Say(i18n.T("Failed to save settings."))
return
@@ -160,6 +164,10 @@ func (a *application) save_settings() {
// presentation belongs to the modal generation; a committed write belongs to
// the application even after Escape or a session handoff closes its form.
func (a *application) save_menu_settings(doc *config.Document, draft config.Settings, done func(error)) bool {
if a.saves_unavailable() {
a.voice.Say(i18n.T("Save unavailable."))
return false
}
if a.speechPending {
a.ui.failed("Could not save settings: {0}", fmt.Errorf("speech selection in progress"))
return false
@@ -248,6 +256,10 @@ func (a *application) apply_remote_settings(text string) string {
if updated.Presentation.Speech.Enabled && !a.settings.speechAvailable {
return "Speech was disabled at startup; enable it in settings and relaunch"
}
if a.overrideCurrent != nil {
a.apply_remote_state(updated, false)
return ""
}
// Apply only the requested assignments to the persistence
// draft, retaining unrelated next-launch menu settings.
draftBase := a.settings.saveDraft