Preferences tab added for the internal UI.

This commit is contained in:
Storm Dragon committed 2026-10-29 02:46:41 -04:00
1 parent cf95b17e5d
commit 6fc3416a1b
27 files changed
+858 -434

No files matched your search

+9
View File
@@ -48,6 +48,7 @@ type internalUI struct {
discoverChoices func(config.Settings) preferences.Discovery
changed func(*interaction.Session)
onClosed func()
gridSettings func() config.InternalUI
previewSpelling func(config.Reading)
speechOverride *config.Speech
testSpeech func(context.Context, config.Speech, config.Speech) error
@@ -153,6 +154,13 @@ func (ui *internalUI) update(update uiUpdate) {
}
}
func (ui *internalUI) configure_session(session *interaction.Session) {
if ui.gridSettings != nil {
settings := ui.gridSettings()
session.Configure_grid(settings.AnnounceGridCoordinates, settings.AnnounceItemPosition)
}
}
func (ui *internalUI) handle(key interaction.Key) {
if key.Name == "escape" {
ui.close()
@@ -161,6 +169,7 @@ func (ui *internalUI) handle(key interaction.Key) {
if ui.session == nil {
return
} // Loading or saving still owns every key.
ui.configure_session(ui.session)
result := ui.session.Handle(key)
if ui.changed != nil {
ui.changed(ui.session)