| 794 | } |
| 795 | |
| 796 | void 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 | |
| 820 | void ProjectManager::SetStatusText( |
| 821 | const TranslatableString& text, const StatusBarField& field) |
nothing calls this directly
no test coverage detected