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
This commit is contained in:
Carl Hetherington 2009-07-19 20:42:14 +00:00
parent 87d8f1f360
commit e587155ee5
4 changed files with 9 additions and 6 deletions

View File

@ -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; }

View File

@ -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)));
}

View File

@ -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,

View File

@ -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) {