mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 14:02:57 +02:00
Move project status string management to new attached object class
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
|
||||
//This is needed for tooltips
|
||||
#include "../Project.h"
|
||||
#include "../ProjectStatus.h"
|
||||
#include <wx/tooltip.h>
|
||||
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
@@ -491,7 +492,7 @@ void AButton::OnMouseEvent(wxMouseEvent & event)
|
||||
if (mCursorIsInWindow)
|
||||
UpdateStatus();
|
||||
else {
|
||||
GetActiveProject()->SetStatus(wxT(""));
|
||||
ProjectStatus::Get( *GetActiveProject() ).Set(wxT(""));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -508,7 +509,7 @@ void AButton::UpdateStatus()
|
||||
wxString tipText = pTip->GetTip();
|
||||
if (!mEnabled)
|
||||
tipText += _(" (disabled)");
|
||||
GetActiveProject()->SetStatus(tipText);
|
||||
ProjectStatus::Get( *GetActiveProject() ).Set(tipText);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@@ -63,6 +63,7 @@ or ASlider.
|
||||
#include "../AColor.h"
|
||||
#include "../ImageManipulation.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectStatus.h"
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
#include "../AllThemeResources.h"
|
||||
@@ -1092,7 +1093,7 @@ void LWSlider::OnMouseEvent(wxMouseEvent & event)
|
||||
{
|
||||
// Display the tooltip in the status bar
|
||||
wxString tip = GetTip(mCurrentValue);
|
||||
GetActiveProject()->SetStatus(tip);
|
||||
ProjectStatus::Get( *GetActiveProject() ).Set(tip);
|
||||
Refresh();
|
||||
}
|
||||
else if (event.Leaving())
|
||||
@@ -1101,7 +1102,7 @@ void LWSlider::OnMouseEvent(wxMouseEvent & event)
|
||||
{
|
||||
ShowTip(false);
|
||||
}
|
||||
GetActiveProject()->SetStatus(wxT(""));
|
||||
ProjectStatus::Get( *GetActiveProject() ).Set(wxT(""));
|
||||
Refresh();
|
||||
}
|
||||
|
||||
|
@@ -69,6 +69,7 @@
|
||||
#include "../prefs/GUISettings.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectAudioManager.h"
|
||||
#include "../ProjectStatus.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
@@ -757,14 +758,14 @@ void MeterPanel::OnMouse(wxMouseEvent &evt)
|
||||
|
||||
#if wxUSE_TOOLTIPS // Not available in wxX11
|
||||
if (evt.Leaving()){
|
||||
GetActiveProject()->SetStatus(wxT(""));
|
||||
ProjectStatus::Get( *GetActiveProject() ).Set(wxT(""));
|
||||
}
|
||||
else if (evt.Entering()) {
|
||||
// Display the tooltip in the status bar
|
||||
wxToolTip * pTip = this->GetToolTip();
|
||||
if( pTip ) {
|
||||
wxString tipText = pTip->GetTip();
|
||||
GetActiveProject()->SetStatus(tipText);
|
||||
ProjectStatus::Get( *GetActiveProject() ).Set(tipText);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user