A couple of port matrix cleanups.
git-svn-id: svn://localhost/ardour2/branches/3.0@5455 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
86a70f19fb
commit
c6b26f70cf
@ -266,7 +266,7 @@ PortMatrix::popup_menu (
|
||||
bc[_row_index] = row.second;
|
||||
|
||||
char buf [64];
|
||||
|
||||
bool need_separator = false;
|
||||
|
||||
for (int dim = 0; dim < 2; ++dim) {
|
||||
|
||||
@ -319,12 +319,17 @@ PortMatrix::popup_menu (
|
||||
MenuElem (buf, bind (mem_fun (*this, &PortMatrix::disassociate_all_on_channel), w, bc[dim].channel, dim))
|
||||
);
|
||||
|
||||
|
||||
items.push_back (MenuElem (bc[dim].bundle->name().c_str(), *m));
|
||||
}
|
||||
need_separator = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (need_separator) {
|
||||
items.push_back (SeparatorElem ());
|
||||
}
|
||||
|
||||
need_separator = false;
|
||||
|
||||
for (int dim = 0; dim < 2; ++dim) {
|
||||
|
||||
@ -334,24 +339,44 @@ PortMatrix::popup_menu (
|
||||
|
||||
if (pg[dim]->visible()) {
|
||||
if (dim == 0) {
|
||||
if (pg[dim]->name.empty()) {
|
||||
snprintf (buf, sizeof (buf), _("Hide sources"));
|
||||
} else {
|
||||
snprintf (buf, sizeof (buf), _("Hide '%s' sources"), pg[dim]->name.c_str());
|
||||
}
|
||||
} else {
|
||||
if (pg[dim]->name.empty()) {
|
||||
snprintf (buf, sizeof (buf), _("Hide destinations"));
|
||||
} else {
|
||||
snprintf (buf, sizeof (buf), _("Hide '%s' destinations"), pg[dim]->name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
items.push_back (MenuElem (buf, bind (mem_fun (*this, &PortMatrix::hide_group), wp)));
|
||||
} else {
|
||||
if (dim == 0) {
|
||||
if (pg[dim]->name.empty()) {
|
||||
snprintf (buf, sizeof (buf), _("Show sources"));
|
||||
} else {
|
||||
snprintf (buf, sizeof (buf), _("Show '%s' sources"), pg[dim]->name.c_str());
|
||||
}
|
||||
} else {
|
||||
if (pg[dim]->name.empty()) {
|
||||
snprintf (buf, sizeof (buf), _("Show destinations"));
|
||||
} else {
|
||||
snprintf (buf, sizeof (buf), _("Show '%s' destinations"), pg[dim]->name.c_str());
|
||||
}
|
||||
}
|
||||
items.push_back (MenuElem (buf, bind (mem_fun (*this, &PortMatrix::show_group), wp)));
|
||||
}
|
||||
|
||||
need_separator = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (need_separator) {
|
||||
items.push_back (SeparatorElem ());
|
||||
}
|
||||
|
||||
items.push_back (MenuElem (_("Rescan"), mem_fun (*this, &PortMatrix::setup_all_ports)));
|
||||
items.push_back (CheckMenuElem (_("Show individual ports"), mem_fun (*this, &PortMatrix::toggle_show_only_bundles)));
|
||||
|
Loading…
Reference in New Issue
Block a user