Skip silent sources on session-archive -- fixes #7699
[ardour.git] / gtk2_ardour / ardour_dialog.cc
index c7d78099ce1e3cae34354e03f7308c15d939ad25..68f388682a90e2970b92a8cf31045b2a48a04061 100644 (file)
@@ -45,6 +45,7 @@ ArdourDialog::ArdourDialog (string title, bool modal, bool use_seperator)
 
 ArdourDialog::ArdourDialog (Gtk::Window& parent, string title, bool modal, bool use_seperator)
        : Dialog (title, parent, modal, use_seperator)
+       , proxy (0)
        , _splash_pushed (false)
 {
        init ();
@@ -56,6 +57,7 @@ ArdourDialog::~ArdourDialog ()
        pop_splash ();
        Keyboard::the_keyboard().focus_out_window (0, this);
        WM::Manager::instance().remove (proxy);
+       proxy->explicit_delete ();
 }
 
 void
@@ -67,6 +69,17 @@ ArdourDialog::on_response (int response_id)
        Gtk::Dialog::on_response (response_id);
 }
 
+void
+ArdourDialog::close_self ()
+{
+       /* Don't call Idle, don't pop splash.
+        * This is used at exit and session-close and invoked
+        * via close_all_dialogs.
+        */
+       hide ();
+       Gtk::Dialog::on_response (RESPONSE_CANCEL);
+}
+
 void
 ArdourDialog::pop_splash ()
 {
@@ -138,7 +151,7 @@ ArdourDialog::init ()
                set_transient_for (*parent);
        }
 
-       ARDOUR_UI::CloseAllDialogs.connect (sigc::bind (sigc::mem_fun (*this, &ArdourDialog::response), RESPONSE_CANCEL));
+       ARDOUR_UI::CloseAllDialogs.connect (sigc::mem_fun (*this, &ArdourDialog::close_self)); /* send a RESPONSE_CANCEL to self */
 
        proxy = new WM::ProxyTemporary (get_title(), this);
        WM::Manager::instance().register_window (proxy);