Add BasicUI::record_status()

Towards removing the direct use of Session by surfaces.
This commit is contained in:
David Robillard 2021-06-15 19:59:21 -04:00
parent 1f17d0834c
commit 799008e4d7
9 changed files with 14 additions and 7 deletions

View file

@ -642,7 +642,7 @@ CC121::map_recenable_state ()
bool onoff;
switch (_session->record_status()) {
switch (record_status()) {
case RecordState::Disabled:
onoff = false;
break;

View file

@ -486,6 +486,12 @@ BasicUI::get_record_enabled ()
return _session->get_record_enabled();
}
RecordState
BasicUI::record_status () const
{
return _session->record_status ();
}
void
BasicUI::set_record_enable (bool yn)
{

View file

@ -112,6 +112,7 @@ class LIBCONTROLCP_API BasicUI {
void set_record_enable (bool yn);
bool get_record_enabled ();
RecordState record_status() const;
//editor visibility stuff (why do we have to make explicit numbers here? because "gui actions" don't accept args
void fit_1_track();

View file

@ -659,7 +659,7 @@ FaderPort::map_recenable_state ()
bool onoff;
switch (_session->record_status()) {
switch (record_status()) {
case RecordState::Disabled:
onoff = false;
break;

View file

@ -148,7 +148,7 @@ FaderPort8::notify_transport_state_changed ()
void
FaderPort8::notify_record_state_changed ()
{
switch (_session->record_status ()) {
switch (record_status ()) {
case RecordState::Disabled:
_ctrls.button (FP8Controls::BtnRecord).set_active (0);
_ctrls.button (FP8Controls::BtnRecord).set_blinking (false);

View file

@ -1417,7 +1417,7 @@ MackieControlProtocol::notify_record_state_changed ()
if (rec) {
LedState ls;
switch (_session->record_status()) {
switch (record_status()) {
case RecordState::Disabled:
DEBUG_TRACE (DEBUG::MackieControl, "record state changed to disabled, LED off\n");
ls = off;

View file

@ -108,7 +108,7 @@ Maschine2::connect_signals ()
void
Maschine2::notify_record_state_changed ()
{
switch (_session->record_status ()) {
switch (record_status ()) {
case RecordState::Disabled:
_ctrl->button (M2Contols::Rec)->set_color (0);
_ctrl->button (M2Contols::Rec)->set_blinking (false);

View file

@ -886,7 +886,7 @@ Push2::notify_record_state_changed ()
return;
}
switch (_session->record_status ()) {
switch (record_status ()) {
case RecordState::Disabled:
b->second->set_color (LED::White);
b->second->set_state (LED::NoTransition);

View file

@ -1137,7 +1137,7 @@ US2400Protocol::notify_record_state_changed ()
if (rec) {
LedState ls;
switch (_session->record_status()) {
switch (record_status()) {
case RecordState::Disabled:
DEBUG_TRACE (DEBUG::US2400, "record state changed to disabled, LED off\n");
ls = off;