From 5418ba6bc5c653b6a99572c6ece6abbf57836c43 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Thu, 17 Sep 2026 00:51:15 +0200 Subject: gui: coloured actions with headers, a filter over the plan, bulk trash or delete --- gui/internal/ui/forms.go | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'gui/internal/ui/forms.go') diff --git a/gui/internal/ui/forms.go b/gui/internal/ui/forms.go index 6fcf973..8e1fd33 100644 --- a/gui/internal/ui/forms.go +++ b/gui/internal/ui/forms.go @@ -298,6 +298,23 @@ var settingChoices = map[string][]string{ "on-conflict": {"", "suffix", "skip", "overwrite"}, } +// settingHelp is what each setting does, shown when the pointer rests on +// its row (his request, 2026-09-17). The wording follows krino.conf(5). +var settingHelp = map[string]string{ + "path": "the directory krino sorts; a directory's file must set it", + "recursive": "look in subdirectories too, not only the directory itself", + "max-depth": "how deep to look when recursive: 1 is the directory itself", + "min-age": "leave a file alone until it has been untouched this long - protection against sorting a download still being written", + "max-read": "the largest file whose text is read for (content ...) tests; 0 reads every size", + "max-size": "skip a file larger than this entirely", + "busy": "endings that mean a file is still being written, such as \".part\"; those files are left alone", + "case": "whether name and path patterns tell capitals apart: ignore (the default) or strict", + "fold": "whether a pattern without accents matches a name with them, so \"zazolc\" finds \"zażółć\"", + "on-conflict": "what to do when the destination is taken: suffix (name-1), skip, or overwrite", + "ignore": "gitignore patterns for files krino never looks at, such as \"*.part\" and \".*\"", + "log": "where every run is written; krino undo reads it", +} + // settingHints is the example shown in an empty field. var settingHints = map[string]string{ "path": `"~/downloads"`, @@ -315,6 +332,9 @@ func newSettingRow(head, args string, changed func()) *settingRow { label := gtk.NewLabel(head) label.SetXAlign(0) label.SetSizeRequest(110, -1) + help := settingHelp[head] + label.SetTooltipText(help) + r.root.SetTooltipText(help) r.root.Append(label) if items, ok := settingChoices[head]; ok { r.items = items @@ -326,6 +346,7 @@ func newSettingRow(head, args string, changed func()) *settingRow { if indexOf(items, args) < 0 { r.drop.SetSelected(0) } + r.drop.SetTooltipText(help) r.drop.Connect("notify::selected", func() { changed() }) r.root.Append(r.drop) return r @@ -334,7 +355,11 @@ func newSettingRow(head, args string, changed func()) *settingRow { r.entry.SetText(args) r.entry.SetHExpand(true) r.entry.SetPlaceholderText(mainHint(head)) - r.entry.SetTooltipText(mainHint(head)) + if help != "" { + r.entry.SetTooltipText(help + "\n\nfor example: " + mainHint(head)) + } else { + r.entry.SetTooltipText(mainHint(head)) + } r.entry.ConnectChanged(func() { changed() }) r.root.Append(r.entry) return r -- cgit v1.3