summaryrefslogtreecommitdiff
path: root/gtk2_ardour/transport_masters_dialog.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-09-16 13:46:06 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2019-09-17 16:54:10 -0600
commit37d9ec34c86bb18f95e35987b8b62bd4d275787c (patch)
treee64be0ba9299f2e8546870c73b8514d647674612 /gtk2_ardour/transport_masters_dialog.cc
parentfb4cbb9f9ee61a5c0fec9fa43eff5a0e59d7f9ed (diff)
add ::usable() method to TransportMaster objects to allow GUI to show their usability after backend/engine changes
Diffstat (limited to 'gtk2_ardour/transport_masters_dialog.cc')
-rw-r--r--gtk2_ardour/transport_masters_dialog.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk2_ardour/transport_masters_dialog.cc b/gtk2_ardour/transport_masters_dialog.cc
index bbf846e688..dcc97e6201 100644
--- a/gtk2_ardour/transport_masters_dialog.cc
+++ b/gtk2_ardour/transport_masters_dialog.cc
@@ -86,6 +86,8 @@ TransportMastersWidget::TransportMastersWidget ()
TransportMasterManager::instance().Added.connect (add_connection, invalidator (*this), boost::bind (&TransportMastersWidget::rebuild, this), gui_context());
TransportMasterManager::instance().Removed.connect (remove_connection, invalidator (*this), boost::bind (&TransportMastersWidget::rebuild, this), gui_context());
+ AudioEngine::instance()->Running.connect (engine_running_connection, invalidator (*this), boost::bind (&TransportMastersWidget::update_usability, this), gui_context());
+
rebuild ();
}
@@ -244,6 +246,19 @@ TransportMastersWidget::rebuild ()
r->prop_change (all_change);
}
+
+ update_usability ();
+}
+
+void
+TransportMastersWidget::update_usability ()
+{
+ for (vector<Row*>::iterator r= rows.begin(); r != rows.end(); ++r) {
+ const bool usable = (*r)->tm->usable();
+ (*r)->use_button.set_sensitive (usable);
+ (*r)->collect_button.set_sensitive (usable);
+ (*r)->request_options.set_sensitive (usable);
+ }
}
TransportMastersWidget::Row::Row (TransportMastersWidget& p)