permit sends to show up in processor box, by handling delete event and sending Finished from IOSelectorWindow
git-svn-id: svn://localhost/ardour2/branches/3.0@5659 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
265cf739b5
commit
3023d53d7d
|
@ -165,9 +165,18 @@ IOSelectorWindow::IOSelectorWindow (ARDOUR::Session& session, boost::shared_ptr<
|
||||||
|
|
||||||
show_all ();
|
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
|
void
|
||||||
IOSelectorWindow::on_map ()
|
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));
|
ok_button.signal_clicked().connect (mem_fun (*this, &PortInsertWindow::accept));
|
||||||
cancel_button.signal_clicked().connect (mem_fun (*this, &PortInsertWindow::cancel));
|
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));
|
going_away_connection = pi->GoingAway.connect (mem_fun (*this, &PortInsertWindow::plugin_going_away));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
PortInsertWindow::wm_delete (GdkEventAny* /*event*/)
|
||||||
|
{
|
||||||
|
accept ();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PortInsertWindow::plugin_going_away ()
|
PortInsertWindow::plugin_going_away ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,6 +85,7 @@ class IOSelectorWindow : public Gtk::Window
|
||||||
IOSelector _selector;
|
IOSelector _selector;
|
||||||
|
|
||||||
void io_name_changed (void *src);
|
void io_name_changed (void *src);
|
||||||
|
bool wm_delete (GdkEventAny*);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -122,6 +123,8 @@ class PortInsertWindow : public ArdourDialog
|
||||||
|
|
||||||
void plugin_going_away ();
|
void plugin_going_away ();
|
||||||
sigc::connection going_away_connection;
|
sigc::connection going_away_connection;
|
||||||
|
|
||||||
|
bool wm_delete (GdkEventAny*);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -672,17 +672,25 @@ ProcessorBox::choose_send ()
|
||||||
return;
|
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);
|
IOSelectorWindow *ios = new IOSelectorWindow (_session, send->output(), true);
|
||||||
ios->show_all ();
|
ios->show_all ();
|
||||||
|
|
||||||
/* keep a reference to the send so it doesn't get deleted while
|
/* 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;
|
_processor_being_created = send;
|
||||||
|
|
||||||
ios->selector().Finished.connect (bind (
|
ios->selector().Finished.connect (bind (
|
||||||
mem_fun(*this, &ProcessorBox::send_io_finished),
|
mem_fun(*this, &ProcessorBox::send_io_finished),
|
||||||
boost::weak_ptr<Processor>(send), ios));
|
boost::weak_ptr<Processor>(send), ios));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue
Block a user