mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
bump required version of GTK, SLV2; basic fixups so that the new port-matrix io-selector actually shows up, even if its ugly and not working correctly
git-svn-id: svn://localhost/ardour2/branches/3.0@4322 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
7b5e8bf0f7
commit
18d6284438
6 changed files with 91 additions and 20 deletions
|
|
@ -471,7 +471,7 @@ deps = \
|
||||||
{
|
{
|
||||||
'glib-2.0' : '2.10.1',
|
'glib-2.0' : '2.10.1',
|
||||||
'gthread-2.0' : '2.10.1',
|
'gthread-2.0' : '2.10.1',
|
||||||
'gtk+-2.0' : '2.8.1',
|
'gtk+-2.0' : '2.12.1',
|
||||||
'libxml-2.0' : '2.6.0',
|
'libxml-2.0' : '2.6.0',
|
||||||
'samplerate' : '0.1.0',
|
'samplerate' : '0.1.0',
|
||||||
'raptor' : '1.4.2',
|
'raptor' : '1.4.2',
|
||||||
|
|
@ -595,7 +595,7 @@ else:
|
||||||
if env['LV2']:
|
if env['LV2']:
|
||||||
conf = env.Configure(custom_tests = { 'CheckPKGVersion' : CheckPKGVersion})
|
conf = env.Configure(custom_tests = { 'CheckPKGVersion' : CheckPKGVersion})
|
||||||
|
|
||||||
if conf.CheckPKGVersion('slv2', '0.6.1'):
|
if conf.CheckPKGVersion('slv2', '0.6.2'):
|
||||||
libraries['slv2'] = LibraryInfo()
|
libraries['slv2'] = LibraryInfo()
|
||||||
libraries['slv2'].ParseConfig('pkg-config --cflags --libs slv2')
|
libraries['slv2'].ParseConfig('pkg-config --cflags --libs slv2')
|
||||||
env.Append (CCFLAGS="-DHAVE_LV2")
|
env.Append (CCFLAGS="-DHAVE_LV2")
|
||||||
|
|
|
||||||
|
|
@ -40,19 +40,36 @@ using namespace ARDOUR;
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
|
|
||||||
IOSelector::IOSelector (ARDOUR::Session& session, boost::shared_ptr<ARDOUR::IO> io, bool offer_inputs)
|
IOSelector::IOSelector (ARDOUR::Session& session, boost::shared_ptr<ARDOUR::IO> io, bool offer_inputs)
|
||||||
: PortMatrix (
|
: PortMatrix (session, io->default_type(), offer_inputs,
|
||||||
session, io->default_type(), offer_inputs,
|
PortGroupList::Mask (PortGroupList::BUSS |
|
||||||
PortGroupList::Mask (PortGroupList::BUSS |
|
PortGroupList::SYSTEM |
|
||||||
PortGroupList::SYSTEM |
|
PortGroupList::OTHER))
|
||||||
PortGroupList::OTHER)),
|
, _io (io)
|
||||||
_io (io)
|
|
||||||
{
|
{
|
||||||
|
list<string> our_ports;
|
||||||
|
|
||||||
/* Listen for ports changing on the IO */
|
/* Listen for ports changing on the IO */
|
||||||
if (_offer_inputs) {
|
if (_offer_inputs) {
|
||||||
_io->output_changed.connect (mem_fun(*this, &IOSelector::ports_changed));
|
_io->output_changed.connect (mem_fun(*this, &IOSelector::ports_changed));
|
||||||
|
|
||||||
|
const PortSet& ps (_io->outputs());
|
||||||
|
|
||||||
|
for (PortSet::const_iterator i = ps.begin(); i != ps.end(); ++i) {
|
||||||
|
our_ports.push_back ((*i).name());
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_io->input_changed.connect (mem_fun(*this, &IOSelector::ports_changed));
|
_io->input_changed.connect (mem_fun(*this, &IOSelector::ports_changed));
|
||||||
|
|
||||||
|
const PortSet& ps (_io->inputs());
|
||||||
|
|
||||||
|
for (PortSet::const_iterator i = ps.begin(); i != ps.end(); ++i) {
|
||||||
|
our_ports.push_back ((*i).name());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_ports (our_ports);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -204,16 +221,14 @@ IOSelector::row_descriptor () const
|
||||||
return _("port");
|
return _("port");
|
||||||
}
|
}
|
||||||
|
|
||||||
IOSelectorWindow::IOSelectorWindow (
|
IOSelectorWindow::IOSelectorWindow (ARDOUR::Session& session, boost::shared_ptr<ARDOUR::IO> io, bool for_input, bool can_cancel)
|
||||||
ARDOUR::Session& session, boost::shared_ptr<ARDOUR::IO> io, bool for_input, bool can_cancel
|
: ArdourDialog ("I/O selector")
|
||||||
)
|
, _selector (session, io, !for_input)
|
||||||
: ArdourDialog ("I/O selector"),
|
, add_button (_("Add Port"))
|
||||||
_selector (session, io, !for_input),
|
, disconnect_button (_("Disconnect All"))
|
||||||
add_button (_("Add Port")),
|
, ok_button (can_cancel ? _("OK"): _("Close"))
|
||||||
disconnect_button (_("Disconnect All")),
|
, cancel_button (_("Cancel"))
|
||||||
ok_button (can_cancel ? _("OK"): _("Close")),
|
, rescan_button (_("Rescan"))
|
||||||
cancel_button (_("Cancel")),
|
|
||||||
rescan_button (_("Rescan"))
|
|
||||||
|
|
||||||
{
|
{
|
||||||
add_events (Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK);
|
add_events (Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK);
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,14 @@ Matrix::add_group (PortGroup& pg)
|
||||||
reset_size ();
|
reset_size ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
Matrix::clear ()
|
||||||
|
{
|
||||||
|
others.clear ();
|
||||||
|
reset_size ();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Matrix::remove_group (PortGroup& pg)
|
Matrix::remove_group (PortGroup& pg)
|
||||||
{
|
{
|
||||||
|
|
@ -119,6 +127,19 @@ Matrix::reset_size ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!visible_others) {
|
||||||
|
cerr << "There are no visible others!\n";
|
||||||
|
xstep = 1;
|
||||||
|
ystep = 1;
|
||||||
|
line_width = 1;
|
||||||
|
line_height = 1;
|
||||||
|
border = 10;
|
||||||
|
arc_radius = 3;
|
||||||
|
labels_x_shift = 0;
|
||||||
|
labels_y_shift = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
border = 10;
|
border = 10;
|
||||||
|
|
||||||
if (alloc_width > line_width) {
|
if (alloc_width > line_width) {
|
||||||
|
|
@ -182,6 +203,18 @@ Matrix::reset_size ()
|
||||||
labels_x_shift = (int) ceil (w);
|
labels_x_shift = (int) ceil (w);
|
||||||
|
|
||||||
setup_nodes ();
|
setup_nodes ();
|
||||||
|
|
||||||
|
|
||||||
|
cerr << "Based on ours = " << ours.size() << " others = " << others.size()
|
||||||
|
<< " dimens = "
|
||||||
|
<< " xstep " << xstep << endl
|
||||||
|
<< " ystep " << ystep << endl
|
||||||
|
<< " line_width " << line_width << endl
|
||||||
|
<< " line_height " << line_height << endl
|
||||||
|
<< " border " << border << endl
|
||||||
|
<< " arc_radius " << arc_radius << endl
|
||||||
|
<< " labels_x_shift " << labels_x_shift << endl
|
||||||
|
<< " labels_y_shift " << labels_y_shift << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ class Matrix : public Gtk::EventBox
|
||||||
void remove_group (PortGroup&);
|
void remove_group (PortGroup&);
|
||||||
void hide_group (PortGroup&);
|
void hide_group (PortGroup&);
|
||||||
void show_group (PortGroup&);
|
void show_group (PortGroup&);
|
||||||
|
void clear ();
|
||||||
|
|
||||||
int row_spacing () const { return xstep; }
|
int row_spacing () const { return xstep; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,12 @@ PortMatrix::~PortMatrix ()
|
||||||
clear ();
|
clear ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PortMatrix::set_ports (const std::list<std::string>& ports)
|
||||||
|
{
|
||||||
|
matrix.set_ports (ports);
|
||||||
|
}
|
||||||
|
|
||||||
/** Clear out the things that change when the number of source or destination ports changes */
|
/** Clear out the things that change when the number of source or destination ports changes */
|
||||||
void
|
void
|
||||||
PortMatrix::clear ()
|
PortMatrix::clear ()
|
||||||
|
|
@ -244,6 +250,8 @@ PortMatrix::setup ()
|
||||||
_side_vbox.pack_start (*_side_vbox_pad, false, false);
|
_side_vbox.pack_start (*_side_vbox_pad, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
matrix.clear ();
|
||||||
|
|
||||||
/* Checkbutton tables and visibility checkbuttons */
|
/* Checkbutton tables and visibility checkbuttons */
|
||||||
for (PortGroupList::iterator i = _port_group_list.begin(); i != _port_group_list.end(); ++i) {
|
for (PortGroupList::iterator i = _port_group_list.begin(); i != _port_group_list.end(); ++i) {
|
||||||
|
|
||||||
|
|
@ -251,6 +259,8 @@ PortMatrix::setup ()
|
||||||
|
|
||||||
_port_group_ui.push_back (t);
|
_port_group_ui.push_back (t);
|
||||||
|
|
||||||
|
matrix.add_group (**i);
|
||||||
|
|
||||||
_visibility_checkbutton_box.pack_start (t->get_visibility_checkbutton(), false, false);
|
_visibility_checkbutton_box.pack_start (t->get_visibility_checkbutton(), false, false);
|
||||||
|
|
||||||
CheckButton* chk = dynamic_cast<CheckButton*>(&t->get_visibility_checkbutton());
|
CheckButton* chk = dynamic_cast<CheckButton*>(&t->get_visibility_checkbutton());
|
||||||
|
|
@ -370,6 +380,8 @@ PortGroupList::refresh ()
|
||||||
|
|
||||||
boost::shared_ptr<ARDOUR::Session::RouteList> routes = _session.get_routes ();
|
boost::shared_ptr<ARDOUR::Session::RouteList> routes = _session.get_routes ();
|
||||||
|
|
||||||
|
cerr << "Looking for arour routes\n";
|
||||||
|
|
||||||
for (ARDOUR::Session::RouteList::const_iterator i = routes->begin(); i != routes->end(); ++i) {
|
for (ARDOUR::Session::RouteList::const_iterator i = routes->begin(); i != routes->end(); ++i) {
|
||||||
|
|
||||||
PortGroup* g = 0;
|
PortGroup* g = 0;
|
||||||
|
|
@ -408,6 +420,8 @@ PortGroupList::refresh ()
|
||||||
finding all the ports that we can connect to.
|
finding all the ports that we can connect to.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
cerr << "Looking for non-ardour ports\n";
|
||||||
|
|
||||||
const char **ports = _session.engine().get_ports ("", _type.to_jack_type(), _offer_inputs ?
|
const char **ports = _session.engine().get_ports ("", _type.to_jack_type(), _offer_inputs ?
|
||||||
JackPortIsInput : JackPortIsOutput);
|
JackPortIsInput : JackPortIsOutput);
|
||||||
if (ports) {
|
if (ports) {
|
||||||
|
|
@ -415,6 +429,8 @@ PortGroupList::refresh ()
|
||||||
int n = 0;
|
int n = 0;
|
||||||
string client_matching_string;
|
string client_matching_string;
|
||||||
|
|
||||||
|
cerr << "Got some\n";
|
||||||
|
|
||||||
client_matching_string = _session.engine().client_name();
|
client_matching_string = _session.engine().client_name();
|
||||||
client_matching_string += ':';
|
client_matching_string += ':';
|
||||||
|
|
||||||
|
|
@ -437,6 +453,11 @@ PortGroupList::refresh ()
|
||||||
free (ports);
|
free (ports);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cerr << "at end of refresh, we have " << buss.ports.size () << " buss\n";
|
||||||
|
cerr << "at end of refresh, we have " << track.ports.size () << " track\n";
|
||||||
|
cerr << "at end of refresh, we have " << system.ports.size () << " system\n";
|
||||||
|
cerr << "at end of refresh, we have " << other.ports.size () << " other\n";
|
||||||
|
|
||||||
push_back (&system);
|
push_back (&system);
|
||||||
push_back (&buss);
|
push_back (&buss);
|
||||||
push_back (&track);
|
push_back (&track);
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ class PortMatrix : public Gtk::VBox {
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
bool _offer_inputs;
|
bool _offer_inputs;
|
||||||
|
void set_ports (const std::list<std::string>&);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PortGroupList _port_group_list;
|
PortGroupList _port_group_list;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue