1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 15:49:41 +02:00

Bug 893 - Spectral Selection Toolbar misnamed

This commit is contained in:
James Crook 2018-03-25 19:25:35 +01:00
parent e48bd77ea2
commit eaada3a51d
8 changed files with 18 additions and 18 deletions

View File

@ -662,7 +662,7 @@ void AudacityProject::CreateMenusAndCommands()
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
c->BeginSubMenu(_("S&pectral"));
c->AddItem(wxT("ToggleSpectralSelection"), XXO("To&ggle Spectral Selection"), FN(OnToggleSpectralSelection), wxT("Q"));
c->AddItem(wxT("ToggleFrequencySelection"), XXO("To&ggle Frequency Selection"), FN(OnToggleSpectralSelection), wxT("Q"));
c->AddItem(wxT("NextHigherPeakFrequency"), XXO("Next &Higher Peak Frequency"), FN(OnNextHigherPeakFrequency));
c->AddItem(wxT("NextLowerPeakFrequency"), XXO("Next &Lower Peak Frequency"), FN(OnNextLowerPeakFrequency));
c->EndSubMenu();
@ -807,7 +807,7 @@ void AudacityProject::CreateMenusAndCommands()
c->AddCheck(wxT("ShowSelectionTB"), XXO("&Selection Toolbar"), FN(OnShowSelectionToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
/* i18n-hint: Clicking this menu item shows the toolbar for selecting a frequency range of audio*/
c->AddCheck(wxT("ShowSpectralSelectionTB"), XXO("Spe&ctral Selection Toolbar"), FN(OnShowSpectralSelectionToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
c->AddCheck(wxT("ShowFrequencySelectionTB"), XXO("Fre&quency Selection Toolbar"), FN(OnShowSpectralSelectionToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
#endif
c->EndSubMenu();
@ -2380,7 +2380,7 @@ void AudacityProject::ModifyToolbarMenus()
mCommandManager.Check(wxT("ShowSelectionTB"),
mToolManager->IsVisible(SelectionBarID));
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
mCommandManager.Check(wxT("ShowSpectralSelectionTB"),
mCommandManager.Check(wxT("ShowFrequencySelectionTB"),
mToolManager->IsVisible(SpectralSelectionBarID));
#endif
mCommandManager.Check(wxT("ShowToolsTB"),

View File

@ -389,7 +389,7 @@ void ScreenFrame::PopulateOrExchange(ShuttleGui & S)
S.StartHorizontalLay();
{
S.Id(IdCaptureSelectionBar).AddButton(_("SelectionBar"));
S.Id(IdCaptureSpectralSelection).AddButton(_("Spectral Selection"));
S.Id(IdCaptureSpectralSelection).AddButton(_("Frequency Selection"));
S.Id(IdCaptureTools).AddButton(_("Tools"));
S.Id(IdCaptureTransport).AddButton(_("Transport"));
}

View File

@ -94,7 +94,7 @@ static const wxString kCaptureWhatStrings[nCaptureWhats] =
XO("Scriptables"),
XO("Preferences"),
XO("Selectionbar"),
XO("Spectral_Selection"),
XO("Frequency_Selection"),
XO("Tools"),
XO("Transport"),
XO("Mixer"),
@ -868,7 +868,7 @@ bool ScreenshotCommand::Apply(const CommandContext & context)
CapturePreferences(context, context.GetProject(), mFileName);
else if (mCaptureMode.IsSameAs(wxT("Selectionbar")))
return CaptureToolbar(context, context.GetProject()->GetToolManager(), SelectionBarID, mFileName);
else if (mCaptureMode.IsSameAs(wxT("Spectral_Selection")))
else if (mCaptureMode.IsSameAs(wxT("Frequency_Selection")))
return CaptureToolbar(context, context.GetProject()->GetToolManager(), SpectralSelectionBarID, mFileName);
else if (mCaptureMode.IsSameAs(wxT("Tools")))
return CaptureToolbar(context, context.GetProject()->GetToolManager(), ToolsBarID, mFileName);

View File

@ -65,7 +65,7 @@ public:
bool Apply(const CommandContext & context) override;
// AudacityCommand overrides
wxString ManualPage() override {return wxT("Spectral_Selection");};
wxString ManualPage() override {return wxT("Frequency_Selection");};
bool bHasBottom;
bool bHasTop;

View File

@ -529,7 +529,7 @@ bool NyquistEffect::Init()
}
if (!bAllowSpectralEditing || ((mF0 < 0.0) && (mF1 < 0.0))) {
Effect::MessageBox(_("To use 'Spectral effects', enable 'Spectral Selection'\n"
Effect::MessageBox(_("To use 'Spectral effects', enable 'Frequency Selection'\n"
"in the track Spectrogram settings and select the\n"
"frequency range for the effect to act on."),
wxOK | wxICON_EXCLAMATION | wxCENTRE, _("Error"));

View File

@ -38,7 +38,7 @@ SpectrogramSettings::Globals::Globals()
void SpectrogramSettings::Globals::SavePrefs()
{
#ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH
gPrefs->Write(wxT("/Spectrum/EnableSpectralSelection"), spectralSelection);
gPrefs->Write(wxT("/Spectrum/EnableFrequencySelection"), spectralSelection);
#endif
}
@ -46,7 +46,7 @@ void SpectrogramSettings::Globals::LoadPrefs()
{
#ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH
spectralSelection
= (gPrefs->Read(wxT("/Spectrum/EnableSpectralSelection"), 0L) != 0);
= (gPrefs->Read(wxT("/Spectrum/EnableFrequencySelection"), 0L) != 0);
#endif
}
@ -272,7 +272,7 @@ void SpectrogramSettings::LoadPrefs()
scaleType = ScaleType(gPrefs->Read(wxT("/Spectrum/ScaleType"), 0L));
#ifndef SPECTRAL_SELECTION_GLOBAL_SWITCH
spectralSelection = (gPrefs->Read(wxT("/Spectrum/EnableSpectralSelection"), 0L) != 0);
spectralSelection = (gPrefs->Read(wxT("/Spectrum/EnableFrequencySelection"), 0L) != 0);
#endif
algorithm = Algorithm(gPrefs->Read(wxT("/Spectrum/Algorithm"), 0L));
@ -320,7 +320,7 @@ void SpectrogramSettings::SavePrefs()
gPrefs->Write(wxT("/Spectrum/ScaleType"), (int) scaleType);
#ifndef SPECTRAL_SELECTION_GLOBAL_SWITCH
gPrefs->Write(wxT("/Spectrum/EnableSpectralSelection"), spectralSelection);
gPrefs->Write(wxT("/Spectrum/EnableFrequencySelection"), spectralSelection);
#endif
gPrefs->Write(wxT("/Spectrum/Algorithm"), (int) algorithm);

View File

@ -249,7 +249,7 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
S.EndStatic();
#ifndef SPECTRAL_SELECTION_GLOBAL_SWITCH
S.Id(ID_SPECTRAL_SELECTION).TieCheckBox(_("Ena&ble Spectral Selection"),
S.Id(ID_SPECTRAL_SELECTION).TieCheckBox(_("Ena&ble Frequency Selection"),
mTempSettings.spectralSelection);
#endif
@ -289,7 +289,7 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
#ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH
S.StartStatic(_("Global settings"));
{
S.TieCheckBox(_("Ena&ble spectral selection"),
S.TieCheckBox(_("Ena&ble frequency selection"),
SpectrogramSettings::Globals::Get().spectralSelection);
}
S.EndStatic();

View File

@ -84,10 +84,10 @@ BEGIN_EVENT_TABLE(SpectralSelectionBar, ToolBar)
END_EVENT_TABLE()
static const wxString preferencePath
(wxT("/GUI/Toolbars/SpectralSelection/CenterAndWidthChoice"));
(wxT("/GUI/Toolbars/FrequencySelection/CenterAndWidthChoice"));
SpectralSelectionBar::SpectralSelectionBar()
: ToolBar(SpectralSelectionBarID, _("Spectral Selection"), wxT("SpectralSelection"))
: ToolBar(SpectralSelectionBarID, _("Frequency Selection"), wxT("FrequencySelection"))
, mListener(NULL), mbCenterAndWidth(true)
, mCenter(0.0), mWidth(0.0), mLow(0.0), mHigh(0.0)
, mCenterCtrl(NULL), mWidthCtrl(NULL), mLowCtrl(NULL), mHighCtrl(NULL)
@ -146,7 +146,7 @@ void SpectralSelectionBar::Populate()
};
mChoice = safenew wxChoice
(this, OnChoiceID, wxDefaultPosition, wxDefaultSize, 2, choices,
0, wxDefaultValidator, _("Spectral Selection"));
0, wxDefaultValidator, _("Frequency Selection"));
mChoice->SetSelection(mbCenterAndWidth ? 0 : 1);
#ifdef __WXGTK__
// Combo boxes are taller on Linux, and if we don't do the following, the selection toolbar will
@ -232,7 +232,7 @@ void SpectralSelectionBar::UpdatePrefs()
}
// Set label to pull in language change
SetLabel(_("Spectral Selection"));
SetLabel(_("Frequency Selection"));
RegenerateTooltips();