diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2020-03-06 15:53:31 -0700 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2020-03-06 15:54:00 -0700 |
commit | c8d449f356af6f090a319ed534f9b049e94e10be (patch) | |
tree | e043fa526d4788617152ab674f9452f80fac1248 /gtk2_ardour/startup_fsm.cc | |
parent | 694a0eaeca468c47f0e1391f6cff64763c57dcb6 (diff) |
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
Diffstat (limited to 'gtk2_ardour/startup_fsm.cc')
-rw-r--r-- | gtk2_ardour/startup_fsm.cc | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/gtk2_ardour/startup_fsm.cc b/gtk2_ardour/startup_fsm.cc index 5a22c79ed9..bf94c77ab9 100644 --- a/gtk2_ardour/startup_fsm.cc +++ b/gtk2_ardour/startup_fsm.cc @@ -199,6 +199,9 @@ StartupFSM::dialog_response_handler (int response, StartupFSM::DialogID dialog_i switch (_state) { case WaitingForPreRelease: switch (dialog_id) { + case ApplicationPseudoDialog: + /* this shouldn't happen; ignore it */ + break; case PreReleaseDialog: default: /* 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: switch (dialog_id) { + case ApplicationPseudoDialog: + /* this shouldn't happen; ignore it */ + break; case NewUserDialog: switch (response) { case RESPONSE_OK: @@ -262,6 +268,13 @@ StartupFSM::dialog_response_handler (int response, StartupFSM::DialogID dialog_i } 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: /* ERROR */ break; @@ -895,7 +908,11 @@ Full information on all the above can be found on the support page at\n\ void StartupFSM::handle_path (string const & path) { - if (get_session_parameters_from_path (path, string(), false)) { - _signal_response (LoadSession); + if (!ARDOUR_COMMAND_LINE::session_name.empty()) { + return; } + + ARDOUR_COMMAND_LINE::session_name = path; + + dialog_response_handler (RESPONSE_OK, ApplicationPseudoDialog); } |