ui: the source chooser's window is a .ui file, and its pages an AdwViewStack
The last hand-built UI outside ui.cpp. The window, its header bar, its two pages and the four buttons that are about the chooser rather than about a source now live in src/ui/source-chooser.ui; the rows stay in code because a source row and a waveform row are data, rebuilt whenever the known hosts or the recent files change. The pages were a GtkNotebook and are an AdwViewStack under an AdwViewSwitcherBar, which is what current libadwaita asks for and the same information without a tab strip. The three actions moved from a button row at the foot into the header bar, the shape source-form.ui already uses -- and deliberately without receives-default, since Enter must keep activating the selected row. Nothing carries a value: the tooltips and labels moved as they were, the handlers are the same functions, and the switch is by page *name* rather than by index. The probe reads the frame back -- `[sources] chooser ui: page='sources' title='Sources' icon=yes page='waveforms' … switcher_wired=1 buttons=[prefs=1 new_host=1 open=1 cancel=1]` -- so a .ui that lost an id is named instead of opening a window with a hole in it, and `check_ui` type-checks the file against the GIR (7 ok, 0 failed). Two things the checks caught while doing it: the new frame dropped the call that fills the waveforms page (the unused-function warning), and `AdwViewStackPage` is a GObject that *wraps* a child rather than being one, so reading the pages needs adw_view_stack_get_page().
This commit is contained in:
1 parent
723f5c3b4c
commit
0a64e9e854
5 files changed
+216
-80
No files matched your search
@@ -945,14 +945,16 @@ configuration that carries settings, is the defect this exists for — a saved h
|
||||
## `[sources] waveforms` and the waveform load
|
||||
|
||||
```
|
||||
[sources] waveforms: 1 recent /tmp/rt.npy(ok) page=1
|
||||
[sources] chooser ui: page='sources' title='Sources' icon=yes page='waveforms' title='Waveforms' icon=yes visible='sources' switcher_wired=1 buttons=[prefs=1 new_host=1 open=1 cancel=1]
|
||||
[sources] waveforms: 1 recent /tmp/rt.npy(ok) page=waveforms
|
||||
[sources] picked waveform /tmp/rt.npy
|
||||
[udpscope] waveform loaded: /tmp/rt.npy signals=4 samples=20001 span=2.000000s rate=10000 time=[-2.000000..0.000000]
|
||||
```
|
||||
|
||||
| field | value it must read | the defect a wrong reading names |
|
||||
| --- | --- | --- |
|
||||
| `waveforms:` | one entry per remembered export, with `(ok)` or `(missing)`, and `page=1` | the Waveforms page not built, or a stale path offered as if it were openable |
|
||||
| `chooser ui:` | both pages with a `title` and an `icon=yes`, `switcher_wired=1`, and all four buttons `1` | the chooser's `.ui` losing an id: the code names the missing one and refuses the window, and this line is the frame that *did* build -- a page with `icon=NO` is one the switcher cannot draw |
|
||||
| `waveforms:` | one entry per remembered export, with `(ok)` or `(missing)`, and `page=waveforms` once the page is shown | the Waveforms page not built, or a stale path offered as if it were openable |
|
||||
| `picked waveform` | the selected path | a pick that carries no file: `--open` is what the mode reads |
|
||||
| `signals=`, `samples=` | the export's `cols=` and `rows=` | a reader mis-slicing its records, or the columns bound to the wrong channels |
|
||||
| `span=`, `rate=`, `time=[…]` | the exported window and rate, `[-window, 0]` | the plan not covering the whole file (the tail arrives as the whole picture) or the display epoch not pinned to the file's last stamp |
|
||||
|
||||
@@ -343,7 +343,7 @@ as distinct from the fault injection below, which exercises ingest:
|
||||
reads as one that cannot plot anything. A file-mode run must also write **no session** for the
|
||||
default `127.0.0.1:8000` (`App::source_port` is 0), or it overwrites that source's saved layout.
|
||||
- **The chooser's Waveforms page**: `UDPSCOPE_PROBE_WAVEFORMS=1` prints
|
||||
`[sources] waveforms: N recent <path>(ok|missing) … page=1`, and `UDPSCOPE_PROBE_WAVE=<path>` sets
|
||||
`[sources] waveforms: N recent <path>(ok|missing) … page=waveforms`, and `UDPSCOPE_PROBE_WAVE=<path>` sets
|
||||
the field the file dialog's callback sets and prints `[sources] picked waveform <path>` — then the
|
||||
load line above, with no socket involved.
|
||||
- **A `--server` launch reads the stored configuration.** With a throwaway `XDG_CONFIG_HOME`
|
||||
|
||||
Reference in new issue
Block a user