summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_dialog.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-04-01 16:40:07 +0200
committerRobin Gareus <robin@gareus.org>2017-04-01 16:40:07 +0200
commit3e43585fa133d052b27aba10d1fe89dea3061904 (patch)
tree5f4237264193cf8975a150e0793349f7ff5b37dd /gtk2_ardour/ardour_dialog.cc
parentdae7e8dbd312d2d47b8eb4ffb1025555d537711c (diff)
Pop splash on dialog response - not d'tor.
A Dialog Window may not be tightly scoped, and may be around for a while (query settings from the dialog instance). The destructor may only be called later.
Diffstat (limited to 'gtk2_ardour/ardour_dialog.cc')
-rw-r--r--gtk2_ardour/ardour_dialog.cc19
1 files changed, 17 insertions, 2 deletions
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
@@ -53,15 +53,30 @@ 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();
if (spl) {
spl->pop_front();
}
+ _splash_pushed = false;
}
- Keyboard::the_keyboard().focus_out_window (0, this);
- WM::Manager::instance().remove (proxy);
}
bool