Add global Wine preferences tab
Phase 3 of the Wine/Proton stage (decisions 6, 9, 13, 19 in docs/testing/wine-proton.md): a global-only Wine tab modeled on the Pronunciation page, with the controller-only checkbox and a typed editable program list. Wine values flow through the preferences protocol so a global Apply reaches the live Wine settings from Phase 2 with no reader restart. Entries are validated as edited and named in-tab, blocking Apply until fixed; case-insensitive duplicates collapse. Per-application preferences expose no Wine editing and an app-scoped Apply cannot change the governing list.
This commit is contained in:
1 parent
dc6a961032
commit
75f34ea767
15 files changed
+543
-5
No files matched your search
@@ -34,6 +34,14 @@ func (worker *preferencesWorker) apply(ctx context.Context, request preferences.
|
||||
if worker.editingActive {
|
||||
base = worker.editing
|
||||
}
|
||||
if worker.editingActive && worker.editApp != "" {
|
||||
// Wine settings are global-only and the Wine tab is absent from
|
||||
// application preferences, so an application-scoped Apply never
|
||||
// edits them: the base values pass through unchanged and only a
|
||||
// global Apply can republish the governing Wine list.
|
||||
request.Values.Wine = config.WineSettings{ControllerOnly: base.Wine.ControllerOnly,
|
||||
ExcludedPrograms: append([]string(nil), base.Wine.ExcludedPrograms...)}
|
||||
}
|
||||
next, err := request.Values.Merge(base)
|
||||
if err != nil {
|
||||
return worker.response("Settings were not applied: "+err.Error(), false)
|
||||
|
||||
Reference in new issue
Block a user