mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Port matrix tweaks: scroll wheel support; use the correct verb for disassociation in the menu; fixes for gaps appearing when groups are hidden.
git-svn-id: svn://localhost/ardour2/branches/3.0@5382 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
af5b9f92a5
commit
6da5dd6d41
11 changed files with 107 additions and 75 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include "ardour/route.h"
|
||||
#include "port_matrix.h"
|
||||
#include "port_matrix_body.h"
|
||||
#include "port_matrix_component.h"
|
||||
#include "i18n.h"
|
||||
|
||||
using namespace std;
|
||||
|
|
@ -319,11 +320,13 @@ PortMatrix::popup_menu (
|
|||
boost::weak_ptr<ARDOUR::Bundle> w (bc[dim].bundle);
|
||||
|
||||
if (_show_only_bundles) {
|
||||
snprintf (buf, sizeof (buf), _("Disassociate all from '%s'"), bc[dim].bundle->name().c_str());
|
||||
snprintf (buf, sizeof (buf), _("%s all from '%s'"), disassociation_verb().c_str(), bc[dim].bundle->name().c_str());
|
||||
} else {
|
||||
snprintf (
|
||||
buf, sizeof (buf), _("Disassociate all from '%s/%s'"),
|
||||
bc[dim].bundle->name().c_str(), bc[dim].bundle->channel_name (bc[dim].channel).c_str()
|
||||
buf, sizeof (buf), _("%s all from '%s/%s'"),
|
||||
disassociation_verb().c_str(),
|
||||
bc[dim].bundle->name().c_str(),
|
||||
bc[dim].bundle->channel_name (bc[dim].channel).c_str()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -464,3 +467,27 @@ PortMatrix::setup_max_size ()
|
|||
{
|
||||
MaxSizeChanged ();
|
||||
}
|
||||
|
||||
bool
|
||||
PortMatrix::on_scroll_event (GdkEventScroll* ev)
|
||||
{
|
||||
double const h = _hscroll.get_value ();
|
||||
double const v = _vscroll.get_value ();
|
||||
|
||||
switch (ev->direction) {
|
||||
case GDK_SCROLL_UP:
|
||||
_vscroll.set_value (v - PortMatrixComponent::grid_spacing ());
|
||||
break;
|
||||
case GDK_SCROLL_DOWN:
|
||||
_vscroll.set_value (v + PortMatrixComponent::grid_spacing ());
|
||||
break;
|
||||
case GDK_SCROLL_LEFT:
|
||||
_hscroll.set_value (h - PortMatrixComponent::grid_spacing ());
|
||||
break;
|
||||
case GDK_SCROLL_RIGHT:
|
||||
_hscroll.set_value (h + PortMatrixComponent::grid_spacing ());
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue