MCPcopy Create free account
hub / github.com/audacity/audacity / OnStatusChange

Method OnStatusChange

src/ProjectManager.cpp:796–818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

794}
795
796void ProjectManager::OnStatusChange(StatusBarField field)
797{
798 auto &project = mProject;
799
800 // Be careful to null-check the window. We might get to this function
801 // during shut-down, but a timer hasn't been told to stop sending its
802 // messages yet.
803 auto pWindow = ProjectWindow::Find( &project );
804 if ( !pWindow )
805 return;
806 auto &window = *pWindow;
807
808 window.UpdateStatusWidths();
809
810 const auto &msg = ProjectStatus::Get( project ).Get( field );
811 SetStatusText( msg, field );
812
813 if ( field == MainStatusBarField() )
814 // When recording, let the NEW status message stay at least as long as
815 // the timer interval (if it is not replaced again by this function),
816 // before replacing it with the message about remaining disk capacity.
817 RestartTimer();
818}
819
820void ProjectManager::SetStatusText(
821 const TranslatableString& text, const StatusBarField& field)

Callers

nothing calls this directly

Calls 5

FindFunction · 0.85
GetFunction · 0.85
MainStatusBarFieldFunction · 0.85
UpdateStatusWidthsMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected