2005-09-25 14:42:24 -04:00
|
|
|
/*
|
2007-10-12 20:58:03 -04:00
|
|
|
Copyright (C) 2002-2007 Paul Davis
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
#include <glibmm/objectbase.h>
|
2005-09-25 16:33:00 -04:00
|
|
|
#include <gtkmm2ext/doi.h>
|
2007-10-10 14:37:13 -04:00
|
|
|
#include <ardour/port_insert.h>
|
|
|
|
#include "ardour/session.h"
|
|
|
|
#include "ardour/io.h"
|
|
|
|
#include "ardour/audioengine.h"
|
2007-10-12 08:13:11 -04:00
|
|
|
#include "ardour/track.h"
|
2007-10-12 10:49:07 -04:00
|
|
|
#include "ardour/audio_track.h"
|
|
|
|
#include "ardour/midi_track.h"
|
|
|
|
#include "ardour/data_type.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
#include "io_selector.h"
|
2007-10-10 14:37:13 -04:00
|
|
|
#include "utils.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
#include "gui_thread.h"
|
|
|
|
#include "i18n.h"
|
|
|
|
|
2007-10-19 09:30:07 -04:00
|
|
|
IOSelector::IOSelector (ARDOUR::Session& session, boost::shared_ptr<ARDOUR::IO> io, bool offer_inputs)
|
|
|
|
: PortMatrix (
|
|
|
|
session, io->default_type(), offer_inputs,
|
|
|
|
PortGroupList::Mask (PortGroupList::BUSS | PortGroupList::SYSTEM | PortGroupList::OTHER)
|
|
|
|
),
|
|
|
|
_io (io)
|
2007-10-12 20:58:03 -04:00
|
|
|
{
|
2007-10-19 09:30:07 -04:00
|
|
|
/* Listen for ports changing on the IO */
|
|
|
|
if (!offer_inputs) {
|
|
|
|
_io->input_changed.connect (mem_fun(*this, &IOSelector::ports_changed));
|
2007-10-12 20:58:03 -04:00
|
|
|
} else {
|
2007-10-19 09:30:07 -04:00
|
|
|
_io->output_changed.connect (mem_fun(*this, &IOSelector::ports_changed));
|
2007-10-12 20:58:03 -04:00
|
|
|
}
|
2008-04-11 10:06:50 -04:00
|
|
|
|
|
|
|
#ifdef FIXME
|
|
|
|
/* these got lost in a merge from 2.0 */
|
|
|
|
set_button_sensitivity ();
|
|
|
|
io->name_changed.connect (mem_fun(*this, &IOSelector::name_changed));
|
|
|
|
#endif
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-10-31 19:56:09 -05:00
|
|
|
void
|
2007-10-19 09:30:07 -04:00
|
|
|
IOSelector::ports_changed (ARDOUR::IOChange change, void *src)
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
2007-10-19 09:30:07 -04:00
|
|
|
ENSURE_GUI_THREAD (bind (mem_fun (*this, &IOSelector::ports_changed), change, src));
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-19 09:30:07 -04:00
|
|
|
redisplay ();
|
2007-10-10 14:37:13 -04:00
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
void
|
2007-10-19 09:30:07 -04:00
|
|
|
IOSelector::set_state (int r, std::string const & p, bool s)
|
2007-10-10 14:37:13 -04:00
|
|
|
{
|
2007-10-19 09:30:07 -04:00
|
|
|
if (s) {
|
|
|
|
if (!_offer_inputs) {
|
|
|
|
_io->connect_input (_io->input(r), p, 0);
|
|
|
|
} else {
|
|
|
|
_io->connect_output (_io->output(r), p, 0);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (!_offer_inputs) {
|
|
|
|
_io->disconnect_input (_io->input(r), p, 0);
|
|
|
|
} else {
|
|
|
|
_io->disconnect_output (_io->output(r), p, 0);
|
|
|
|
}
|
|
|
|
}
|
2007-10-10 14:37:13 -04:00
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-12 08:13:11 -04:00
|
|
|
bool
|
2007-10-19 09:30:07 -04:00
|
|
|
IOSelector::get_state (int r, std::string const & p) const
|
2007-10-10 14:37:13 -04:00
|
|
|
{
|
2007-10-31 14:24:43 -04:00
|
|
|
vector<string> connections;
|
|
|
|
|
|
|
|
if (_offer_inputs) {
|
|
|
|
_io->output(r)->get_connections (connections);
|
|
|
|
} else {
|
|
|
|
_io->input(r)->get_connections (connections);
|
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-19 09:30:07 -04:00
|
|
|
int k = 0;
|
2007-10-31 14:24:43 -04:00
|
|
|
for (vector<string>::iterator i = connections.begin(); i != connections.end(); ++i) {
|
|
|
|
|
|
|
|
if ((*i)== p) {
|
2007-10-19 09:30:07 -04:00
|
|
|
return true;
|
2007-10-12 08:13:11 -04:00
|
|
|
}
|
2007-10-31 14:24:43 -04:00
|
|
|
|
2007-10-19 09:30:07 -04:00
|
|
|
++k;
|
2007-10-13 06:38:26 -04:00
|
|
|
}
|
2006-11-19 11:45:16 -05:00
|
|
|
|
2007-10-19 09:30:07 -04:00
|
|
|
return false;
|
2007-10-10 14:37:13 -04:00
|
|
|
}
|
2006-11-19 11:45:16 -05:00
|
|
|
|
2007-10-19 09:30:07 -04:00
|
|
|
uint32_t
|
|
|
|
IOSelector::n_rows () const
|
2007-10-10 14:37:13 -04:00
|
|
|
{
|
2007-10-19 09:30:07 -04:00
|
|
|
if (!_offer_inputs) {
|
|
|
|
return _io->inputs().num_ports (_io->default_type());
|
|
|
|
} else {
|
|
|
|
return _io->outputs().num_ports (_io->default_type());
|
2007-10-12 08:13:11 -04:00
|
|
|
}
|
2007-10-12 20:58:03 -04:00
|
|
|
}
|
2006-11-19 11:45:16 -05:00
|
|
|
|
2007-10-19 09:30:07 -04:00
|
|
|
uint32_t
|
|
|
|
IOSelector::maximum_rows () const
|
2007-10-12 20:58:03 -04:00
|
|
|
{
|
2007-10-19 09:30:07 -04:00
|
|
|
if (!_offer_inputs) {
|
|
|
|
return _io->input_maximum ().get (_io->default_type());
|
|
|
|
} else {
|
|
|
|
return _io->output_maximum ().get (_io->default_type());
|
2005-10-31 19:56:09 -05:00
|
|
|
}
|
2007-10-12 20:58:03 -04:00
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
|
2007-10-19 09:30:07 -04:00
|
|
|
uint32_t
|
|
|
|
IOSelector::minimum_rows () const
|
2007-10-12 20:58:03 -04:00
|
|
|
{
|
2007-10-19 09:30:07 -04:00
|
|
|
if (!_offer_inputs) {
|
|
|
|
return _io->input_minimum ().get (_io->default_type());
|
|
|
|
} else {
|
|
|
|
return _io->output_minimum ().get (_io->default_type());
|
2007-10-13 07:07:47 -04:00
|
|
|
}
|
2007-10-12 20:58:03 -04:00
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-19 09:30:07 -04:00
|
|
|
std::string
|
|
|
|
IOSelector::row_name (int r) const
|
2007-10-12 20:58:03 -04:00
|
|
|
{
|
2007-10-19 09:30:07 -04:00
|
|
|
if (!_offer_inputs) {
|
|
|
|
return _io->input(r)->name();
|
2007-10-12 20:58:03 -04:00
|
|
|
} else {
|
2007-10-19 09:30:07 -04:00
|
|
|
return _io->output(r)->name();
|
2006-11-19 11:45:16 -05:00
|
|
|
}
|
2007-10-19 09:30:07 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2007-10-19 09:30:07 -04:00
|
|
|
IOSelector::add_row ()
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
2006-08-11 03:15:30 -04:00
|
|
|
// The IO selector only works for single typed IOs
|
2007-10-12 20:58:03 -04:00
|
|
|
const ARDOUR::DataType t = _io->default_type ();
|
2006-08-11 03:15:30 -04:00
|
|
|
|
2007-10-19 09:30:07 -04:00
|
|
|
if (!_offer_inputs) {
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
try {
|
2007-10-10 14:37:13 -04:00
|
|
|
_io->add_input_port ("", this);
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
catch (ARDOUR::AudioEngine::PortRegistrationFailure& err) {
|
|
|
|
Gtk::MessageDialog msg (0, _("There are no more JACK ports available."));
|
2006-03-05 14:39:16 -05:00
|
|
|
msg.run ();
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
try {
|
2007-10-10 14:37:13 -04:00
|
|
|
_io->add_output_port ("", this);
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
catch (ARDOUR::AudioEngine::PortRegistrationFailure& err) {
|
|
|
|
Gtk::MessageDialog msg (0, _("There are no more JACK ports available."));
|
2006-03-05 14:39:16 -05:00
|
|
|
msg.run ();
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-10-19 09:30:07 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void
|
2007-10-19 09:30:07 -04:00
|
|
|
IOSelector::remove_row (int r)
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
2006-08-11 03:15:30 -04:00
|
|
|
// The IO selector only works for single typed IOs
|
2007-10-12 20:58:03 -04:00
|
|
|
const ARDOUR::DataType t = _io->default_type ();
|
2006-11-19 11:45:16 -05:00
|
|
|
|
2007-10-19 09:30:07 -04:00
|
|
|
if (!_offer_inputs) {
|
2007-10-12 20:58:03 -04:00
|
|
|
_io->remove_input_port (_io->input (r), this);
|
2007-10-10 14:37:13 -04:00
|
|
|
} else {
|
2007-10-12 20:58:03 -04:00
|
|
|
_io->remove_output_port (_io->output (r), this);
|
2005-10-31 19:56:09 -05:00
|
|
|
}
|
2007-10-10 14:37:13 -04:00
|
|
|
}
|
2005-10-31 19:56:09 -05:00
|
|
|
|
2007-10-12 08:13:11 -04:00
|
|
|
std::string
|
2007-10-19 09:30:07 -04:00
|
|
|
IOSelector::row_descriptor () const
|
2007-10-12 08:13:11 -04:00
|
|
|
{
|
2007-10-19 09:30:07 -04:00
|
|
|
return _("port");
|
2007-10-12 08:13:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-10-19 09:30:07 -04:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
IOSelectorWindow::IOSelectorWindow (
|
|
|
|
ARDOUR::Session& session, boost::shared_ptr<ARDOUR::IO> io, bool for_input, bool can_cancel
|
|
|
|
)
|
|
|
|
: ArdourDialog ("I/O selector"),
|
2007-10-19 09:30:07 -04:00
|
|
|
_selector (session, io, !for_input),
|
2007-10-10 14:37:13 -04:00
|
|
|
ok_button (can_cancel ? _("OK"): _("Close")),
|
|
|
|
cancel_button (_("Cancel")),
|
|
|
|
rescan_button (_("Rescan"))
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
{
|
|
|
|
add_events (Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK);
|
|
|
|
set_name ("IOSelectorWindow2");
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
string title;
|
|
|
|
if (for_input) {
|
|
|
|
title = string_compose(_("%1 input"), io->name());
|
|
|
|
} else {
|
|
|
|
title = string_compose(_("%1 output"), io->name());
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
ok_button.set_name ("IOSelectorButton");
|
|
|
|
if (!can_cancel) {
|
|
|
|
ok_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::CLOSE, Gtk::ICON_SIZE_BUTTON)));
|
|
|
|
}
|
|
|
|
cancel_button.set_name ("IOSelectorButton");
|
|
|
|
rescan_button.set_name ("IOSelectorButton");
|
|
|
|
rescan_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::REFRESH, Gtk::ICON_SIZE_BUTTON)));
|
|
|
|
|
|
|
|
get_action_area()->pack_start (rescan_button, false, false);
|
|
|
|
|
|
|
|
if (can_cancel) {
|
|
|
|
cancel_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::CANCEL, Gtk::ICON_SIZE_BUTTON)));
|
|
|
|
get_action_area()->pack_start (cancel_button, false, false);
|
|
|
|
} else {
|
|
|
|
cancel_button.hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
get_action_area()->pack_start (ok_button, false, false);
|
2005-10-31 19:56:09 -05:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
get_vbox()->set_spacing (8);
|
|
|
|
get_vbox()->pack_start (_selector);
|
|
|
|
|
|
|
|
ok_button.signal_clicked().connect (mem_fun(*this, &IOSelectorWindow::accept));
|
|
|
|
cancel_button.signal_clicked().connect (mem_fun(*this, &IOSelectorWindow::cancel));
|
|
|
|
rescan_button.signal_clicked().connect (mem_fun(*this, &IOSelectorWindow::rescan));
|
2006-11-19 11:45:16 -05:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
set_title (title);
|
|
|
|
set_position (Gtk::WIN_POS_MOUSE);
|
2006-11-19 11:45:16 -05:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
show_all ();
|
2006-11-19 11:45:16 -05:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
|
|
|
|
}
|
2006-11-19 11:45:16 -05:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
IOSelectorWindow::~IOSelectorWindow()
|
|
|
|
{
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
}
|
2006-11-19 11:45:16 -05:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
void
|
|
|
|
IOSelectorWindow::rescan ()
|
|
|
|
{
|
|
|
|
_selector.redisplay ();
|
|
|
|
}
|
2006-11-19 11:45:16 -05:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
void
|
|
|
|
IOSelectorWindow::cancel ()
|
|
|
|
{
|
|
|
|
_selector.Finished (IOSelector::Cancelled);
|
|
|
|
hide ();
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2007-10-10 14:37:13 -04:00
|
|
|
IOSelectorWindow::accept ()
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
2007-10-10 14:37:13 -04:00
|
|
|
_selector.Finished (IOSelector::Accepted);
|
|
|
|
hide ();
|
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
void
|
|
|
|
IOSelectorWindow::on_map ()
|
|
|
|
{
|
|
|
|
_selector.redisplay ();
|
|
|
|
Window::on_map ();
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
|
|
|
|
PortInsertUI::PortInsertUI (ARDOUR::Session& sess, boost::shared_ptr<ARDOUR::PortInsert> pi)
|
2007-06-23 16:13:13 -04:00
|
|
|
: input_selector (sess, pi->io(), true),
|
|
|
|
output_selector (sess, pi->io(), false)
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
|
|
|
hbox.pack_start (output_selector, true, true);
|
|
|
|
hbox.pack_start (input_selector, true, true);
|
|
|
|
|
|
|
|
pack_start (hbox);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2007-10-10 14:37:13 -04:00
|
|
|
PortInsertUI::redisplay ()
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
|
|
|
input_selector.redisplay();
|
|
|
|
output_selector.redisplay();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2007-10-10 14:37:13 -04:00
|
|
|
PortInsertUI::finished (IOSelector::Result r)
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
|
|
|
input_selector.Finished (r);
|
|
|
|
output_selector.Finished (r);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
PortInsertWindow::PortInsertWindow (ARDOUR::Session& sess, boost::shared_ptr<ARDOUR::PortInsert> pi, bool can_cancel)
|
2005-09-25 14:42:24 -04:00
|
|
|
: ArdourDialog ("port insert dialog"),
|
2006-07-27 21:08:57 -04:00
|
|
|
_portinsertui (sess, pi),
|
2005-09-25 14:42:24 -04:00
|
|
|
ok_button (can_cancel ? _("OK"): _("Close")),
|
|
|
|
cancel_button (_("Cancel")),
|
|
|
|
rescan_button (_("Rescan"))
|
|
|
|
{
|
|
|
|
|
|
|
|
set_name ("IOSelectorWindow");
|
|
|
|
string title = _("ardour: ");
|
2006-07-27 21:08:57 -04:00
|
|
|
title += pi->name();
|
2005-09-25 14:42:24 -04:00
|
|
|
set_title (title);
|
|
|
|
|
|
|
|
ok_button.set_name ("IOSelectorButton");
|
2007-10-10 14:37:13 -04:00
|
|
|
if (!can_cancel) {
|
|
|
|
ok_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::CLOSE, Gtk::ICON_SIZE_BUTTON)));
|
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
cancel_button.set_name ("IOSelectorButton");
|
|
|
|
rescan_button.set_name ("IOSelectorButton");
|
2007-10-10 14:37:13 -04:00
|
|
|
rescan_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::REFRESH, Gtk::ICON_SIZE_BUTTON)));
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
get_action_area()->pack_start (rescan_button, false, false);
|
2005-09-25 14:42:24 -04:00
|
|
|
if (can_cancel) {
|
2007-10-10 14:37:13 -04:00
|
|
|
cancel_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::CANCEL, Gtk::ICON_SIZE_BUTTON)));
|
|
|
|
get_action_area()->pack_start (cancel_button, false, false);
|
|
|
|
} else {
|
2005-09-25 14:42:24 -04:00
|
|
|
cancel_button.hide();
|
|
|
|
}
|
2007-10-10 14:37:13 -04:00
|
|
|
get_action_area()->pack_start (ok_button, false, false);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-03-05 05:24:31 -05:00
|
|
|
get_vbox()->pack_start (_portinsertui);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
ok_button.signal_clicked().connect (mem_fun (*this, &PortInsertWindow::accept));
|
|
|
|
cancel_button.signal_clicked().connect (mem_fun (*this, &PortInsertWindow::cancel));
|
|
|
|
rescan_button.signal_clicked().connect (mem_fun (*this, &PortInsertWindow::rescan));
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-10-09 01:03:29 -04:00
|
|
|
signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
|
2007-04-12 19:20:37 -04:00
|
|
|
|
2007-10-10 14:37:13 -04:00
|
|
|
going_away_connection = pi->GoingAway.connect (mem_fun (*this, &PortInsertWindow::plugin_going_away));
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2006-08-29 17:21:48 -04:00
|
|
|
PortInsertWindow::plugin_going_away ()
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
2007-10-10 14:37:13 -04:00
|
|
|
ENSURE_GUI_THREAD (mem_fun (*this, &PortInsertWindow::plugin_going_away));
|
|
|
|
|
2007-04-12 19:20:37 -04:00
|
|
|
going_away_connection.disconnect ();
|
2005-09-25 14:42:24 -04:00
|
|
|
delete_when_idle (this);
|
|
|
|
}
|
|
|
|
|
2005-10-31 19:56:09 -05:00
|
|
|
void
|
|
|
|
PortInsertWindow::on_map ()
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
|
|
|
_portinsertui.redisplay ();
|
2005-10-31 19:56:09 -05:00
|
|
|
Window::on_map ();
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
PortInsertWindow::rescan ()
|
|
|
|
{
|
2007-10-10 14:37:13 -04:00
|
|
|
_portinsertui.redisplay ();
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
PortInsertWindow::cancel ()
|
|
|
|
{
|
2007-10-10 14:37:13 -04:00
|
|
|
_portinsertui.finished (IOSelector::Cancelled);
|
2005-09-25 14:42:24 -04:00
|
|
|
hide ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
PortInsertWindow::accept ()
|
|
|
|
{
|
2007-10-10 14:37:13 -04:00
|
|
|
_portinsertui.finished (IOSelector::Accepted);
|
2005-09-25 14:42:24 -04:00
|
|
|
hide ();
|
|
|
|
}
|