In some startup flows, the entire loading process happens inside
StartupFSM::start(). In others, that call gets things moving but
we return from it and loading is not complete until later.
Deleting the StartupFSM while still inside the ::start() call
led to a use-after-free error. This new code will leak the StartupFSM
in some startup flows.
Much like the edit-tool and grid-types, clock-modes are UI state.
Saving the UI state separately allows them to be used
consistently for new sessions. Previously clock-modes were set
initially (at application start) and when loading sessions.
The clock modes of newly created sessions was different
depending on loading another session prior to creating the
session. This is now no longer the case.
* Fix demo-session glob (missing "*" + session_archive_suffix)
* Copy demo-session also when copying settings from older version
* Also add demo-session to recent-list if it was previously unpacked
for new major versions.
Windows and macOS users don't have an easy way to disable this
otherwise (commandline option or edit URLs in the config, or
compile without PHONE_HOME support).
It's all the rage currently.
This fixes various issues, esp on macOS and Windows where
the window is only hidden, not re-stacked:
* plugin scan dialog hides the splash, but
the plugin-manager emits BootMessage
(this worked mostly because gtk event loop didn't
have time to catch up)
* More than one dialog can pop back/front the splash,
e.g. scripted session-setup or error messages when
loading recent sessions.
The ShouldLoad() signal is handled by flush_pending(). This is the first
time that normal application flow can be interrupted in ::starting()
after app->ready().
This calls ::load_from_application_api(), which in turn calls
startup_fsm->handle_path(). This sets off the complete initalization
process, loading the session, and concludes with ::sfsm_response(),
where there is a call to `delete startup_fsm;`
Previously execution continued in StartupFSM::start() which caused a
crash.
Special cases to load-or-create session via NSM_Client::command_open
This bypasses most of the startup-FSM for NSM. Either a session
is loaded or created. JACK is mandatory.
When creating a session from the Editor (after Session > Close,
or directly via Session > New) the engine-dialog needs to be displayed
to allow configuring the sample-rate.
This also consolidates scripted session setup: meta_session_setup()
is now called from build_session(), instead of all callers.