summaryrefslogtreecommitdiff
path: root/gtk2_ardour/processor_box.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2015-10-14 12:38:44 +0200
committerPaul Davis <paul@linuxaudiosystems.com>2015-10-19 14:36:06 -0400
commit83b5bdbe95b2e3d236769d04f5ac2fac7401a9af (patch)
treea5c5ac55f41faf65e5e013e24bf214014d425fc4 /gtk2_ardour/processor_box.cc
parent784adc53bb5d70113f87b3430dea90eb87555d0a (diff)
Ctrl+shift functionality (toggle all) for plugin leds.
The Fader led has special behavior and is only toggled when clicked explicitly.
Diffstat (limited to 'gtk2_ardour/processor_box.cc')
-rw-r--r--gtk2_ardour/processor_box.cc42
1 files changed, 38 insertions, 4 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index d8a872ad19..c69aeeeed9 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -275,13 +275,39 @@ ProcessorEntry::set_enum_width (Width w)
}
void
-ProcessorEntry::led_clicked()
+ProcessorEntry::led_clicked(GdkEventButton *ev)
{
+ bool ctrl_shift_pressed = false;
+ Keyboard::ModifierMask ctrl_shift_mask = Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier);
+
+ if (Keyboard::modifier_state_equals (ev->state, ctrl_shift_mask)) {
+ ctrl_shift_pressed = true;
+ }
+
if (_processor) {
if (_button.get_active ()) {
- _processor->deactivate ();
+ if (ctrl_shift_pressed) {
+ _parent->all_visible_processors_active(false);
+
+ if (_position == Fader) {
+ _processor->deactivate ();
+ }
+ }
+ else {
+ _processor->deactivate ();
+ }
+
} else {
- _processor->activate ();
+ if (ctrl_shift_pressed) {
+ _parent->all_visible_processors_active(true);
+
+ if (_position == Fader) {
+ _processor->activate ();
+ }
+ }
+ else {
+ _processor->activate ();
+ }
}
}
}
@@ -533,7 +559,7 @@ ProcessorEntry::Control::Control (boost::shared_ptr<AutomationControl> c, string
_button.show ();
_button.signal_clicked.connect (sigc::mem_fun (*this, &Control::button_clicked));
- _button.signal_led_clicked.connect (sigc::mem_fun (*this, &Control::button_clicked));
+ _button.signal_led_clicked.connect (sigc::mem_fun (*this, &Control::button_clicked_event));
// dup. currently timers are used :(
//c->Changed.connect (_connection, MISSING_INVALIDATOR, boost::bind (&Control::control_changed, this), gui_context ());
@@ -645,6 +671,14 @@ ProcessorEntry::Control::button_clicked ()
}
void
+ProcessorEntry::Control::button_clicked_event (GdkEventButton *ev)
+{
+ (void) ev;
+
+ button_clicked ();
+}
+
+void
ProcessorEntry::Control::control_changed ()
{
boost::shared_ptr<AutomationControl> c = _control.lock ();