mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-17 16:50:26 +02:00
Move project status string management to new attached object class
This commit is contained in:
parent
efa66f5350
commit
e2362bc25a
@ -34,6 +34,7 @@
|
|||||||
#include "Project.h"
|
#include "Project.h"
|
||||||
#include "ProjectAudioIO.h"
|
#include "ProjectAudioIO.h"
|
||||||
#include "ProjectAudioManager.h"
|
#include "ProjectAudioManager.h"
|
||||||
|
#include "ProjectStatus.h"
|
||||||
#include "ProjectWindow.h"
|
#include "ProjectWindow.h"
|
||||||
#include "RefreshCode.h"
|
#include "RefreshCode.h"
|
||||||
#include "Snap.h"
|
#include "Snap.h"
|
||||||
@ -2207,7 +2208,7 @@ void AdornedRulerPanel::ProcessUIHandleResult
|
|||||||
|
|
||||||
void AdornedRulerPanel::UpdateStatusMessage( const wxString &message )
|
void AdornedRulerPanel::UpdateStatusMessage( const wxString &message )
|
||||||
{
|
{
|
||||||
GetProject()->SetStatus(message);
|
ProjectStatus::Get( *GetProject() ).Set(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdornedRulerPanel::CreateOverlays()
|
void AdornedRulerPanel::CreateOverlays()
|
||||||
|
@ -3390,6 +3390,9 @@ void AudioIO::AllNotesOff(bool looping)
|
|||||||
|
|
||||||
// Automated Input Level Adjustment - Automatically tries to find an acceptable input volume
|
// Automated Input Level Adjustment - Automatically tries to find an acceptable input volume
|
||||||
#ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT
|
#ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT
|
||||||
|
|
||||||
|
#include "ProjectStatus.h"
|
||||||
|
|
||||||
void AudioIO::AILAInitialize() {
|
void AudioIO::AILAInitialize() {
|
||||||
gPrefs->Read(wxT("/AudioIO/AutomatedInputLevelAdjustment"), &mAILAActive, false);
|
gPrefs->Read(wxT("/AudioIO/AutomatedInputLevelAdjustment"), &mAILAActive, false);
|
||||||
gPrefs->Read(wxT("/AudioIO/TargetPeak"), &mAILAGoalPoint, AILA_DEF_TARGET_PEAK);
|
gPrefs->Read(wxT("/AudioIO/TargetPeak"), &mAILAGoalPoint, AILA_DEF_TARGET_PEAK);
|
||||||
@ -3463,7 +3466,7 @@ void AudioIO::AILAProcess(double maxPeak) {
|
|||||||
//we can't improve it more now
|
//we can't improve it more now
|
||||||
if (mAILATotalAnalysis != 0) {
|
if (mAILATotalAnalysis != 0) {
|
||||||
mAILAActive = false;
|
mAILAActive = false;
|
||||||
proj->SetStatus(_("Automated Recording Level Adjustment stopped. It was not possible to optimize it more. Still too high."));
|
ProjectStatus::Get( *proj ).Set(_("Automated Recording Level Adjustment stopped. It was not possible to optimize it more. Still too high."));
|
||||||
}
|
}
|
||||||
wxPrintf("\talready min vol:%f\n", iv);
|
wxPrintf("\talready min vol:%f\n", iv);
|
||||||
}
|
}
|
||||||
@ -3472,7 +3475,7 @@ void AudioIO::AILAProcess(double maxPeak) {
|
|||||||
Px_SetInputVolume(mPortMixer, vol);
|
Px_SetInputVolume(mPortMixer, vol);
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf(_("Automated Recording Level Adjustment decreased the volume to %f."), vol);
|
msg.Printf(_("Automated Recording Level Adjustment decreased the volume to %f."), vol);
|
||||||
proj->SetStatus(msg);
|
ProjectStatus::Get( *proj ).Set(msg);
|
||||||
changetype = 1;
|
changetype = 1;
|
||||||
wxPrintf("\tnew vol:%f\n", vol);
|
wxPrintf("\tnew vol:%f\n", vol);
|
||||||
float check = Px_GetInputVolume(mPortMixer);
|
float check = Px_GetInputVolume(mPortMixer);
|
||||||
@ -3486,7 +3489,7 @@ void AudioIO::AILAProcess(double maxPeak) {
|
|||||||
//we can't improve it more
|
//we can't improve it more
|
||||||
if (mAILATotalAnalysis != 0) {
|
if (mAILATotalAnalysis != 0) {
|
||||||
mAILAActive = false;
|
mAILAActive = false;
|
||||||
proj->SetStatus(_("Automated Recording Level Adjustment stopped. It was not possible to optimize it more. Still too low."));
|
ProjectStatus::Get( *proj ).Set(_("Automated Recording Level Adjustment stopped. It was not possible to optimize it more. Still too low."));
|
||||||
}
|
}
|
||||||
wxPrintf("\talready max vol:%f\n", iv);
|
wxPrintf("\talready max vol:%f\n", iv);
|
||||||
}
|
}
|
||||||
@ -3499,7 +3502,7 @@ void AudioIO::AILAProcess(double maxPeak) {
|
|||||||
Px_SetInputVolume(mPortMixer, vol);
|
Px_SetInputVolume(mPortMixer, vol);
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf(_("Automated Recording Level Adjustment increased the volume to %.2f."), vol);
|
msg.Printf(_("Automated Recording Level Adjustment increased the volume to %.2f."), vol);
|
||||||
proj->SetStatus(msg);
|
ProjectStatus::Get( *proj ).Set(msg);
|
||||||
changetype = 2;
|
changetype = 2;
|
||||||
wxPrintf("\tnew vol:%f\n", vol);
|
wxPrintf("\tnew vol:%f\n", vol);
|
||||||
float check = Px_GetInputVolume(mPortMixer);
|
float check = Px_GetInputVolume(mPortMixer);
|
||||||
@ -3532,13 +3535,13 @@ void AudioIO::AILAProcess(double maxPeak) {
|
|||||||
if (mAILAActive && mAILATotalAnalysis != 0 && mAILAAnalysisCounter >= mAILATotalAnalysis) {
|
if (mAILAActive && mAILATotalAnalysis != 0 && mAILAAnalysisCounter >= mAILATotalAnalysis) {
|
||||||
mAILAActive = false;
|
mAILAActive = false;
|
||||||
if (mAILAMax > mAILAGoalPoint + mAILAGoalDelta)
|
if (mAILAMax > mAILAGoalPoint + mAILAGoalDelta)
|
||||||
proj->SetStatus(_("Automated Recording Level Adjustment stopped. The total number of analyses has been exceeded without finding an acceptable volume. Still too high."));
|
ProjectStatus::Get( *proj ).Set(_("Automated Recording Level Adjustment stopped. The total number of analyses has been exceeded without finding an acceptable volume. Still too high."));
|
||||||
else if (mAILAMax < mAILAGoalPoint - mAILAGoalDelta)
|
else if (mAILAMax < mAILAGoalPoint - mAILAGoalDelta)
|
||||||
proj->SetStatus(_("Automated Recording Level Adjustment stopped. The total number of analyses has been exceeded without finding an acceptable volume. Still too low."));
|
ProjectStatus::Get( *proj ).Set(_("Automated Recording Level Adjustment stopped. The total number of analyses has been exceeded without finding an acceptable volume. Still too low."));
|
||||||
else {
|
else {
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf(_("Automated Recording Level Adjustment stopped. %.2f seems an acceptable volume."), Px_GetInputVolume(mPortMixer));
|
msg.Printf(_("Automated Recording Level Adjustment stopped. %.2f seems an acceptable volume."), Px_GetInputVolume(mPortMixer));
|
||||||
proj->SetStatus(msg);
|
ProjectStatus::Get( *proj ).Set(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include <wx/display.h>
|
#include <wx/display.h>
|
||||||
#include <wx/frame.h>
|
#include <wx/frame.h>
|
||||||
|
|
||||||
wxDEFINE_EVENT(EVT_PROJECT_STATUS_UPDATE, wxCommandEvent);
|
|
||||||
wxDEFINE_EVENT(EVT_TRACK_PANEL_TIMER, wxCommandEvent);
|
wxDEFINE_EVENT(EVT_TRACK_PANEL_TIMER, wxCommandEvent);
|
||||||
|
|
||||||
size_t AllProjects::size() const
|
size_t AllProjects::size() const
|
||||||
@ -145,17 +144,6 @@ wxString AudacityProject::GetProjectName() const
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TrackPanel callback method
|
|
||||||
void AudacityProject::SetStatus(const wxString &msg)
|
|
||||||
{
|
|
||||||
auto &project = *this;
|
|
||||||
if ( msg != mLastMainStatusMessage ) {
|
|
||||||
mLastMainStatusMessage = msg;
|
|
||||||
wxCommandEvent evt{ EVT_PROJECT_STATUS_UPDATE };
|
|
||||||
project.ProcessEvent( evt );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
AUDACITY_DLL_API wxFrame &GetProjectFrame( AudacityProject &project )
|
AUDACITY_DLL_API wxFrame &GetProjectFrame( AudacityProject &project )
|
||||||
{
|
{
|
||||||
auto ptr = project.GetFrame();
|
auto ptr = project.GetFrame();
|
||||||
|
@ -29,12 +29,6 @@ AUDACITY_DLL_API AudacityProject *GetActiveProject();
|
|||||||
// For use by ProjectManager only:
|
// For use by ProjectManager only:
|
||||||
extern void SetActiveProject(AudacityProject * project);
|
extern void SetActiveProject(AudacityProject * project);
|
||||||
|
|
||||||
enum StatusBarField {
|
|
||||||
stateStatusBarField = 1,
|
|
||||||
mainStatusBarField = 2,
|
|
||||||
rateStatusBarField = 3
|
|
||||||
};
|
|
||||||
|
|
||||||
/// \brief an object of class AllProjects acts like a standard library
|
/// \brief an object of class AllProjects acts like a standard library
|
||||||
/// container, but refers to a global array of open projects. So you can
|
/// container, but refers to a global array of open projects. So you can
|
||||||
/// iterate easily over shared pointers to them with range-for :
|
/// iterate easily over shared pointers to them with range-for :
|
||||||
@ -96,10 +90,6 @@ using AttachedWindows = ClientData::Site<
|
|||||||
AudacityProject, wxWindow, ClientData::SkipCopying, wxWeakRef
|
AudacityProject, wxWindow, ClientData::SkipCopying, wxWeakRef
|
||||||
>;
|
>;
|
||||||
|
|
||||||
// Type of event emitted by the project when its status message is set
|
|
||||||
wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
|
|
||||||
EVT_PROJECT_STATUS_UPDATE, wxCommandEvent);
|
|
||||||
|
|
||||||
wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
|
wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
|
||||||
EVT_TRACK_PANEL_TIMER, wxCommandEvent);
|
EVT_TRACK_PANEL_TIMER, wxCommandEvent);
|
||||||
|
|
||||||
@ -132,9 +122,6 @@ class AUDACITY_DLL_API AudacityProject final
|
|||||||
|
|
||||||
int GetProjectNumber(){ return mProjectNo;}
|
int GetProjectNumber(){ return mProjectNo;}
|
||||||
|
|
||||||
const wxString &GetStatus() const { return mLastMainStatusMessage; }
|
|
||||||
void SetStatus(const wxString &msg);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// The project's name and file info
|
// The project's name and file info
|
||||||
@ -148,8 +135,6 @@ class AUDACITY_DLL_API AudacityProject final
|
|||||||
int mBatchMode{ 0 };// 0 means not, >0 means in batch mode.
|
int mBatchMode{ 0 };// 0 means not, >0 means in batch mode.
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxString mLastMainStatusMessage;
|
|
||||||
|
|
||||||
wxWeakRef< wxFrame > mFrame{};
|
wxWeakRef< wxFrame > mFrame{};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ Paul Licameli split from ProjectManager.cpp
|
|||||||
#include "ProjectFileIO.h"
|
#include "ProjectFileIO.h"
|
||||||
#include "ProjectHistory.h"
|
#include "ProjectHistory.h"
|
||||||
#include "ProjectSettings.h"
|
#include "ProjectSettings.h"
|
||||||
|
#include "ProjectStatus.h"
|
||||||
#include "ProjectWindow.h"
|
#include "ProjectWindow.h"
|
||||||
#include "TimeTrack.h"
|
#include "TimeTrack.h"
|
||||||
#include "UndoManager.h"
|
#include "UndoManager.h"
|
||||||
|
@ -32,6 +32,7 @@ Paul Licameli split from AudacityProject.cpp
|
|||||||
#include "ProjectHistory.h"
|
#include "ProjectHistory.h"
|
||||||
#include "ProjectSelectionManager.h"
|
#include "ProjectSelectionManager.h"
|
||||||
#include "ProjectSettings.h"
|
#include "ProjectSettings.h"
|
||||||
|
#include "ProjectStatus.h"
|
||||||
#include "ProjectWindow.h"
|
#include "ProjectWindow.h"
|
||||||
#include "SelectUtilities.h"
|
#include "SelectUtilities.h"
|
||||||
#include "SelectionState.h"
|
#include "SelectionState.h"
|
||||||
|
@ -30,6 +30,7 @@ Paul Licameli split from AudacityProject.cpp
|
|||||||
#include "ProjectHistory.h"
|
#include "ProjectHistory.h"
|
||||||
#include "ProjectSelectionManager.h"
|
#include "ProjectSelectionManager.h"
|
||||||
#include "ProjectSettings.h"
|
#include "ProjectSettings.h"
|
||||||
|
#include "ProjectStatus.h"
|
||||||
#include "ProjectWindow.h"
|
#include "ProjectWindow.h"
|
||||||
#include "SelectUtilities.h"
|
#include "SelectUtilities.h"
|
||||||
#include "TrackPanel.h"
|
#include "TrackPanel.h"
|
||||||
@ -827,7 +828,7 @@ void ProjectManager::OnStatusChange( wxCommandEvent & )
|
|||||||
{
|
{
|
||||||
auto &project = mProject;
|
auto &project = mProject;
|
||||||
auto &window = GetProjectFrame( project );
|
auto &window = GetProjectFrame( project );
|
||||||
const auto &msg = project.GetStatus();
|
const auto &msg = ProjectStatus::Get( project ).Get();
|
||||||
window.GetStatusBar()->SetStatusText(msg, mainStatusBarField);
|
window.GetStatusBar()->SetStatusText(msg, mainStatusBarField);
|
||||||
|
|
||||||
// When recording, let the NEW status message stay at least as long as
|
// When recording, let the NEW status message stay at least as long as
|
||||||
|
@ -0,0 +1,48 @@
|
|||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
Audacity: A Digital Audio Editor
|
||||||
|
|
||||||
|
ProjectStatus.h
|
||||||
|
|
||||||
|
Paul Licameli
|
||||||
|
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
#include "ProjectStatus.h"
|
||||||
|
|
||||||
|
#include "Project.h"
|
||||||
|
|
||||||
|
wxDEFINE_EVENT(EVT_PROJECT_STATUS_UPDATE, wxCommandEvent);
|
||||||
|
|
||||||
|
static const AudacityProject::AttachedObjects::RegisteredFactory key{
|
||||||
|
[]( AudacityProject &parent ){
|
||||||
|
return std::make_shared< ProjectStatus >( parent );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ProjectStatus &ProjectStatus::Get( AudacityProject &project )
|
||||||
|
{
|
||||||
|
return project.AttachedObjects::Get< ProjectStatus >( key );
|
||||||
|
}
|
||||||
|
|
||||||
|
const ProjectStatus &ProjectStatus::Get( const AudacityProject &project )
|
||||||
|
{
|
||||||
|
return Get( const_cast< AudacityProject & >( project ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
ProjectStatus::ProjectStatus( AudacityProject &project )
|
||||||
|
: mProject{ project }
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ProjectStatus::~ProjectStatus() = default;
|
||||||
|
|
||||||
|
void ProjectStatus::Set(const wxString &msg)
|
||||||
|
{
|
||||||
|
auto &project = mProject;
|
||||||
|
if ( msg != mLastMainStatusMessage ) {
|
||||||
|
mLastMainStatusMessage = msg;
|
||||||
|
wxCommandEvent evt{ EVT_PROJECT_STATUS_UPDATE };
|
||||||
|
project.ProcessEvent( evt );
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
Audacity: A Digital Audio Editor
|
||||||
|
|
||||||
|
ProjectStatus.h
|
||||||
|
|
||||||
|
Paul Licameli
|
||||||
|
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
#ifndef __AUDACITY_PROJECT_STATUS__
|
||||||
|
#define __AUDACITY_PROJECT_STATUS__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <wx/event.h> // to declare custom event type
|
||||||
|
#include "ClientData.h" // to inherit
|
||||||
|
|
||||||
|
class AudacityProject;
|
||||||
|
class wxWindow;
|
||||||
|
|
||||||
|
enum StatusBarField : int {
|
||||||
|
stateStatusBarField = 1,
|
||||||
|
mainStatusBarField = 2,
|
||||||
|
rateStatusBarField = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
// Type of event emitted by the project when its status message is set
|
||||||
|
wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
|
||||||
|
EVT_PROJECT_STATUS_UPDATE, wxCommandEvent);
|
||||||
|
|
||||||
|
class ProjectStatus final
|
||||||
|
: public ClientData::Base
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static ProjectStatus &Get( AudacityProject &project );
|
||||||
|
static const ProjectStatus &Get( const AudacityProject &project );
|
||||||
|
|
||||||
|
explicit ProjectStatus( AudacityProject &project );
|
||||||
|
ProjectStatus( const ProjectStatus & ) = delete;
|
||||||
|
ProjectStatus &operator= ( const ProjectStatus & ) = delete;
|
||||||
|
~ProjectStatus() override;
|
||||||
|
|
||||||
|
const wxString &Get() const { return mLastMainStatusMessage; }
|
||||||
|
void Set(const wxString &msg);
|
||||||
|
|
||||||
|
private:
|
||||||
|
AudacityProject &mProject;
|
||||||
|
wxString mLastMainStatusMessage;
|
||||||
|
};
|
@ -17,6 +17,7 @@ Paul Licameli split from AudacityProject.cpp
|
|||||||
#include "Menus.h"
|
#include "Menus.h"
|
||||||
#include "Project.h"
|
#include "Project.h"
|
||||||
#include "ProjectAudioIO.h"
|
#include "ProjectAudioIO.h"
|
||||||
|
#include "ProjectStatus.h"
|
||||||
#include "RefreshCode.h"
|
#include "RefreshCode.h"
|
||||||
#include "TrackPanel.h"
|
#include "TrackPanel.h"
|
||||||
#include "TrackPanelMouseEvent.h"
|
#include "TrackPanelMouseEvent.h"
|
||||||
|
@ -39,6 +39,7 @@ It forwards the actual work of doing the commands to the ScreenshotCommand.
|
|||||||
#include <wx/window.h>
|
#include <wx/window.h>
|
||||||
|
|
||||||
#include "Project.h"
|
#include "Project.h"
|
||||||
|
#include "ProjectStatus.h"
|
||||||
#include "ProjectWindow.h"
|
#include "ProjectWindow.h"
|
||||||
#include "Prefs.h"
|
#include "Prefs.h"
|
||||||
#include "toolbars/ToolManager.h"
|
#include "toolbars/ToolManager.h"
|
||||||
|
@ -56,6 +56,7 @@ is time to refresh some aspect of the screen.
|
|||||||
#include "ProjectAudioIO.h"
|
#include "ProjectAudioIO.h"
|
||||||
#include "ProjectHistory.h"
|
#include "ProjectHistory.h"
|
||||||
#include "ProjectSettings.h"
|
#include "ProjectSettings.h"
|
||||||
|
#include "ProjectStatus.h"
|
||||||
#include "ProjectWindow.h"
|
#include "ProjectWindow.h"
|
||||||
#include "TrackPanelMouseEvent.h"
|
#include "TrackPanelMouseEvent.h"
|
||||||
#include "TrackPanelResizeHandle.h"
|
#include "TrackPanelResizeHandle.h"
|
||||||
@ -673,7 +674,7 @@ void TrackPanel::UpdateStatusMessage( const wxString &st )
|
|||||||
if (HasEscape())
|
if (HasEscape())
|
||||||
/* i18n-hint Esc is a key on the keyboard */
|
/* i18n-hint Esc is a key on the keyboard */
|
||||||
status += wxT(" "), status += _("(Esc to cancel)");
|
status += wxT(" "), status += _("(Esc to cancel)");
|
||||||
GetProject()->SetStatus(status);
|
ProjectStatus::Get( *GetProject() ).Set( status );
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackPanel::UpdateSelectionDisplay()
|
void TrackPanel::UpdateSelectionDisplay()
|
||||||
@ -724,7 +725,8 @@ void TrackPanel::UpdateViewIfNoTracks()
|
|||||||
mViewInfo->h = 0;
|
mViewInfo->h = 0;
|
||||||
|
|
||||||
mListener->TP_HandleResize();
|
mListener->TP_HandleResize();
|
||||||
GetProject()->SetStatus(wxT("")); //STM: Clear message if all tracks are removed
|
//STM: Clear message if all tracks are removed
|
||||||
|
ProjectStatus::Get( *GetProject() ).Set(wxT(""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include "../ProjectHistory.h"
|
#include "../ProjectHistory.h"
|
||||||
#include "../ProjectSettings.h"
|
#include "../ProjectSettings.h"
|
||||||
#include "../PluginManager.h"
|
#include "../PluginManager.h"
|
||||||
|
#include "../ProjectStatus.h"
|
||||||
#include "../ProjectWindow.h"
|
#include "../ProjectWindow.h"
|
||||||
#include "../SelectUtilities.h"
|
#include "../SelectUtilities.h"
|
||||||
#include "../ShuttleGui.h"
|
#include "../ShuttleGui.h"
|
||||||
@ -1165,7 +1166,7 @@ void OnTrackClose(const CommandContext &context)
|
|||||||
|
|
||||||
if (isAudioActive)
|
if (isAudioActive)
|
||||||
{
|
{
|
||||||
project.SetStatus(
|
ProjectStatus::Get( project ).Set(
|
||||||
_("Can't delete track with active audio"));
|
_("Can't delete track with active audio"));
|
||||||
wxBell();
|
wxBell();
|
||||||
return;
|
return;
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
#include "../ProjectAudioIO.h"
|
#include "../ProjectAudioIO.h"
|
||||||
#include "../ProjectAudioManager.h"
|
#include "../ProjectAudioManager.h"
|
||||||
#include "../ProjectSettings.h"
|
#include "../ProjectSettings.h"
|
||||||
|
#include "../ProjectStatus.h"
|
||||||
#include "../ProjectWindow.h"
|
#include "../ProjectWindow.h"
|
||||||
#include "../ViewInfo.h"
|
#include "../ViewInfo.h"
|
||||||
#include "../widgets/AButton.h"
|
#include "../widgets/AButton.h"
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
//This is needed for tooltips
|
//This is needed for tooltips
|
||||||
#include "../Project.h"
|
#include "../Project.h"
|
||||||
|
#include "../ProjectStatus.h"
|
||||||
#include <wx/tooltip.h>
|
#include <wx/tooltip.h>
|
||||||
|
|
||||||
#if wxUSE_ACCESSIBILITY
|
#if wxUSE_ACCESSIBILITY
|
||||||
@ -491,7 +492,7 @@ void AButton::OnMouseEvent(wxMouseEvent & event)
|
|||||||
if (mCursorIsInWindow)
|
if (mCursorIsInWindow)
|
||||||
UpdateStatus();
|
UpdateStatus();
|
||||||
else {
|
else {
|
||||||
GetActiveProject()->SetStatus(wxT(""));
|
ProjectStatus::Get( *GetActiveProject() ).Set(wxT(""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -508,7 +509,7 @@ void AButton::UpdateStatus()
|
|||||||
wxString tipText = pTip->GetTip();
|
wxString tipText = pTip->GetTip();
|
||||||
if (!mEnabled)
|
if (!mEnabled)
|
||||||
tipText += _(" (disabled)");
|
tipText += _(" (disabled)");
|
||||||
GetActiveProject()->SetStatus(tipText);
|
ProjectStatus::Get( *GetActiveProject() ).Set(tipText);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,7 @@ or ASlider.
|
|||||||
#include "../AColor.h"
|
#include "../AColor.h"
|
||||||
#include "../ImageManipulation.h"
|
#include "../ImageManipulation.h"
|
||||||
#include "../Project.h"
|
#include "../Project.h"
|
||||||
|
#include "../ProjectStatus.h"
|
||||||
#include "../ShuttleGui.h"
|
#include "../ShuttleGui.h"
|
||||||
|
|
||||||
#include "../AllThemeResources.h"
|
#include "../AllThemeResources.h"
|
||||||
@ -1092,7 +1093,7 @@ void LWSlider::OnMouseEvent(wxMouseEvent & event)
|
|||||||
{
|
{
|
||||||
// Display the tooltip in the status bar
|
// Display the tooltip in the status bar
|
||||||
wxString tip = GetTip(mCurrentValue);
|
wxString tip = GetTip(mCurrentValue);
|
||||||
GetActiveProject()->SetStatus(tip);
|
ProjectStatus::Get( *GetActiveProject() ).Set(tip);
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
else if (event.Leaving())
|
else if (event.Leaving())
|
||||||
@ -1101,7 +1102,7 @@ void LWSlider::OnMouseEvent(wxMouseEvent & event)
|
|||||||
{
|
{
|
||||||
ShowTip(false);
|
ShowTip(false);
|
||||||
}
|
}
|
||||||
GetActiveProject()->SetStatus(wxT(""));
|
ProjectStatus::Get( *GetActiveProject() ).Set(wxT(""));
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@
|
|||||||
#include "../prefs/GUISettings.h"
|
#include "../prefs/GUISettings.h"
|
||||||
#include "../Project.h"
|
#include "../Project.h"
|
||||||
#include "../ProjectAudioManager.h"
|
#include "../ProjectAudioManager.h"
|
||||||
|
#include "../ProjectStatus.h"
|
||||||
#include "../Prefs.h"
|
#include "../Prefs.h"
|
||||||
#include "../ShuttleGui.h"
|
#include "../ShuttleGui.h"
|
||||||
|
|
||||||
@ -757,14 +758,14 @@ void MeterPanel::OnMouse(wxMouseEvent &evt)
|
|||||||
|
|
||||||
#if wxUSE_TOOLTIPS // Not available in wxX11
|
#if wxUSE_TOOLTIPS // Not available in wxX11
|
||||||
if (evt.Leaving()){
|
if (evt.Leaving()){
|
||||||
GetActiveProject()->SetStatus(wxT(""));
|
ProjectStatus::Get( *GetActiveProject() ).Set(wxT(""));
|
||||||
}
|
}
|
||||||
else if (evt.Entering()) {
|
else if (evt.Entering()) {
|
||||||
// Display the tooltip in the status bar
|
// Display the tooltip in the status bar
|
||||||
wxToolTip * pTip = this->GetToolTip();
|
wxToolTip * pTip = this->GetToolTip();
|
||||||
if( pTip ) {
|
if( pTip ) {
|
||||||
wxString tipText = pTip->GetTip();
|
wxString tipText = pTip->GetTip();
|
||||||
GetActiveProject()->SetStatus(tipText);
|
ProjectStatus::Get( *GetActiveProject() ).Set(tipText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user