summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-03-02 12:12:18 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:39 -0400
commit75b327964bafcccf15e83800132053524aebdf89 (patch)
treea4918858eb2cb7c1bd681d9ae60e7360d0f00d65 /gtk2_ardour/route_ui.cc
parent35172bb369eea6245e08b258f4a350411c20f98d (diff)
tweak mixer VCA button appearance and prepare for live updates to VCA state
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r--gtk2_ardour/route_ui.cc36
1 files changed, 34 insertions, 2 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index efacdb2fc1..53bcef531c 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -27,13 +27,16 @@
#include <gtkmm2ext/gtk_ui.h>
#include <gtkmm2ext/utils.h>
-#include "ardour/route_group.h"
-#include "ardour/dB.h"
#include "pbd/memento_command.h"
#include "pbd/stacktrace.h"
#include "pbd/controllable.h"
#include "pbd/enumwriter.h"
+#include "ardour/dB.h"
+#include "ardour/route_group.h"
+#include "ardour/vca.h"
+#include "ardour/vca_manager.h"
+
#include "ardour_ui.h"
#include "editor.h"
#include "route_ui.h"
@@ -1274,6 +1277,35 @@ RouteUI::update_mute_display ()
}
void
+RouteUI::update_vca_display ()
+{
+ if (!vca_button) {
+ return;
+ }
+
+ VCAList vcas (_session->vca_manager().vcas());
+ string label;
+
+ for (VCAList::iterator v = vcas.begin(); v != vcas.end(); ++v) {
+ if (_route->slaved_to (*v)) {
+ if (!label.empty()) {
+ label += ' ';
+ }
+ label += PBD::to_string ((*v)->number(), std::dec);
+ }
+ }
+
+ if (label.empty()) {
+ label = _("-vca-");
+ vca_button->set_active_state (Gtkmm2ext::Off);
+ } else {
+ vca_button->set_active_state (Gtkmm2ext::ExplicitActive);
+ }
+
+ vca_button->set_text (label);
+}
+
+void
RouteUI::route_rec_enable_changed ()
{
blink_rec_display(true); //this lets the button change "immediately" rather than wait for the next blink