diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-17 09:03:43 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-17 09:03:43 +0200 |
| commit | 80dde7b2cae7b9844c244e03395145370a819412 (patch) | |
| tree | f0e79ea9a655e715d9d2bf41799f695d88df80b4 /gui/internal/ui/settings.go | |
| parent | 1e3dd67868e1b6d3c12f0bca201d5e60a12c3723 (diff) | |
| download | krino-80dde7b2cae7b9844c244e03395145370a819412.tar.gz krino-80dde7b2cae7b9844c244e03395145370a819412.zip | |
gui: an applied plan says it is history; Settings says what needs saving
Diffstat (limited to 'gui/internal/ui/settings.go')
| -rw-r--r-- | gui/internal/ui/settings.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gui/internal/ui/settings.go b/gui/internal/ui/settings.go index e90c691..10f4bab 100644 --- a/gui/internal/ui/settings.go +++ b/gui/internal/ui/settings.go @@ -67,6 +67,11 @@ func (w *Window) showSettings() { box.Append(s.check) box.Append(heading("This window")) + kept := gtk.NewLabel("These are kept as you change them; the button below writes krino.conf, and is only lit when something above has changed.") + kept.SetXAlign(0) + kept.SetWrap(true) + kept.AddCSSClass("dim-label") + box.Append(kept) prefs := w.prefs colours := gtk.NewCheckButtonWithLabel("colour the configuration in the Text tab") colours.SetActive(prefs.Colours) @@ -122,6 +127,7 @@ func (w *Window) showSettings() { s.save = gtk.NewButtonWithLabel("Save krino.conf") s.save.AddCSSClass("suggested-action") s.save.SetSensitive(false) + s.save.SetTooltipText("nothing to save: the defaults above are as krino.conf has them. The window settings below need no saving - they are kept as you change them.") s.save.ConnectClicked(s.onSave) closeBtn := gtk.NewButtonWithLabel("Close") closeBtn.ConnectClicked(func() { s.win.Close() }) @@ -171,7 +177,11 @@ func (s *settingsWindow) armSave() { switch { case len(diags) == 0: s.check.SetText("") - s.save.SetSensitive(s.toSave && s.main.Modified()) + canSave := s.toSave && s.main.Modified() + s.save.SetSensitive(canSave) + if canSave { + s.save.SetTooltipText("write krino.conf, keeping the previous text as krino.conf.bak") + } default: s.check.SetText(escape(diags[0].Error())) s.check.AddCSSClass("error") |
