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
|
@ -471,7 +471,7 @@ deps = \
|
|||
{
|
||||
'glib-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',
|
||||
'samplerate' : '0.1.0',
|
||||
'raptor' : '1.4.2',
|
||||
|
@ -595,7 +595,7 @@ else:
|
|||
if env['LV2']:
|
||||
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'].ParseConfig('pkg-config --cflags --libs slv2')
|
||||
env.Append (CCFLAGS="-DHAVE_LV2")
|
||||
|
|
|
@ -40,19 +40,36 @@ using namespace ARDOUR;
|
|||
using namespace Gtk;
|
||||
|
||||
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)
|
||||
: PortMatrix (session, io->default_type(), offer_inputs,
|
||||
PortGroupList::Mask (PortGroupList::BUSS |
|
||||
PortGroupList::SYSTEM |
|
||||
PortGroupList::OTHER))
|
||||
, _io (io)
|
||||
{
|
||||
list<string> our_ports;
|
||||
|
||||
/* Listen for ports changing on the IO */
|
||||
if (_offer_inputs) {
|
||||
_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 {
|
||||
_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
|
||||
|
@ -204,16 +221,14 @@ IOSelector::row_descriptor () const
|
|||
return _("port");
|
||||
}
|
||||
|
||||
IOSelectorWindow::IOSelectorWindow (
|
||||
ARDOUR::Session& session, boost::shared_ptr<ARDOUR::IO> io, bool for_input, bool can_cancel
|
||||
)
|
||||
: ArdourDialog ("I/O selector"),
|
||||
_selector (session, io, !for_input),
|
||||
add_button (_("Add Port")),
|
||||
disconnect_button (_("Disconnect All")),
|
||||
ok_button (can_cancel ? _("OK"): _("Close")),
|
||||
cancel_button (_("Cancel")),
|
||||
rescan_button (_("Rescan"))
|
||||
IOSelectorWindow::IOSelectorWindow (ARDOUR::Session& session, boost::shared_ptr<ARDOUR::IO> io, bool for_input, bool can_cancel)
|
||||
: ArdourDialog ("I/O selector")
|
||||
, _selector (session, io, !for_input)
|
||||
, add_button (_("Add Port"))
|
||||
, disconnect_button (_("Disconnect All"))
|
||||
, ok_button (can_cancel ? _("OK"): _("Close"))
|
||||
, cancel_button (_("Cancel"))
|
||||
, rescan_button (_("Rescan"))
|
||||
|
||||
{
|
||||
add_events (Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK);
|
||||
|
|
|
@ -50,6 +50,14 @@ Matrix::add_group (PortGroup& pg)
|
|||
reset_size ();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Matrix::clear ()
|
||||
{
|
||||
others.clear ();
|
||||
reset_size ();
|
||||
}
|
||||
|
||||
void
|
||||
Matrix::remove_group (PortGroup& pg)
|
||||
{
|
||||
|
@ -118,7 +126,20 @@ Matrix::reset_size ()
|
|||
++visible_others;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
|
||||
if (alloc_width > line_width) {
|
||||
|
@ -182,6 +203,18 @@ Matrix::reset_size ()
|
|||
labels_x_shift = (int) ceil (w);
|
||||
|
||||
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
|
||||
|
|
|
@ -59,6 +59,7 @@ class Matrix : public Gtk::EventBox
|
|||
void remove_group (PortGroup&);
|
||||
void hide_group (PortGroup&);
|
||||
void show_group (PortGroup&);
|
||||
void clear ();
|
||||
|
||||
int row_spacing () const { return xstep; }
|
||||
|
||||
|
|
|
@ -144,6 +144,12 @@ PortMatrix::~PortMatrix ()
|
|||
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 */
|
||||
void
|
||||
PortMatrix::clear ()
|
||||
|
@ -244,13 +250,17 @@ PortMatrix::setup ()
|
|||
_side_vbox.pack_start (*_side_vbox_pad, false, false);
|
||||
}
|
||||
|
||||
matrix.clear ();
|
||||
|
||||
/* Checkbutton tables and visibility checkbuttons */
|
||||
for (PortGroupList::iterator i = _port_group_list.begin(); i != _port_group_list.end(); ++i) {
|
||||
|
||||
PortGroupUI* t = new PortGroupUI (*this, **i);
|
||||
|
||||
_port_group_ui.push_back (t);
|
||||
|
||||
|
||||
matrix.add_group (**i);
|
||||
|
||||
_visibility_checkbutton_box.pack_start (t->get_visibility_checkbutton(), false, false);
|
||||
|
||||
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 ();
|
||||
|
||||
cerr << "Looking for arour routes\n";
|
||||
|
||||
for (ARDOUR::Session::RouteList::const_iterator i = routes->begin(); i != routes->end(); ++i) {
|
||||
|
||||
PortGroup* g = 0;
|
||||
|
@ -408,6 +420,8 @@ PortGroupList::refresh ()
|
|||
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 ?
|
||||
JackPortIsInput : JackPortIsOutput);
|
||||
if (ports) {
|
||||
|
@ -415,6 +429,8 @@ PortGroupList::refresh ()
|
|||
int n = 0;
|
||||
string client_matching_string;
|
||||
|
||||
cerr << "Got some\n";
|
||||
|
||||
client_matching_string = _session.engine().client_name();
|
||||
client_matching_string += ':';
|
||||
|
||||
|
@ -437,6 +453,11 @@ PortGroupList::refresh ()
|
|||
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 (&buss);
|
||||
push_back (&track);
|
||||
|
|
|
@ -70,6 +70,7 @@ class PortMatrix : public Gtk::VBox {
|
|||
protected:
|
||||
|
||||
bool _offer_inputs;
|
||||
void set_ports (const std::list<std::string>&);
|
||||
|
||||
private:
|
||||
PortGroupList _port_group_list;
|
||||
|
|
Loading…
Reference in New Issue