From e587155ee56a8dc81185f055abc7126642d946b6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 19 Jul 2009 20:42:14 +0000 Subject: Use the word `port' rather than `channel' when adding channels to a route's bundle. Don't mouseover on hidden groups in the matrix. git-svn-id: svn://localhost/ardour2/branches/3.0@5385 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/io_selector.h | 4 ++++ gtk2_ardour/port_matrix.cc | 2 +- gtk2_ardour/port_matrix.h | 2 ++ gtk2_ardour/port_matrix_grid.cc | 7 ++----- 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 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) { -- cgit v1.2.3