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
@@ -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