Commit Graph

60 Commits

Author SHA1 Message Date
Robin Gareus f2d938914d
Fix loading session by relative path
Previously (since bc91ea3c4) that would create a new session
even if -N was not specified.

This also uses Glib API to test for absolute path, rather
than a custom hack.
2024-03-12 04:29:33 +01:00
Paul Davis c35515e43d initialize variable
Without this, loading a session from the command line bypasses any initialization of session_loaded
and after the changes in 0a72c1317 that leads to incorrect startup
2024-02-20 11:17:00 -07:00
Robin Gareus 0a72c1317f
Initial GUI support to load AAF sessions 2024-02-15 01:44:35 +01:00
Robin Gareus 46a2b45443
Tweak translatable strings
* add spaces around "->"
* consistently use "time domain" (instead of "timebase")
* remove "Edit ->" from "Preferences" (on macOS Prefs
  are not in the edit menu
2023-12-17 20:58:11 +01:00
Paul Davis e0d9970056 remove mistakenly retained stacktrace() call 2023-11-14 19:47:17 -07:00
Paul Davis 729eb60de3 startupFSM: move definition of ::set_complete into source file
and also disconnect from Keyboard signal when called.
2023-11-14 11:02:08 -07:00
Paul Davis 8e583f4c4c startup FSM: save connection to Keyboard::HideMightMeanQuit signal 2023-11-14 11:01:39 -07:00
Robin Gareus 1b0f248e68
Fix creating sessions using CLI arguments (#9473)
Initialize uninitialized variable. Previously this crashed
when setting up the session's time-domain.
2023-10-09 21:16:09 +02:00
Robin Gareus c0d91362cf Fix duplicate close-session dialog on macOS
Previously [GtkApplicationDelegate applicationShouldTerminate:]
triggered both StartupFSM::queue_finish and ArdourUI::queue_finish.
Both of which registered an idle-callback to call ArdourUI::finish.
2023-10-09 17:19:17 +02:00
Paul Davis 5122036054 startup: fix use-after free of startup FSM object
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.
2023-09-18 16:27:11 -06:00
Paul Davis bc91ea3c42 startup: fix logic/design error that led to deep errors
The old state in this commit would lead to an existing session
being loaded with the claim that it was a new session. This went
unnoticed until 4bed642d71, where newness impacted the time
domain of the session (and actually led to it being set to a random memory
value).
2023-09-18 16:27:11 -06:00
Ben Loftis 4bed642d71
Allow user to choose the session time-domain 2023-09-14 23:13:05 +02:00
Paul Davis b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Robin Gareus 5d42509a21
Report error to user in startupFSM
StartupFSM does not catch SessionException from Session::load_state,
but bails out early, after checking `get_info_from_path` instead.
So we have to explicitly report errors.
2022-11-29 20:03:44 +01:00
Paul Davis 21c6c723c4 differentiate between StartupFSM::{Exit,Quit}Program
QuitProgram is a user choice, ExitProgram is an error condition
2022-11-29 10:09:39 -07:00
Robin Gareus 902c36d019
Do not try to autostart engine for new users
This allows new user to select the soundcard and I/O settings
when loading demo sessions at first run, or when tricking Ardour
to open an existing session (try to create an existing session,
user may choose to load it instead).

Normally a user can only create a new session after first running
Ardour, and creating new sessions always shows the dialog (to
set the samplerate).
2022-08-08 03:50:54 +02:00
luz paz 364f2f0788 Fix typos in gtk2_ardour/ directory
Found via `codespell -q 3 -S *.po,./share/patchfiles,./libs -L ba,buss,busses,doubleclick,hsi,ontop,ro,seh,siz,sur,te,trough,ue`
2022-01-26 12:35:38 -05:00
Robin Gareus 0659ffb8c8
Update UI, use new plugin-scan prefs
Verbose scan as well as well discovery apply to all
formats with external scanner app (VST2/3 and AU).
2021-08-10 15:38:36 +02:00
Robin Gareus a069af796d
Splash screen quirks, fix --no-splash
Add preference to hide splash instead of re-layering it
2021-07-04 21:48:12 +02:00
Robin Gareus 745b194241
Get sample-rate from session-archive
This correctly sets the engine sample-rate when opening
a session-archive.
2021-03-19 22:52:27 +01:00
Robin Gareus 93121e8aa3
Revert "Show error when session-archive loading fails"
This reverts commit 48225c10bd.

We need to allow this to fail and fall-through to test normal sessions.
2021-03-11 19:37:10 +01:00
Robin Gareus 9ee2a46b7a
Allow re-try when session-parameters mismatch
Previously Ardour kept running but no interaction was possible
since the session-dialog was hidden.
2021-03-11 19:20:29 +01:00
Robin Gareus 48225c10bd
Show error when session-archive loading fails 2021-03-11 18:25:22 +01:00
Robin Gareus 003245654a
Allow auto-start if there is no backend information for the session 2021-02-27 16:41:09 +01:00
Robin Gareus 33c596e149
Warn user if the engine device changed
This prevents accidentally auto-starting the engine (most recently
used device) with a session that recently used different hardware.
2021-02-23 19:32:03 +01:00
Robin Gareus a7a20e03ff
Fix --no-nls, i18n include order in UI -- #8361 2020-08-19 17:40:02 +02:00
Robin Gareus cda2e004a8 Fix opening sessions using the Finder (OSX)
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.
2020-06-12 22:13:58 +02:00
Robin Gareus 50e96a2135
Do not allow ctrl chars in session names (2/2)
The GUI applies this to new sessions only, old sessions that
may now have illegal names can still be loaded.
2020-06-09 20:30:55 +02:00
Edgar Aichinger eb5a41e3a3
Fix typos in the GUI in preparation for translations 2020-04-13 16:10:07 +02:00
Paul Davis 5d4ad01b58 introduce the idea of an "unnamed" session (GUI edition) 2020-03-24 14:10:39 -06:00
Paul Davis 20717b68bf fix startup behavior if answering "No" to "Do you want to open (this existing session)?" 2020-03-24 14:10:39 -06:00
Paul Davis c8d449f356 fix startupFSM handling of a ShouldLoad signal
This currently only handles initial session load by dbl-click on
a session file. It also does not work if the user or new or
subject to a pre-release warning. These last two restrictions
may remain in place, although if a person's first exposure to
the program is "copy my session, download program, dbl-click
on the session file", then that's not so nice
2020-03-06 15:54:00 -07:00
Paul Davis 86045fe526 move more or less all responsibility for ShouldLoad (macOS, NSM) back into ARDOUR_UI 2020-03-05 17:34:41 -07:00
Paul Davis 8d6f6266d2 unfinished fix for handling desktop/NSM specifying session to load
More work needed to fix requirement in StartupFSM that ::load_from_application_api()
is called before ::start()
2020-03-01 21:36:07 -07:00
Paul Davis 2b13cfa67c no pre-release warning dialog if beyond pre0 2020-02-29 09:33:10 -07:00
Paul Davis 70588baeac handle engine failure between audio/MIDI setup and end of plugin scan 2020-01-24 15:56:37 -07:00
Paul Davis 13ecf633a3 after handling the first click on the audio/MIDI setup, mark it insensitive to prevent subsequent (dbl) clicks changing engine state 2020-01-24 15:56:37 -07:00
Robin Gareus 2b55d6dce3
First batch of MessageDialog replacements 2019-12-14 23:44:01 +01:00
Paul Davis 38f692f0c0 cleanup and recomment StartupFSM::load_from_application_api() 2019-12-14 10:27:44 -07:00
Paul Davis 346c2ee3fe remove unnecessary calls to Application::ready 2019-12-14 10:27:10 -07:00
Paul Davis 1b91615b2c fix startup FSM handling when pre-release dialog is shown AND cmdline session info is given 2019-12-12 13:33:11 -07:00
Ben Loftis 7457fd2e27 Autostart must {try to} use the session sample-rate. There is no ambiguity here. 2019-12-09 16:49:15 -06:00
Paul Davis eda27cc3de move all responsibility for autostart into StartupFSM and out of engine dialog 2019-11-06 17:35:30 -07:00
Paul Davis f13c8f3d07 implement intended auto-start logic for startupFSM 2019-11-06 16:51:03 -07:00
Paul Davis d7b6d6e2c4 if user uses Ctrl/Cmd-w to close a dialog during startup, treat that as a request to exit 2019-11-06 16:32:46 -07:00
Robin Gareus f1d614b15d
Show PluginScanDialog only if needed (cancel VST scan) 2019-10-26 01:12:05 +02:00
Paul Davis c6b8fc78c8 make logic for creation of startup plugin scan a little clearer
Also, do not actually show dialog unless it's a new user or the user explicitly
asks for VST scan at startup
2019-10-25 11:55:55 -06:00
Paul Davis faeaf14e3b fix deletion/pointer error
Not sure why the now deleted hack was ever necessary for the compiler
2019-10-25 08:00:22 -06:00
Paul Davis 48161d7f51 somewhat substantial changes to StartupFSM to try to get relationships betweem various dialogs, plugin scanning and splash screen correct
Added extensive comments to try to explain the nightmare of plugin discovery
2019-10-24 21:32:46 -06:00
Paul Davis 0d86819a2b fix two thinkos with startup sequence
1) audio/MIDI setup was being shown unnecessarily
2) could crash if entire startup sequence passed without any dialogs being necessary
2019-10-18 00:07:31 -06:00