summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/io_selector.h4
-rw-r--r--gtk2_ardour/port_matrix.cc2
-rw-r--r--gtk2_ardour/port_matrix.h2
-rw-r--r--gtk2_ardour/port_matrix_grid.cc7
4 files changed, 9 insertions, 6 deletions
diff --git a/gtk2_ardour/io_selector.h b/gtk2_ardour/io_selector.h
index fd5cb2fb50..3f4eb2155a 100644
--- a/gtk2_ardour/io_selector.h
+++ b/gtk2_ardour/io_selector.h
@@ -52,6 +52,10 @@ class IOSelector : public PortMatrix
std::string disassociation_verb () const {
return _("Disconnect");
}
+
+ std::string channel_noun () const {
+ return _("port");
+ }
uint32_t n_io_ports () const;
boost::shared_ptr<ARDOUR::IO> const io () { return _io; }
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index c535ef6769..4aed9d5ef4 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -266,7 +266,7 @@ PortMatrix::popup_menu (
std::string const n = add_channel_name ();
if (!n.empty()) {
- snprintf (buf, sizeof (buf), _("Add channel to '%s'"), n.c_str());
+ snprintf (buf, sizeof (buf), _("Add %s to '%s'"), channel_noun().c_str(), n.c_str());
items.push_back (MenuElem (buf, mem_fun (*this, &PortMatrix::add_channel)));
}
diff --git a/gtk2_ardour/port_matrix.h b/gtk2_ardour/port_matrix.h
index f2b45369c2..6117e971db 100644
--- a/gtk2_ardour/port_matrix.h
+++ b/gtk2_ardour/port_matrix.h
@@ -30,6 +30,7 @@
#include "ardour/bundle.h"
#include "port_group.h"
#include "port_matrix_types.h"
+#include "i18n.h"
/** The `port matrix' UI. This is a widget which lets the user alter
* associations between one set of ports and another. e.g. to connect
@@ -135,6 +136,7 @@ public:
virtual bool can_rename_channels (int) const = 0;
virtual void rename_channel (ARDOUR::BundleChannel) {}
virtual std::string disassociation_verb () const = 0;
+ virtual std::string channel_noun () const { return _("channel"); }
enum Result {
Cancelled,
diff --git a/gtk2_ardour/port_matrix_grid.cc b/gtk2_ardour/port_matrix_grid.cc
index 8055a11c56..50740cae63 100644
--- a/gtk2_ardour/port_matrix_grid.cc
+++ b/gtk2_ardour/port_matrix_grid.cc
@@ -441,8 +441,8 @@ PortMatrixGrid::draw_extra (cairo_t* cr)
double const x = component_to_parent_x (channel_to_position (_body->mouseover().column, _matrix->columns()) * grid_spacing()) + grid_spacing() / 2;
double const y = component_to_parent_y (channel_to_position (_body->mouseover().row, _matrix->rows()) * grid_spacing()) + grid_spacing() / 2;
-
- if (_body->mouseover().row.bundle) {
+
+ if (_body->mouseover().row.bundle && _body->mouseover().column.bundle) {
cairo_move_to (cr, x, y);
if (_matrix->arrangement() == PortMatrix::LEFT_TO_BOTTOM) {
@@ -451,9 +451,6 @@ PortMatrixGrid::draw_extra (cairo_t* cr)
cairo_line_to (cr, _parent_rectangle.get_x() + _parent_rectangle.get_width(), y);
}
cairo_stroke (cr);
- }
-
- if (_body->mouseover().column.bundle) {
cairo_move_to (cr, x, y);
if (_matrix->arrangement() == PortMatrix::LEFT_TO_BOTTOM) {