From 80dde7b2cae7b9844c244e03395145370a819412 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Thu, 17 Sep 2026 09:03:43 +0200 Subject: gui: an applied plan says it is history; Settings says what needs saving --- gui/internal/ui/settings.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gui/internal/ui/settings.go') 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") -- cgit v1.3