X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fport_matrix_body.cc;h=66ed3ecc3e2c0cea55212f770ea8a05b45004c6e;hb=d314a510f67c2b072f856914d2a94b9748fb7e4e;hp=3d564319f841fe8b497966a7d3ac2dce96f21c4f;hpb=8387e1bff87e1bed31a807f993a001a967bca51a;p=ardour.git diff --git a/gtk2_ardour/port_matrix_body.cc b/gtk2_ardour/port_matrix_body.cc index 3d564319f8..66ed3ecc3e 100644 --- a/gtk2_ardour/port_matrix_body.cc +++ b/gtk2_ardour/port_matrix_body.cc @@ -28,7 +28,7 @@ #include "port_matrix_row_labels.h" #include "port_matrix_grid.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; @@ -43,7 +43,7 @@ PortMatrixBody::PortMatrixBody (PortMatrix* p) _ignore_component_size_changed (false) { _column_labels = new PortMatrixColumnLabels (p, this); - _row_labels = new PortMatrixRowLabels (p, this); + _row_labels = new PortMatrixRowLabels (p, this, *_column_labels); _grid = new PortMatrixGrid (p, this); _components.push_back (_column_labels); @@ -112,7 +112,7 @@ PortMatrixBody::on_expose_event (GdkEventExpose* event) r.intersect ((*i)->parent_rectangle(), intersects); if (intersects) { - + gdk_draw_drawable ( get_window()->gobj(), get_style()->get_fg_gc (Gtk::STATE_NORMAL)->gobj(), @@ -261,25 +261,25 @@ PortMatrixBody::setup () if (_matrix->visible_rows()) { PortGroup::BundleList r = _matrix->visible_rows()->bundles (); for (PortGroup::BundleList::iterator i = r.begin(); i != r.end(); ++i) { - + (*i)->bundle->Changed.connect (_bundle_connections, invalidator (*this), boost::bind (&PortMatrixBody::rebuild_and_draw_row_labels, this), gui_context()); - + } } - + if (_matrix->visible_columns()) { PortGroup::BundleList c = _matrix->visible_columns()->bundles (); for (PortGroup::BundleList::iterator i = c.begin(); i != c.end(); ++i) { (*i)->bundle->Changed.connect (_bundle_connections, invalidator (*this), boost::bind (&PortMatrixBody::rebuild_and_draw_column_labels, this), gui_context()); } } - + for (list::iterator i = _components.begin(); i != _components.end(); ++i) { (*i)->setup (); } set_mouseover (PortMatrixNode ()); - + _ignore_component_size_changed = true; compute_rectangles (); _ignore_component_size_changed = false; @@ -334,7 +334,7 @@ PortMatrixBody::on_button_press_event (GdkEventButton* ev) (*i)->button_press ( (*i)->parent_to_component_x (ev->x), (*i)->parent_to_component_y (ev->y), - ev->button, ev->time, ev->state + ev ); } } @@ -350,12 +350,12 @@ PortMatrixBody::on_button_release_event (GdkEventButton* ev) (*i)->button_release ( (*i)->parent_to_component_x (ev->x), (*i)->parent_to_component_y (ev->y), - ev->button, ev->time, ev->state + ev ); } else { (*i)->button_release ( -1, -1, - ev->button, ev->time, ev->state + ev ); } } @@ -398,7 +398,7 @@ bool PortMatrixBody::on_motion_notify_event (GdkEventMotion* ev) { bool done = false; - + for (list::iterator i = _components.begin(); i != _components.end(); ++i) { if (Gdk::Region ((*i)->parent_rectangle()).point_in (ev->x, ev->y)) { (*i)->motion ( @@ -409,7 +409,7 @@ PortMatrixBody::on_motion_notify_event (GdkEventMotion* ev) done = true; } } - + if (!done) { set_mouseover (PortMatrixNode ()); @@ -446,7 +446,7 @@ PortMatrixBody::set_mouseover (list const & n) list old = _mouseover; _mouseover = n; - + for (list::iterator i = _components.begin(); i != _components.end(); ++i) { (*i)->mouseover_changed (old); } @@ -458,7 +458,7 @@ PortMatrixBody::highlight_associated_channels (int dim, ARDOUR::BundleChannel h) ARDOUR::BundleChannel bc[2]; bc[dim] = h; - if (!bc[dim].bundle) { + if (!PortMatrix::bundle_with_channels (bc[dim].bundle)) { return; } @@ -471,7 +471,7 @@ PortMatrixBody::highlight_associated_channels (int dim, ARDOUR::BundleChannel h) PortGroup::BundleList const b = _matrix->visible_ports(1 - dim)->bundles (); for (PortGroup::BundleList::const_iterator i = b.begin(); i != b.end(); ++i) { - for (uint32_t j = 0; j < (*i)->bundle->nchannels().n_total(); ++j) { + for (uint32_t j = 0; j < (*i)->bundle->nchannels().n_total(); ++j) { if (!_matrix->should_show ((*i)->bundle->channel_type(j))) { continue; @@ -507,7 +507,7 @@ PortMatrixBody::component_size_changed () if (_ignore_component_size_changed) { return; } - + compute_rectangles (); _matrix->setup_scrollbars (); }