differentiate between StartupFSM::{Exit,Quit}Program

QuitProgram is a user choice, ExitProgram is an error condition
This commit is contained in:
Paul Davis 2022-11-28 10:18:43 -07:00
parent c19f3f07b0
commit 21c6c723c4
3 changed files with 12 additions and 5 deletions

View File

@ -525,6 +525,7 @@ ARDOUR_UI::sfsm_response (StartupFSM::Result r)
switch (r) {
case StartupFSM::ExitProgram: {
/* failure mode */
std::stringstream str;;
dump_errors (str, 10);
std::string msg (string_compose (_("<span font_size=\"large\" font_weight=\"bold\">Something went seriously wrong. %1 cannot continue.</span>\n\n"
@ -539,6 +540,11 @@ ARDOUR_UI::sfsm_response (StartupFSM::Result r)
}
break;
case StartupFSM::QuitProgram:
/* user explicitly requested quit */
queue_finish ();
break;
case StartupFSM::LoadSession:
if (load_session_from_startup_fsm () == 0) {

View File

@ -124,7 +124,7 @@ StartupFSM::dialog_hidden (Gtk::Window* /* ignored */)
void
StartupFSM::queue_finish ()
{
_signal_response (ExitProgram);
_signal_response (QuitProgram);
}
void
@ -232,7 +232,7 @@ StartupFSM::dialog_response_handler (int response, StartupFSM::DialogID dialog_i
show_session_dialog (new_session_required);
break;
default:
_signal_response (ExitProgram);
_signal_response (QuitProgram);
}
default:
/* ERROR */
@ -266,7 +266,7 @@ StartupFSM::dialog_response_handler (int response, StartupFSM::DialogID dialog_i
break;
default:
_signal_response (ExitProgram);
_signal_response (QuitProgram);
break;
}
break;
@ -300,7 +300,7 @@ StartupFSM::dialog_response_handler (int response, StartupFSM::DialogID dialog_i
}
break;
default:
_signal_response (ExitProgram);
_signal_response (QuitProgram);
}
break;
default:
@ -336,7 +336,7 @@ StartupFSM::dialog_response_handler (int response, StartupFSM::DialogID dialog_i
}
break;
default:
_signal_response (ExitProgram);
_signal_response (QuitProgram);
break;
}
default:

View File

@ -46,6 +46,7 @@ class StartupFSM : public sigc::trackable
enum Result {
LoadSession,
ExitProgram,
QuitProgram,
};
enum MainState {