From 6b7fd786aa562f2cb67c631717543be4e9f43a01 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 13 Jan 2014 11:08:51 +0100 Subject: ProcessorWindowProxy::processor_going_away takes care of deletion --- gtk2_ardour/port_insert_ui.cc | 11 ----------- gtk2_ardour/port_insert_ui.h | 1 - gtk2_ardour/return_ui.cc | 10 ---------- gtk2_ardour/return_ui.h | 1 - gtk2_ardour/send_ui.cc | 10 ---------- gtk2_ardour/send_ui.h | 1 - 6 files changed, 34 deletions(-) diff --git a/gtk2_ardour/port_insert_ui.cc b/gtk2_ardour/port_insert_ui.cc index 3c495f0e79..2a982eabc1 100644 --- a/gtk2_ardour/port_insert_ui.cc +++ b/gtk2_ardour/port_insert_ui.cc @@ -176,8 +176,6 @@ PortInsertWindow::PortInsertWindow (ARDOUR::Session* sess, boost::shared_ptrsignal_clicked().connect (sigc::mem_fun (*this, &PortInsertWindow::accept)); signal_delete_event().connect (sigc::mem_fun (*this, &PortInsertWindow::wm_delete), false); - - pi->DropReferences.connect (going_away_connection, invalidator (*this), boost::bind (&PortInsertWindow::plugin_going_away, this), gui_context()); } bool @@ -187,15 +185,6 @@ PortInsertWindow::wm_delete (GdkEventAny* /*event*/) return false; } -void -PortInsertWindow::plugin_going_away () -{ - ENSURE_GUI_THREAD (*this, &PortInsertWindow::plugin_going_away) - - going_away_connection.disconnect (); - delete_when_idle (this); -} - void PortInsertWindow::on_map () { diff --git a/gtk2_ardour/port_insert_ui.h b/gtk2_ardour/port_insert_ui.h index d130ea16be..75a4ad17c0 100644 --- a/gtk2_ardour/port_insert_ui.h +++ b/gtk2_ardour/port_insert_ui.h @@ -67,7 +67,6 @@ class PortInsertWindow : public ArdourDialog void cancel (); void accept (); - void plugin_going_away (); PBD::ScopedConnection going_away_connection; bool wm_delete (GdkEventAny*); diff --git a/gtk2_ardour/return_ui.cc b/gtk2_ardour/return_ui.cc index 775f283947..9e86abd171 100644 --- a/gtk2_ardour/return_ui.cc +++ b/gtk2_ardour/return_ui.cc @@ -110,19 +110,9 @@ ReturnUIWindow::ReturnUIWindow (boost::shared_ptr r, ARDOUR::Session* s) set_name ("ReturnUIWindow"); - r->DropReferences.connect (going_away_connection, invalidator (*this), boost::bind (&ReturnUIWindow::return_going_away, this), gui_context()); } ReturnUIWindow::~ReturnUIWindow () { delete ui; } - -void -ReturnUIWindow::return_going_away () -{ - ENSURE_GUI_THREAD (*this, &ReturnUIWindow::return_going_away) - going_away_connection.disconnect (); - delete_when_idle (this); -} - diff --git a/gtk2_ardour/return_ui.h b/gtk2_ardour/return_ui.h index ab10e1f566..353985110d 100644 --- a/gtk2_ardour/return_ui.h +++ b/gtk2_ardour/return_ui.h @@ -68,7 +68,6 @@ class ReturnUIWindow : public ArdourWindow private: Gtk::HBox hpacker; - void return_going_away (); PBD::ScopedConnection going_away_connection; }; diff --git a/gtk2_ardour/send_ui.cc b/gtk2_ardour/send_ui.cc index 5b7bd10750..019307fd16 100644 --- a/gtk2_ardour/send_ui.cc +++ b/gtk2_ardour/send_ui.cc @@ -133,19 +133,9 @@ SendUIWindow::SendUIWindow (boost::shared_ptr s, Session* session) ui->show (); hpacker.show (); - s->DropReferences.connect (going_away_connection, invalidator (*this), boost::bind (&SendUIWindow::send_going_away, this), gui_context()); } SendUIWindow::~SendUIWindow () { delete ui; } - -void -SendUIWindow::send_going_away () -{ - ENSURE_GUI_THREAD (*this, &SendUIWindow::send_going_away) - going_away_connection.disconnect (); - delete_when_idle (this); -} - diff --git a/gtk2_ardour/send_ui.h b/gtk2_ardour/send_ui.h index 9f423bd6fe..731f079790 100644 --- a/gtk2_ardour/send_ui.h +++ b/gtk2_ardour/send_ui.h @@ -69,7 +69,6 @@ class SendUIWindow : public ArdourWindow private: Gtk::HBox hpacker; - void send_going_away (); PBD::ScopedConnection going_away_connection; }; -- cgit v1.2.3