aboutsummaryrefslogtreecommitdiff
path: root/gui/internal/ui/plan.go
diff options
context:
space:
mode:
Diffstat (limited to 'gui/internal/ui/plan.go')
-rw-r--r--gui/internal/ui/plan.go34
1 files changed, 15 insertions, 19 deletions
diff --git a/gui/internal/ui/plan.go b/gui/internal/ui/plan.go
index 650668c..bcbb8a2 100644
--- a/gui/internal/ui/plan.go
+++ b/gui/internal/ui/plan.go
@@ -97,7 +97,7 @@ func newPlanView(w *Window) *planView {
p.dirs.Connect("notify::selected", p.showPath)
p.scan = gtk.NewButtonWithLabel("Scan")
// The one button that starts everything, so it carries the theme's
- // accent like Apply does (his request, 2026-09-17).
+ // accent like Apply does.
p.scan.AddCSSClass("suggested-action")
p.scan.SetTooltipText("read the directory and work out what would happen to each file; nothing is touched until Apply")
p.selAll = gtk.NewButtonWithLabel("Select all")
@@ -120,13 +120,13 @@ func newPlanView(w *Window) *planView {
p.filter.SetSizeRequest(200, -1)
// The order the plan is read in. It starts as the settings say and can
- // be changed for this window alone (his request, 2026-09-17).
+ // be changed for this window alone.
p.sort = gtk.NewDropDownFromStrings(sortItems())
p.sort.SetTooltipText("the order the plan is listed in; Settings has the one a new window starts with")
// The bar reads as the order of operations: which directory, how it
// will be listed, what of it, where it is on disk - then Scan, and only
- // then what to do with what comes back (his request, 2026-09-17).
+ // then what to do with what comes back.
bar.Append(gtk.NewLabel("Directory"))
bar.Append(p.dirs)
bar.Append(gtk.NewLabel("sort"))
@@ -160,7 +160,7 @@ func newPlanView(w *Window) *planView {
// The explanation is laid out rather than printed: the file's name, then
// a line per step with the action in its own colour, centred in the
- // pane so the eye lands on it (his request, 2026-09-17).
+ // pane so the eye lands on it.
p.details = gtk.NewBox(gtk.OrientationVertical, 6)
p.details.SetHAlign(gtk.AlignCenter)
p.details.SetVAlign(gtk.AlignStart)
@@ -176,7 +176,7 @@ func newPlanView(w *Window) *planView {
// Under the explanation, a look at the file itself: a picture for an
// image, the first page for a PDF, the first lines for anything that is
- // text (his request, 2026-09-16).
+ // text.
p.previewNote = gtk.NewLabel("")
p.previewNote.SetXAlign(0)
p.previewNote.SetMarginStart(8)
@@ -186,7 +186,7 @@ func newPlanView(w *Window) *planView {
p.previewNote.AddCSSClass("dim-label")
// The picture fills whatever the divider leaves it. Inside a scrolled
// window it would be given its smallest size instead, which is what
- // made the page a stamp (his report, 2026-09-17).
+ // made the page a stamp.
p.picture = gtk.NewPicture()
p.picture.SetCanShrink(true)
p.picture.SetContentFit(gtk.ContentFitContain)
@@ -252,7 +252,7 @@ func newPlanView(w *Window) *planView {
}
// checkedMenu is "With checked": the same two overrides the row menu has,
-// for every file that is checked at once (his request, 2026-09-17).
+// for every file that is checked at once.
func (p *planView) checkedMenu() *gtk.MenuButton {
box := gtk.NewBox(gtk.OrientationVertical, 0)
trash := gtk.NewButtonWithLabel("Trash them instead")
@@ -603,7 +603,7 @@ func (p *planView) setBusy(busy bool) {
// selectAll checks or unchecks every file that can be applied - and, while
// a filter is on, only the files it leaves on screen, so what Apply acts on
-// is what was in front of him.
+// is what is visible.
func (p *planView) selectAll(on bool) {
if p.tab == nil {
return
@@ -670,8 +670,7 @@ func (p *planView) fillList() {
p.selNone.SetSensitive(!p.tab.Applied)
p.sayWhatIsShown()
// A fresh list starts at its left edge: without this the view can open
- // scrolled sideways, with the file names out of sight (his report,
- // 2026-09-17).
+ // scrolled sideways, with the file names out of sight.
if adj := p.listScroll.HAdjustment(); adj != nil {
adj.SetValue(0)
}
@@ -680,7 +679,7 @@ func (p *planView) fillList() {
// widths is how wide each column has to be for this plan: enough for the
// longest value it holds, within limits, so a rule name or an outcome is
// shown whole rather than cut to an ellipsis. The list scrolls sideways
-// when the total does not fit (his report, 2026-09-16).
+// when the total does not fit.
func (p *planView) widths() [7]int {
w := [7]int{16, 5, 4, 6, 16, 8, 6}
root := p.dirRoot()
@@ -701,7 +700,7 @@ func (p *planView) widths() [7]int {
w[i] = min(w[i], cap)
}
// A column is never narrower than its own heading, or the heading is
- // the thing that ends in an ellipsis (his report, 2026-09-17).
+ // the thing that ends in an ellipsis.
for i, title := range columnTitles {
w[i] = max(w[i], len([]rune(title)))
}
@@ -830,8 +829,7 @@ func (p *planView) rowWidget(i int, r model.Row, w [7]int) *gtk.ListBoxRow {
// ever the column cut to an ellipsis.
action, colour := rowAction(r)
// Every column can shrink: a pane narrower than their natural widths
- // used to push the whole row out of view to the left (his report,
- // 2026-09-17).
+ // used to push the whole row out of view to the left.
cells := [7]gtk.Widgetter{
colFile: columnMin(escape(r.Rel), w[colFile], 12, true),
colSize: columnMin(model.SizeText(r.Size), w[colSize], 4, false),
@@ -949,8 +947,7 @@ func (p *planView) showDetails(i int) {
p.details.Append(detailLine(what, "dim-label"))
}
// Where the other copy is, in full: the reason names it relative to the
- // directory when it is inside it, which reads as no place at all (his
- // report, 2026-09-17).
+ // directory when it is inside it, which reads as no place at all.
if r.DuplicateOf != "" {
p.details.Append(detailLine("the same bytes as "+escape(xdg.Abbrev(r.DuplicateOf)), "dim-label"))
}
@@ -1058,9 +1055,8 @@ func (p *planView) showPreview(rel string) {
}
// setLayout arranges the tab the way the settings ask: the file list beside
-// the explanation, or above it with the preview to its side (his sketch,
-// 2026-09-17). The widgets are the same either way; only the panes holding
-// them change.
+// the explanation, or above it with the preview to its side. The widgets
+// are the same either way; only the panes holding them change.
func (p *planView) setLayout(which string) {
if p.layout == which && p.arrangement != nil {
return