use syntactic sugar
[ardour.git] / gtk2_ardour / port_matrix_body.cc
index 2b12ed092ac5d68ca8b96a3dbe34f4c76783bb9a..66ed3ecc3e2c0cea55212f770ea8a05b45004c6e 100644 (file)
@@ -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);
@@ -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
                                );
                }
        }
@@ -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;