badges: source badge shows the name only; drop the signals lock; the signals page proposes what can be added
The link state is the status bar's, so the Source badge loses its state text. The signals have no lock (the badges and signal pages are direct manipulation), and the signals page lists only unacquired signals and uncomputed math channels (plus the acquired ones while the badge bar has overflowed). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
dad424f1de
commit
b98a3478ff
10 files changed
+164
-148
No files matched your search
+20
-13
@@ -535,13 +535,12 @@ struct App {
|
||||
/// file stores a *name* and the trigger needs an index into the acquired channels, which do not
|
||||
/// exist until the stream has been described. Empty means "nothing pending".
|
||||
std::string pending_trigger_channel;
|
||||
/// The two panes' modes. *Locked* is the one a returning user gets: the trigger pane shows a line
|
||||
/// that says what it is set to, the signal list shows only the signals that are on, and neither
|
||||
/// offers a control that changes the configuration. A first run -- no session file for this source
|
||||
/// -- starts in configuration mode, because that is what a first run is for. The flags last for the
|
||||
/// session: a lock is a mode, not a setting, so it is not persisted.
|
||||
/// The trigger pane's mode. *Locked* is the one a returning user gets: the pane shows a line that
|
||||
/// says what it is set to and offers no control that changes the configuration. A first run -- no
|
||||
/// session file for this source -- starts in configuration mode, because that is what a first run is
|
||||
/// for. The flag lasts for the session: a lock is a mode, not a setting, so it is not persisted.
|
||||
/// (The signals have no lock: the badges and the signal pages are direct manipulation.)
|
||||
bool trigger_locked = false;
|
||||
bool signals_locked = false;
|
||||
/// The locked trigger pane's content: a small definition list, because one line cannot hold the
|
||||
/// signal, the condition, the level and the mode, and those are what a user reads the pane for.
|
||||
GtkWidget* trigger_summary = nullptr;
|
||||
@@ -553,14 +552,14 @@ struct App {
|
||||
/// pane is locked, which is the one combination where the body's own Arm button has gone with the body.
|
||||
GtkWidget* trigger_summary_arm = nullptr;
|
||||
GtkWidget* trigger_edit = nullptr;
|
||||
GtkWidget* signals_edit = nullptr;
|
||||
/// The dim label of the `signals` page that says nothing is left to add.
|
||||
GtkWidget* signals_empty = nullptr;
|
||||
int dbg_trigger_locked = -1;
|
||||
int dbg_summary_arm_off = -1; ///< the compact line's arm control with the trigger *off*
|
||||
int dbg_summary_arm_visible = -1; ///< the compact line's arm control, locked and with the trigger on
|
||||
int dbg_summary_arm_sensitive = -1;
|
||||
std::string dbg_summary_arm_label; ///< its text, which is the armed state in the user's words
|
||||
int dbg_summary_arm_width = -1; ///< its allocation a frame later: 0 means "not laid out"
|
||||
int dbg_signals_locked = -1;
|
||||
int dbg_trigger_body_visible = -1;
|
||||
/// The compact line the locked trigger pane shows. It is the pane's whole content in that mode, so it
|
||||
/// is read rather than assumed: empty here is a locked pane showing nothing at all.
|
||||
@@ -1160,7 +1159,7 @@ struct App {
|
||||
int dbg_trigger_items = 0;
|
||||
int dbg_trigger_selected = -1;
|
||||
/// The signal list's shape, captured where the list is built: how many rows it holds, and how many
|
||||
/// of them are streamed signals. The `MATH` divider and the math channels account for the rest, and
|
||||
/// of them are streamed signals. The `MATH` divider and the math rows account for the rest, and
|
||||
/// `rows == signals + 1 + math` is the invariant the dump checks -- a list that lost its `+`.
|
||||
int dbg_signal_rows = 0;
|
||||
/// How many rows of the list carry a `GtkDragSource`: 0 -- the signal badges are the drag handles now.
|
||||
@@ -1169,6 +1168,11 @@ struct App {
|
||||
/// -1 when there is no badge to drag.
|
||||
int dbg_drag_closed_slideover = -1;
|
||||
std::size_t dbg_signal_plain = 0;
|
||||
/// The math channels among those rows, and the number of signals the page should be proposing (counted from
|
||||
/// the model, not from the rows built), and whether the "every signal is acquired" label was on screen.
|
||||
std::size_t dbg_signal_math_rows = 0;
|
||||
std::size_t dbg_signal_addable = 0;
|
||||
int dbg_signal_empty_label = -1;
|
||||
int dbg_side_column_after_hide = 1;
|
||||
std::string dbg_mode_triggered;
|
||||
std::string dbg_window_text;
|
||||
@@ -1683,6 +1687,10 @@ void rebuild_signal_list(App& app, const std::vector<SignalInfo>& signals);
|
||||
/// Every plottable signal once (the time base skipped, a group's layers folded to the first), in model order.
|
||||
/// The one rule the list and the badges share.
|
||||
std::vector<std::size_t> listed_signals(const std::vector<SignalInfo>& signals);
|
||||
/// Whether more signals are acquired than `kMaxSignalBadges`: the badge bar then shows one "N signals" badge,
|
||||
/// and the `signals` page lists the acquired signals as well, since their rows are the only way to a page.
|
||||
/// The one rule the bar and the page share.
|
||||
bool signal_badges_overflowed(App& app, const std::vector<SignalInfo>& signals);
|
||||
/// Puts `signal` (an index into `signals()`) on plot `row` in the first free slot, switching it on first if
|
||||
/// need be. Says why not through `set_notice` and returns false when it cannot. The one path a drop and a
|
||||
/// signal page's "Plot on" button share.
|
||||
@@ -1699,7 +1707,7 @@ bool signal_page_ensure(App& app, const std::string& name);
|
||||
void signal_pages_sync(App& app);
|
||||
gboolean signal_page_probe(gpointer user); // UDPSCOPE_PROBE_SIGNAL_PAGES_MS
|
||||
/// The `MATH` divider row in the one channel list, and the `+` it carries.
|
||||
GtkWidget* make_math_divider(App& app, bool with_add);
|
||||
GtkWidget* make_math_divider(App& app);
|
||||
void on_math_add_clicked(GtkButton* button, gpointer user);
|
||||
/// The index in `App::math` of the channel a synthetic signal is named after, or `-1`.
|
||||
int math_index_for_signal(App& app, const std::string& name);
|
||||
@@ -1849,9 +1857,8 @@ const char* trigger_mode_text(TriggerMode m);
|
||||
TriggerMode trigger_mode_from_text(const std::string& s);
|
||||
/// The panel's controls from the model, and the session's trigger into both.
|
||||
void write_trigger_widgets(App& app);
|
||||
/// The compact line the trigger pane shows while it is locked, and the lock itself: the panes'
|
||||
/// bodies, their [edit] buttons and the signal list's rows all follow from `trigger_locked` and
|
||||
/// `signals_locked`.
|
||||
/// The compact line the trigger pane shows while it is locked, and the lock itself: the pane's body and
|
||||
/// its [edit] button follow from `trigger_locked`.
|
||||
void sync_trigger_summary(App& app);
|
||||
|
||||
/// Both arm buttons -- the panel's and the compact line's -- from the one armed state the producer keeps in
|
||||
|
||||
Reference in new issue
Block a user