summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/io_selector.cc22
-rw-r--r--gtk2_ardour/io_selector.h3
-rw-r--r--gtk2_ardour/processor_box.cc12
3 files changed, 32 insertions, 5 deletions
diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc
index 963b03ba3f..430714f1ae 100644
--- a/gtk2_ardour/io_selector.cc
+++ b/gtk2_ardour/io_selector.cc
@@ -165,9 +165,18 @@ IOSelectorWindow::IOSelectorWindow (ARDOUR::Session& session, boost::shared_ptr<
show_all ();
- signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), this));
+ signal_delete_event().connect (mem_fun (*this, &IOSelectorWindow::wm_delete));
}
+bool
+IOSelectorWindow::wm_delete (GdkEventAny* /*event*/)
+{
+ _selector.Finished (IOSelector::Accepted);
+ hide ();
+ return true;
+}
+
+
void
IOSelectorWindow::on_map ()
{
@@ -256,11 +265,18 @@ PortInsertWindow::PortInsertWindow (ARDOUR::Session& sess, boost::shared_ptr<ARD
ok_button.signal_clicked().connect (mem_fun (*this, &PortInsertWindow::accept));
cancel_button.signal_clicked().connect (mem_fun (*this, &PortInsertWindow::cancel));
- signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
-
+ signal_delete_event().connect (mem_fun (*this, &PortInsertWindow::wm_delete), false);
+
going_away_connection = pi->GoingAway.connect (mem_fun (*this, &PortInsertWindow::plugin_going_away));
}
+bool
+PortInsertWindow::wm_delete (GdkEventAny* /*event*/)
+{
+ accept ();
+ return true;
+}
+
void
PortInsertWindow::plugin_going_away ()
{
diff --git a/gtk2_ardour/io_selector.h b/gtk2_ardour/io_selector.h
index 83050e2a5c..02a09a5196 100644
--- a/gtk2_ardour/io_selector.h
+++ b/gtk2_ardour/io_selector.h
@@ -85,6 +85,7 @@ class IOSelectorWindow : public Gtk::Window
IOSelector _selector;
void io_name_changed (void *src);
+ bool wm_delete (GdkEventAny*);
};
@@ -122,6 +123,8 @@ class PortInsertWindow : public ArdourDialog
void plugin_going_away ();
sigc::connection going_away_connection;
+
+ bool wm_delete (GdkEventAny*);
};
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index ecc24772af..ac60653c17 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -672,17 +672,25 @@ ProcessorBox::choose_send ()
return;
}
- /* let the user adjust the IO setup before creation */
+ /* let the user adjust the IO setup before creation.
+
+ Note: this dialog is NOT modal - we just leave it to run and it will
+ return when its Finished signal is emitted - typically when the window
+ is closed.
+ */
+
IOSelectorWindow *ios = new IOSelectorWindow (_session, send->output(), true);
ios->show_all ();
/* keep a reference to the send so it doesn't get deleted while
- the IOSelectorWindow is doing its stuff */
+ the IOSelectorWindow is doing its stuff
+ */
_processor_being_created = send;
ios->selector().Finished.connect (bind (
mem_fun(*this, &ProcessorBox::send_io_finished),
boost::weak_ptr<Processor>(send), ios));
+
}
void