mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 04:09:29 +01:00
add ::usable() method to TransportMaster objects to allow GUI to show their usability after backend/engine changes
This commit is contained in:
parent
fb4cbb9f9e
commit
37d9ec34c8
4 changed files with 34 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue