ui: Arm is disabled with trigger mode off, and the redundant Go-live button is gone
**`Arm` is now disabled while trigger mode is off**, and labelled `Arm` again: it is the one control in that pane that is *runtime* rather than setting, so with no engine running there is nothing to arm. It is also the only thing in the body that stays disabled — the settings themselves stay editable, which is the point of the previous commit. `arm sensitive with the trigger off=0` is the reading. **`Go live (trigger off)` is deleted.** Its handler was `trigger_toggle → FALSE`, i.e. exactly the toolbar's trigger switch and the pane's own switch, which is what it was for: "the way out of trigger mode, from inside the panel that froze the view: it is the toolbar's trigger switch, so there is exactly one piece of state." With that switch now in the pane's own heading, the button was the same control drawn a third time. The status line that told users about it says "or switch the trigger off to stream" instead. The events pane's own `events_live` button is a different button on a different path — the file view restore — and is untouched. **And one silent regression this work uncovered.** The `trigger panel:` frame reading had been walking the *wrapper* box the app puts around the `.ui`'s panel (heading row + locked summary + panel) ever since the heading moved out of the file in the lock commit, so it reported `boxes=2 … search_inside=0/4` against a panel that was entirely correct. It reads `trigger_body` — the file's own panel — again, and now says so in its comment, because a reading that can silently start describing the wrong widget is the failure it exists to catch. Verified: `trigger panel: boxes=15 controls_inside=15/15 search_widgets=4/4 search_inside=4/4` (the documented shape, restored); `arm sensitive with the trigger off=0`; `trigger panel sensitive …=1`; `panes:`/`panel switches:`/`pane edits:` unchanged; `make test-ui` 14 files; zero `Gtk-CRITICAL`.
This commit is contained in:
1 parent
796dda4ad5
commit
d8705a369f
6 files changed
+40
-36
No files matched your search
+3
-7
@@ -410,17 +410,15 @@ void on_trigger_toggled(GtkToggleButton* button, gpointer user) {
|
||||
// `sync_events_availability()`'s call and not the trigger's alone.
|
||||
sync_events_availability(*app);
|
||||
gtk_button_set_label(GTK_BUTTON(app->arm_button), on ? "Disarm" : "Arm");
|
||||
// Arming is a *runtime* control: with trigger mode off there is no engine to arm, and the button is the
|
||||
// one part of this pane that is not a setting. (The body itself stays live -- see above.)
|
||||
if (app->arm_button != nullptr) gtk_widget_set_sensitive(app->arm_button, on);
|
||||
// The pane's own switch shows the same state, whichever of the two was clicked.
|
||||
sync_panel_switches(*app);
|
||||
}
|
||||
|
||||
/// The way out of trigger mode, from inside the panel that froze the view: it is
|
||||
/// the toolbar's trigger switch, so there is exactly one piece of state.
|
||||
void on_go_live(GtkButton*, gpointer user) {
|
||||
App* app = static_cast<App*>(user);
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(app->trigger_toggle), FALSE);
|
||||
}
|
||||
|
||||
/// The row the `.ui` declares for a control, with the control appended to it.
|
||||
///
|
||||
/// The label is the file's, because it is text a translator owns; the control is code's, because a
|
||||
@@ -545,8 +543,6 @@ GtkWidget* build_trigger_panel(App& app) {
|
||||
if (app.arm_button != nullptr) {
|
||||
g_signal_connect(app.arm_button, "clicked", G_CALLBACK(on_arm_clicked), &app);
|
||||
}
|
||||
GtkWidget* live = GTK_WIDGET(gtk_builder_get_object(ui, "trigger_live"));
|
||||
if (live != nullptr) g_signal_connect(live, "clicked", G_CALLBACK(on_go_live), &app);
|
||||
|
||||
for (GtkWidget* w : {app.trigger_level_spin, app.trigger_pre_spin, app.trigger_holdoff_spin,
|
||||
app.trigger_width_spin, app.trigger_width2_spin,
|
||||
|
||||
Reference in new issue
Block a user