diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-09-16 13:46:06 -0600 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-09-17 16:54:10 -0600 |
commit | 37d9ec34c86bb18f95e35987b8b62bd4d275787c (patch) | |
tree | e64be0ba9299f2e8546870c73b8514d647674612 /gtk2_ardour/transport_masters_dialog.cc | |
parent | fb4cbb9f9ee61a5c0fec9fa43eff5a0e59d7f9ed (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.cc | 15 |
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) |