mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
Small cleanups to port matrix context menu.
git-svn-id: svn://localhost/ardour2/branches/3.0@6088 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
53838fc350
commit
ccf58b8de2
1 changed files with 8 additions and 2 deletions
|
|
@ -285,9 +285,12 @@ PortMatrix::popup_menu (
|
||||||
|
|
||||||
boost::weak_ptr<Bundle> w (bc[dim].bundle);
|
boost::weak_ptr<Bundle> w (bc[dim].bundle);
|
||||||
|
|
||||||
|
bool can_add_or_rename = false;
|
||||||
|
|
||||||
if (can_add_channel (bc[dim].bundle)) {
|
if (can_add_channel (bc[dim].bundle)) {
|
||||||
snprintf (buf, sizeof (buf), _("Add %s"), channel_noun().c_str());
|
snprintf (buf, sizeof (buf), _("Add %s"), channel_noun().c_str());
|
||||||
sub.push_back (MenuElem (buf, bind (mem_fun (*this, &PortMatrix::add_channel_proxy), w)));
|
sub.push_back (MenuElem (buf, bind (mem_fun (*this, &PortMatrix::add_channel_proxy), w)));
|
||||||
|
can_add_or_rename = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -299,9 +302,12 @@ PortMatrix::popup_menu (
|
||||||
bind (mem_fun (*this, &PortMatrix::rename_channel_proxy), w, bc[dim].channel)
|
bind (mem_fun (*this, &PortMatrix::rename_channel_proxy), w, bc[dim].channel)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
can_add_or_rename = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub.push_back (SeparatorElem ());
|
if (can_add_or_rename) {
|
||||||
|
sub.push_back (SeparatorElem ());
|
||||||
|
}
|
||||||
|
|
||||||
if (can_remove_channels (bc[dim].bundle)) {
|
if (can_remove_channels (bc[dim].bundle)) {
|
||||||
snprintf (buf, sizeof (buf), _("Remove '%s'"), bc[dim].bundle->channel_name (bc[dim].channel).c_str());
|
snprintf (buf, sizeof (buf), _("Remove '%s'"), bc[dim].bundle->channel_name (bc[dim].channel).c_str());
|
||||||
|
|
@ -313,7 +319,7 @@ PortMatrix::popup_menu (
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_show_only_bundles) {
|
if (_show_only_bundles || bc[dim].bundle->nchannels() <= 1) {
|
||||||
snprintf (buf, sizeof (buf), _("%s all"), disassociation_verb().c_str());
|
snprintf (buf, sizeof (buf), _("%s all"), disassociation_verb().c_str());
|
||||||
} else {
|
} else {
|
||||||
snprintf (
|
snprintf (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue