diff --git a/gtk2_ardour/ardour_dialog.cc b/gtk2_ardour/ardour_dialog.cc index 99722d426f..0287d8c48b 100644 --- a/gtk2_ardour/ardour_dialog.cc +++ b/gtk2_ardour/ardour_dialog.cc @@ -52,6 +52,22 @@ ArdourDialog::ArdourDialog (Gtk::Window& parent, string title, bool modal, bool } ArdourDialog::~ArdourDialog () +{ + pop_splash (); + Keyboard::the_keyboard().focus_out_window (0, this); + WM::Manager::instance().remove (proxy); +} + +void +ArdourDialog::on_response (int response_id) +{ + pop_splash (); + hide (); + Gtk::Dialog::on_response (response_id); +} + +void +ArdourDialog::pop_splash () { if (_splash_pushed) { Splash* spl = Splash::instance(); @@ -59,9 +75,8 @@ ArdourDialog::~ArdourDialog () if (spl) { spl->pop_front(); } + _splash_pushed = false; } - Keyboard::the_keyboard().focus_out_window (0, this); - WM::Manager::instance().remove (proxy); } bool diff --git a/gtk2_ardour/ardour_dialog.h b/gtk2_ardour/ardour_dialog.h index 3c1b869e73..c65eaa5a09 100644 --- a/gtk2_ardour/ardour_dialog.h +++ b/gtk2_ardour/ardour_dialog.h @@ -47,11 +47,13 @@ public: bool on_delete_event (GdkEventAny*); void on_unmap (); void on_show (); + void on_response (int); private: WM::ProxyTemporary* proxy; bool _splash_pushed; void init (); + void pop_splash (); static sigc::signal CloseAllDialogs; }; diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index 8b93cbf799..1a836f919c 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -417,9 +417,6 @@ void EngineControl::on_show () { ArdourDialog::on_show (); - if (Splash::instance()) { - Splash::instance()->hide (); - } if (!ARDOUR::AudioEngine::instance()->current_backend() || !ARDOUR::AudioEngine::instance()->running()) { // re-check _have_control (jackd running) see #6041 backend_changed (); @@ -2736,9 +2733,6 @@ EngineControl::start_stop_button_clicked () start_engine (); if (!ARDOUR_UI::instance()->session_loaded) { ArdourDialog::on_response (RESPONSE_OK); - if (Splash::instance()) { - Splash::instance()->pop_front (); - } } } } @@ -3152,9 +3146,6 @@ EngineControl::connect_disconnect_click() start_engine (); if (!ARDOUR_UI::instance()->session_loaded) { ArdourDialog::on_response (RESPONSE_OK); - if (Splash::instance()) { - Splash::instance()->pop_front (); - } } } }