added loading screen
This commit is contained in:
1 parent
881b52748e
commit
50a1ddca62
10 files changed
+249
-1
No files matched your search
+10
-1
@@ -30,13 +30,22 @@ int main(int argc, char** argv) {
|
||||
// declining must cost no buffer and no socket, and nothing below has to cope with "no source".
|
||||
// `--open` is the other answer to that question, and the chooser knows it: its Waveforms page
|
||||
// fills `open_waveform` in instead of the connection fields.
|
||||
if (!cfg.server_specified && cfg.open_waveform.empty() && !udpscope::choose_source(cfg)) return 0;
|
||||
const bool asked = !cfg.server_specified && cfg.open_waveform.empty();
|
||||
if (asked && !udpscope::choose_source(cfg)) return 0;
|
||||
// A source named on the command line skips the chooser, but its *stored* configuration still
|
||||
// applies: the buffer size, the clock and the capture ring are decided here, before the model --
|
||||
// which is the only moment they can be -- and a saved host whose buffer was ignored because the
|
||||
// address came from the command line is an edit that looks like it never took effect.
|
||||
if (cfg.server_specified) udpscope::apply_stored_settings(cfg);
|
||||
|
||||
// Everything from here to `gtk_window_present()` inside `run_ui()` runs with no main loop: the
|
||||
// buffer is allocated, a recording is read, then the whole UI is built. The chooser's window is
|
||||
// already gone, so without this the screen is empty for all of it -- "the dialog disappeared and
|
||||
// nothing happened", which at a few gigabytes of buffer is ten seconds long. Only on the path
|
||||
// that *asked*: a source named with `--server` had no window to lose, and the status line after
|
||||
// the present is the right place to say what such a run is waiting for.
|
||||
if (asked) udpscope::loading_show(cfg);
|
||||
|
||||
udpscope::ScopeModel model(cfg);
|
||||
udpscope::RowSet rows;
|
||||
rows.set_row_count(cfg.plots);
|
||||
|
||||
Reference in new issue
Block a user