docs: help, shortcuts, About and the two-tier status bar
Adds the four new features to README.md (About dialog, shortcut overview with Ctrl/Alt key table and deviation note, 14-page help window, two-tier status bar), adds the four new probes and six new invariants to CLAUDE.md, and fixes the `10.0 kS/s` rate-format error in src/help/14-status.txt (format_rate() uses %.3g, which prints `10 kS/s`). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
8242812338
commit
ccb4964182
3 files changed
+116
-2
No files matched your search
@@ -17,6 +17,11 @@ cmake --build build
|
||||
--multicast 239.1.2.3 --interface 10.0.0.9 # multicast
|
||||
```
|
||||
|
||||
**System dependency: libadwaita ≥ 1.8** (`pkg_check_modules(ADWAITA ... libadwaita-1>=1.8)`).
|
||||
It is used for exactly one widget — the shortcut overview is an `AdwShortcutsDialog` — because
|
||||
GTK4's own `GtkShortcutsWindow` is deprecated as of 4.18 and `AdwShortcutsDialog` is its
|
||||
replacement.
|
||||
|
||||
Options: `--server`, `--port`, `--multicast`, `--interface`, `--buffer-mb`
|
||||
(size of the sample buffer, default 200), `--max-window` (largest time
|
||||
window the toolbar offers, default 600), `--holdoff` (default trigger hold-off),
|
||||
@@ -1209,6 +1214,67 @@ on the live ring too. So exporting during a capture writes the partly filled win
|
||||
is on screen (`time` from `-pre` up to wherever the post side has reached), not the
|
||||
previous event.
|
||||
|
||||
**The About dialog** (overflow menu) reports the running binary's version, the git commit it was
|
||||
built from, the build timestamp, the settings directory and this session's layout file. Version,
|
||||
commit and timestamp come from `src/build_info.cpp`, generated by CMake at configure time and
|
||||
regenerated on every build — so the commit and the timestamp always belong to the binary that is
|
||||
running, and `git` absent leaves the commit as `"unknown"` without breaking the build.
|
||||
|
||||
**The shortcut overview** (toolbar **?** button, or Ctrl+?) lists all keyboard and mouse controls
|
||||
in two groups — application actions and plot controls — and is an `AdwShortcutsDialog` rather
|
||||
than GTK4's deprecated `GtkShortcutsWindow`. libadwaita ≥ 1.8 is therefore a hard dependency;
|
||||
`CLAUDE.md` records the one consequence worth knowing before editing (the stylesheet it installs
|
||||
reaches every widget). The full key table:
|
||||
|
||||
| key | action |
|
||||
|---|---|
|
||||
| `a` | arm / disarm the trigger |
|
||||
| `Space` | pause / resume |
|
||||
| `t` | show / hide the trigger panel |
|
||||
| `c` | show / hide cursors |
|
||||
| `m` | show / hide measurements |
|
||||
| `g` | show / hide math channels |
|
||||
| `l` | show / hide the layout editor |
|
||||
| `s` | show / hide the side panel |
|
||||
| `f` | fit to data |
|
||||
| `e` | export visible range |
|
||||
| `+` / `-` | zoom in / out (both axes) |
|
||||
| `Ctrl+` / `Ctrl-` | zoom in / out (x axis only) |
|
||||
| `Alt+` / `Alt-` | zoom in / out (y axis only) |
|
||||
|
||||
The wheel uses Shift = x / Ctrl = y, while the keyboard uses Ctrl = x / Alt = y. The two
|
||||
cannot agree: `+` *is* Shift+`=` on common layouts, so a bare zoom-in already arrives with
|
||||
`Mod::Shift` set, and using Shift for axis restriction would make x-only zoom unreachable from
|
||||
the keyboard. This is a **deliberate deviation from the wheel's convention**, documented in the
|
||||
shortcut overview itself.
|
||||
|
||||
The six "Plot mouse" rows (wheel, drag, right-click) carry no accelerator key — GTK's shortcut
|
||||
syntax has no member for pointer gestures — and put the prose in the `subtitle` field instead,
|
||||
which `AdwShortcutsItem` renders as free text.
|
||||
|
||||
**The 14-page help window** (overflow menu, F1, or the toolbar **?** button long-press) is a
|
||||
scrollable text view that opens on the page nearest to what the user was doing: the help pages
|
||||
are compiled into the binary as a GResource (`src/help/udpscope_help.gresource.xml`,
|
||||
`--c-name=udpscope_help`) for the same reason the icons are — udpscope is run straight out of the
|
||||
build tree with no install step, so a search path would have to be found at runtime and a missing
|
||||
file fails silently. The pages are Pango markup (`.txt` bodies), validated at load; a page that
|
||||
fails validation renders a one-line stand-in so the window always opens rather than crashing.
|
||||
`UDPSCOPE_PROBE_HELP_MS` verifies that `parsed == pages` and that the `closed ok` line carries
|
||||
no `Gtk-CRITICAL`.
|
||||
|
||||
**The status bar is two tiers.** The bar itself shows one glance line: the activity badge, the
|
||||
display state (one word from a fixed set), the stored rate and the window. Everything else —
|
||||
packet and frame counts, gaps, buffer size and span, per-plot trace counts — is behind the ⓘ
|
||||
button at the bar's right-hand end, opening a popover. The two moved there because a bar that
|
||||
carried all of them was too wide to read while watching a signal, and because the bar sits
|
||||
directly above the plot: a field whose width tracked the stream would relayout the plot on every
|
||||
update. The rate field uses `%.3g` (`10 kS/s`, never `10.0 kS/s`), and the elapsed-time field
|
||||
steps to a coarser unit rather than growing digits.
|
||||
|
||||
The exit dump still prints the full detail string (`mode with trigger on:` / `mode after
|
||||
go-live:`) because those strings come from `format_detail()` — the same path the popover
|
||||
reads — not from the label, which no longer carries those fields.
|
||||
|
||||
## Review findings not (yet) implemented
|
||||
|
||||
These are known deviations, found by a spec/code review, that are deliberate for
|
||||
|
||||
Reference in new issue
Block a user