ui: the events pane's frame is a .ui file

src/ui/events-pane.ui holds the pane: the GtkRevealer that slides it in, the header with
the way back to the live stream, the Compare and Accumulate actions, and the list inside
its scroller. The rows stay in code -- one per latched event, rebuilt whenever the cache
changes -- and their sensitivity stays with update_group_buttons(), which is why the file
only starts the two actions insensitive.

Two statements moved into the file along with the widgets, because they are about what the
pane is for rather than about a default: multiple selection, and activation on *double*
click. With single-click activation the plain click that builds a selection would replay
the event instead.

Read back as `events pane: compare=1 accumulate=1 list=1 revealer=1 nested=1`, where
`nested` is the list being inside the revealer -- the one thing a lost id cannot show. The
[events] probe is the other half and drives the pane end to end: recording, trigger, the
history button, a row click and the replay, then Compare and Accumulate, so the file's
buttons are read by being clicked. check_ui: 13 ok, 0 failed.
This commit is contained in:
Martino Ferrari committed 2026-10-12 16:27:56 +02:00
1 parent c86d2117fb
commit 148d1168d6
5 files changed
+139 -67

No files matched your search

+16
View File
@@ -5446,6 +5446,22 @@ int run_ui(int argc, char** argv, const Config& cfg, ScopeModel& model, Acquisit
buttons, app.math_list != nullptr ? 1 : 0,
GTK_IS_LABEL(title) ? gtk_label_get_text(GTK_LABEL(title)) : "-");
}
{
// The events pane's frame, read from the window: the four widgets the `.ui` gives it, and the list
// being inside the revealer the file builds. A control that lost its id reads 0 here rather than
// showing as a pane missing a button, and `nested=0` is a list that is no longer in the pane at all.
const auto inside = [](GtkWidget* w, GtkWidget* root) {
if (w == nullptr) return 0;
for (GtkWidget* p = w; p != nullptr; p = gtk_widget_get_parent(p)) {
if (p == root) return 1;
}
return 0;
};
std::printf("[udpscope] events pane: compare=%d accumulate=%d list=%d revealer=%d nested=%d\n",
app.events_compare != nullptr ? 1 : 0, app.events_accumulate != nullptr ? 1 : 0,
app.events_list != nullptr ? 1 : 0, app.events_revealer != nullptr ? 1 : 0,
inside(app.events_list, app.events_revealer));
}
std::printf("[udpscope] panels: side=%dx%d (visible=%d) signals=%dx%d row_h=%d "
"(revealed=%d) trigger=%dx%d (revealed=%d) toggles=%d cursors=%d window=%.3fs "
"window_cap=%.1fs\n",