Note that this is done at the GUI level, might need to double check if there are
other paths into a "save" that should be covered. Control surfaces use the action, but
Lua comes to mind
Dumping errors to stderr only is not very useful. Particularly not
on Windows and MacOS.
Even though a user may not be able to address the issue, this
can lead to better reports vs just printing "corrupt state".
There are various ways to cancel a dialog. Only checking for
RESPONSE_CANCEL is not sufficient. e.g. Esc causes a delete-event.
* Gtk::RESPONSE_CLOSE
* Gtk::RESPONSE_REJECT
* Gtk::RESPONSE_DELETE_EVENT
* Gtk::RESPONSE_CANCEL
* Gtk::RESPONSE_NO
Among others this fixes "Clicking session > open,
then hitting ESC opens the currently selected folder and session"
So far this is only used for MIDI, missing audio files are
already handled by asking a user to locate them.
The same approach doesn't work for MIDI, since there cannot be
externally referenced (embedded) .mid files (since MIDI is destructive).
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.