make EngineDialog behavior more appropriate for use in both startup and non-startup conditions
This commit is contained in:
parent
20b38ad8ea
commit
03a248d517
@ -485,9 +485,8 @@ EngineControl::try_autostart ()
|
|||||||
bool
|
bool
|
||||||
EngineControl::start_engine ()
|
EngineControl::start_engine ()
|
||||||
{
|
{
|
||||||
if (push_state_to_backend(true) != 0) {
|
if (push_state_to_backend (true) != 0) {
|
||||||
MessageDialog msg(*this,
|
MessageDialog msg (*this, ARDOUR::AudioEngine::instance()->get_last_backend_error());
|
||||||
ARDOUR::AudioEngine::instance()->get_last_backend_error());
|
|
||||||
msg.run();
|
msg.run();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2756,6 +2755,14 @@ EngineControl::control_app_button_clicked ()
|
|||||||
backend->launch_control_app ();
|
backend->launch_control_app ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
EngineControl::on_response (int)
|
||||||
|
{
|
||||||
|
/* we do nothing when our response signal is emitted ... that's the
|
||||||
|
* responsibility of whoever displayed us.
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EngineControl::start_stop_button_clicked ()
|
EngineControl::start_stop_button_clicked ()
|
||||||
{
|
{
|
||||||
@ -2768,16 +2775,13 @@ EngineControl::start_stop_button_clicked ()
|
|||||||
if (ARDOUR::AudioEngine::instance()->running()) {
|
if (ARDOUR::AudioEngine::instance()->running()) {
|
||||||
ARDOUR::AudioEngine::instance()->stop ();
|
ARDOUR::AudioEngine::instance()->stop ();
|
||||||
} else {
|
} else {
|
||||||
if (!ARDOUR_UI::instance()->the_session ()) {
|
/* whoever displayed this dialog is expected to do its own
|
||||||
pop_splash ();
|
check on whether or not the engine is running.
|
||||||
hide ();
|
*/
|
||||||
ARDOUR::GUIIdle ();
|
|
||||||
}
|
|
||||||
start_engine ();
|
start_engine ();
|
||||||
if (!ARDOUR_UI::instance()->the_session ()) {
|
|
||||||
ArdourDialog::on_response (RESPONSE_OK);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
response (RESPONSE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -3139,22 +3143,6 @@ EngineControl::use_latency_button_clicked ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
EngineControl::on_response (int rid)
|
|
||||||
{
|
|
||||||
/* this gets called if this Dialog is running under gtk_dialog_run()
|
|
||||||
rather than in the toplevel loop. This happens during program
|
|
||||||
startup.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (rid == RESPONSE_DELETE_EVENT) {
|
|
||||||
on_delete_event ((GdkEventAny*) 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ArdourDialog::on_response (rid);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
EngineControl::on_delete_event (GdkEventAny* ev)
|
EngineControl::on_delete_event (GdkEventAny* ev)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user