mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
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
This commit is contained in:
parent
694a0eaeca
commit
c8d449f356
2 changed files with 21 additions and 3 deletions
|
|
@ -199,6 +199,9 @@ StartupFSM::dialog_response_handler (int response, StartupFSM::DialogID dialog_i
|
||||||
switch (_state) {
|
switch (_state) {
|
||||||
case WaitingForPreRelease:
|
case WaitingForPreRelease:
|
||||||
switch (dialog_id) {
|
switch (dialog_id) {
|
||||||
|
case ApplicationPseudoDialog:
|
||||||
|
/* this shouldn't happen; ignore it */
|
||||||
|
break;
|
||||||
case PreReleaseDialog:
|
case PreReleaseDialog:
|
||||||
default:
|
default:
|
||||||
/* any response value from the pre-release dialog means
|
/* any response value from the pre-release dialog means
|
||||||
|
|
@ -217,6 +220,9 @@ StartupFSM::dialog_response_handler (int response, StartupFSM::DialogID dialog_i
|
||||||
|
|
||||||
case WaitingForNewUser:
|
case WaitingForNewUser:
|
||||||
switch (dialog_id) {
|
switch (dialog_id) {
|
||||||
|
case ApplicationPseudoDialog:
|
||||||
|
/* this shouldn't happen; ignore it */
|
||||||
|
break;
|
||||||
case NewUserDialog:
|
case NewUserDialog:
|
||||||
switch (response) {
|
switch (response) {
|
||||||
case RESPONSE_OK:
|
case RESPONSE_OK:
|
||||||
|
|
@ -262,6 +268,13 @@ StartupFSM::dialog_response_handler (int response, StartupFSM::DialogID dialog_i
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ApplicationPseudoDialog:
|
||||||
|
/* macOS, NSM etc. ... existence was already checked */
|
||||||
|
if (get_session_parameters_from_path (ARDOUR_COMMAND_LINE::session_name, string(), false)) {
|
||||||
|
start_audio_midi_setup ();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* ERROR */
|
/* ERROR */
|
||||||
break;
|
break;
|
||||||
|
|
@ -895,7 +908,11 @@ Full information on all the above can be found on the support page at\n\
|
||||||
void
|
void
|
||||||
StartupFSM::handle_path (string const & path)
|
StartupFSM::handle_path (string const & path)
|
||||||
{
|
{
|
||||||
if (get_session_parameters_from_path (path, string(), false)) {
|
if (!ARDOUR_COMMAND_LINE::session_name.empty()) {
|
||||||
_signal_response (LoadSession);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ARDOUR_COMMAND_LINE::session_name = path;
|
||||||
|
|
||||||
|
dialog_response_handler (RESPONSE_OK, ApplicationPseudoDialog);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@ class StartupFSM : public sigc::trackable
|
||||||
NewUserDialog,
|
NewUserDialog,
|
||||||
NewSessionDialog,
|
NewSessionDialog,
|
||||||
AudioMIDISetup,
|
AudioMIDISetup,
|
||||||
PluginDialog
|
PluginDialog,
|
||||||
|
ApplicationPseudoDialog,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Result {
|
enum Result {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue