1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-25 08:58:06 +02:00

Revert "Bug 893 - Spectral Selection Toolbar misnamed"

This reverts commit eaada3a51d1cea89e737eb73f607a089e07816a2.
This commit is contained in:
James Crook 2018-03-26 19:32:37 +01:00
parent d1ffb8a5b8
commit a4a588610e
8 changed files with 17 additions and 17 deletions

View File

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

View File

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

View File

@ -57,7 +57,7 @@ static const wxString kCaptureWhatStrings[ ScreenshotCommand::nCaptureWhats ] =
XO("Scriptables"), XO("Scriptables"),
XO("Preferences"), XO("Preferences"),
XO("Selectionbar"), XO("Selectionbar"),
XO("Frequency_Selection"), XO("Spectral_Selection"),
XO("Tools"), XO("Tools"),
XO("Transport"), XO("Transport"),
XO("Mixer"), XO("Mixer"),

View File

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

View File

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

View File

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

View File

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

View File

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