From 3b77af5dfcecef36ee97e6b09798e8b7c3d874bb Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sun, 2 Feb 2020 17:40:45 -0500 Subject: [PATCH] Remove TranslatableStringArray.h --- locale/POTFILES.in | 1 - mac/Audacity.xcodeproj/project.pbxproj | 2 - src/Makefile.am | 1 - src/Makefile.in | 64 +++++++++--------- src/Resample.cpp | 1 - src/Tags.cpp | 1 - src/TranslatableStringArray.h | 66 ------------------- src/effects/Distortion.cpp | 1 - src/export/ExportFFmpegDialogs.cpp | 1 - src/prefs/GUIPrefs.cpp | 9 --- src/prefs/SpectrogramSettings.cpp | 1 - src/prefs/WaveformSettings.cpp | 1 - src/widgets/NumericTextCtrl.cpp | 1 - win/Projects/Audacity/Audacity.vcxproj | 1 - .../Audacity/Audacity.vcxproj.filters | 3 - 15 files changed, 32 insertions(+), 122 deletions(-) delete mode 100644 src/TranslatableStringArray.h diff --git a/locale/POTFILES.in b/locale/POTFILES.in index 1b21507a7..b39670191 100644 --- a/locale/POTFILES.in +++ b/locale/POTFILES.in @@ -268,7 +268,6 @@ src/TrackPanelResizerCell.cpp src/TrackPanelResizerCell.h src/TrackUtilities.cpp src/TrackUtilities.h -src/TranslatableStringArray.h src/UIHandle.cpp src/UIHandle.h src/UndoManager.cpp diff --git a/mac/Audacity.xcodeproj/project.pbxproj b/mac/Audacity.xcodeproj/project.pbxproj index 1d598bb3d..f54e99f4d 100644 --- a/mac/Audacity.xcodeproj/project.pbxproj +++ b/mac/Audacity.xcodeproj/project.pbxproj @@ -2416,7 +2416,6 @@ 2840CF4B0AEB807E00F49FC3 /* util.c */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.c; name = util.c; path = twolame/libtwolame/util.c; sourceTree = ""; tabWidth = 3; }; 2840CF4C0AEB807E00F49FC3 /* util.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; name = util.h; path = twolame/libtwolame/util.h; sourceTree = ""; tabWidth = 3; }; 2840CF840AEB83DB00F49FC3 /* ExportMP2.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ExportMP2.cpp; sourceTree = ""; tabWidth = 3; }; - 284416391B82D6BC0000574D /* TranslatableStringArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TranslatableStringArray.h; sourceTree = ""; }; 2844163A1B82D6BC0000574D /* WaveTrackLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaveTrackLocation.h; sourceTree = ""; }; 28456AC00A2C180E00C23C1E /* ThemePrefs.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ThemePrefs.cpp; sourceTree = ""; tabWidth = 3; }; 28456AC10A2C180E00C23C1E /* ThemePrefs.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ThemePrefs.h; sourceTree = ""; tabWidth = 3; }; @@ -4709,7 +4708,6 @@ 5E74D2DB1CC4429700D88B0B /* tracks */, 5E2B3E5D22BD97A7005042E1 /* TrackUtilities.cpp */, 5E2B3E5E22BD97A7005042E1 /* TrackUtilities.h */, - 284416391B82D6BC0000574D /* TranslatableStringArray.h */, 5E15123B1DB000C000702E29 /* UIHandle.cpp */, 5E15123C1DB000C000702E29 /* UIHandle.h */, 1790B0F209883BFD008A330A /* UndoManager.cpp */, diff --git a/src/Makefile.am b/src/Makefile.am index 0cd34f5c6..b87e9ab33 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -314,7 +314,6 @@ audacity_SOURCES = \ TrackPanelResizerCell.h \ TrackUtilities.cpp \ TrackUtilities.h \ - TranslatableStringArray.h \ UIHandle.h \ UIHandle.cpp \ UndoManager.cpp \ diff --git a/src/Makefile.in b/src/Makefile.in index d3621b30c..2a1e709ff 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -355,22 +355,22 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \ TrackPanelListener.h TrackPanelMouseEvent.h \ TrackPanelResizeHandle.cpp TrackPanelResizeHandle.h \ TrackPanelResizerCell.cpp TrackPanelResizerCell.h \ - TrackUtilities.cpp TrackUtilities.h TranslatableStringArray.h \ - UIHandle.h UIHandle.cpp UndoManager.cpp UndoManager.h \ - UserException.cpp UserException.h ViewInfo.cpp ViewInfo.h \ - VoiceKey.cpp VoiceKey.h WaveClip.cpp WaveClip.h WaveTrack.cpp \ - WaveTrack.h WaveTrackLocation.h WrappedType.cpp WrappedType.h \ - ZoomInfo.cpp ZoomInfo.h wxFileNameWrapper.h \ - commands/AppCommandEvent.cpp commands/AppCommandEvent.h \ - commands/AudacityCommand.cpp commands/AudacityCommand.h \ - commands/BatchEvalCommand.cpp commands/BatchEvalCommand.h \ - commands/Command.cpp commands/Command.h \ - commands/CommandBuilder.cpp commands/CommandBuilder.h \ - commands/CommandContext.cpp commands/CommandContext.h \ - commands/CommandDirectory.cpp commands/CommandDirectory.h \ - commands/CommandFlag.h commands/CommandFunctors.h \ - commands/CommandHandler.cpp commands/CommandHandler.h \ - commands/CommandManager.cpp commands/CommandManager.h \ + TrackUtilities.cpp TrackUtilities.h UIHandle.h UIHandle.cpp \ + UndoManager.cpp UndoManager.h UserException.cpp \ + UserException.h ViewInfo.cpp ViewInfo.h VoiceKey.cpp \ + VoiceKey.h WaveClip.cpp WaveClip.h WaveTrack.cpp WaveTrack.h \ + WaveTrackLocation.h WrappedType.cpp WrappedType.h ZoomInfo.cpp \ + ZoomInfo.h wxFileNameWrapper.h commands/AppCommandEvent.cpp \ + commands/AppCommandEvent.h commands/AudacityCommand.cpp \ + commands/AudacityCommand.h commands/BatchEvalCommand.cpp \ + commands/BatchEvalCommand.h commands/Command.cpp \ + commands/Command.h commands/CommandBuilder.cpp \ + commands/CommandBuilder.h commands/CommandContext.cpp \ + commands/CommandContext.h commands/CommandDirectory.cpp \ + commands/CommandDirectory.h commands/CommandFlag.h \ + commands/CommandFunctors.h commands/CommandHandler.cpp \ + commands/CommandHandler.h commands/CommandManager.cpp \ + commands/CommandManager.h \ commands/CommandManagerWindowClasses.h commands/CommandMisc.h \ commands/CommandSignature.cpp commands/CommandSignature.h \ commands/CommandTargets.h commands/CommandType.cpp \ @@ -1883,22 +1883,22 @@ audacity_SOURCES = $(libaudacity_la_SOURCES) AboutDialog.cpp \ TrackPanelListener.h TrackPanelMouseEvent.h \ TrackPanelResizeHandle.cpp TrackPanelResizeHandle.h \ TrackPanelResizerCell.cpp TrackPanelResizerCell.h \ - TrackUtilities.cpp TrackUtilities.h TranslatableStringArray.h \ - UIHandle.h UIHandle.cpp UndoManager.cpp UndoManager.h \ - UserException.cpp UserException.h ViewInfo.cpp ViewInfo.h \ - VoiceKey.cpp VoiceKey.h WaveClip.cpp WaveClip.h WaveTrack.cpp \ - WaveTrack.h WaveTrackLocation.h WrappedType.cpp WrappedType.h \ - ZoomInfo.cpp ZoomInfo.h wxFileNameWrapper.h \ - commands/AppCommandEvent.cpp commands/AppCommandEvent.h \ - commands/AudacityCommand.cpp commands/AudacityCommand.h \ - commands/BatchEvalCommand.cpp commands/BatchEvalCommand.h \ - commands/Command.cpp commands/Command.h \ - commands/CommandBuilder.cpp commands/CommandBuilder.h \ - commands/CommandContext.cpp commands/CommandContext.h \ - commands/CommandDirectory.cpp commands/CommandDirectory.h \ - commands/CommandFlag.h commands/CommandFunctors.h \ - commands/CommandHandler.cpp commands/CommandHandler.h \ - commands/CommandManager.cpp commands/CommandManager.h \ + TrackUtilities.cpp TrackUtilities.h UIHandle.h UIHandle.cpp \ + UndoManager.cpp UndoManager.h UserException.cpp \ + UserException.h ViewInfo.cpp ViewInfo.h VoiceKey.cpp \ + VoiceKey.h WaveClip.cpp WaveClip.h WaveTrack.cpp WaveTrack.h \ + WaveTrackLocation.h WrappedType.cpp WrappedType.h ZoomInfo.cpp \ + ZoomInfo.h wxFileNameWrapper.h commands/AppCommandEvent.cpp \ + commands/AppCommandEvent.h commands/AudacityCommand.cpp \ + commands/AudacityCommand.h commands/BatchEvalCommand.cpp \ + commands/BatchEvalCommand.h commands/Command.cpp \ + commands/Command.h commands/CommandBuilder.cpp \ + commands/CommandBuilder.h commands/CommandContext.cpp \ + commands/CommandContext.h commands/CommandDirectory.cpp \ + commands/CommandDirectory.h commands/CommandFlag.h \ + commands/CommandFunctors.h commands/CommandHandler.cpp \ + commands/CommandHandler.h commands/CommandManager.cpp \ + commands/CommandManager.h \ commands/CommandManagerWindowClasses.h commands/CommandMisc.h \ commands/CommandSignature.cpp commands/CommandSignature.h \ commands/CommandTargets.h commands/CommandType.cpp \ diff --git a/src/Resample.cpp b/src/Resample.cpp index ece7db087..974854263 100644 --- a/src/Resample.cpp +++ b/src/Resample.cpp @@ -24,7 +24,6 @@ #include "Resample.h" #include "Prefs.h" -#include "TranslatableStringArray.h" #include "Internat.h" #include "../include/audacity/ComponentInterface.h" diff --git a/src/Tags.cpp b/src/Tags.cpp index 34234381a..9b16985a8 100644 --- a/src/Tags.cpp +++ b/src/Tags.cpp @@ -48,7 +48,6 @@ #include "Project.h" #include "ProjectFileIORegistry.h" #include "ShuttleGui.h" -#include "TranslatableStringArray.h" #include "widgets/Grid.h" #include "widgets/AudacityMessageBox.h" #include "widgets/HelpSystem.h" diff --git a/src/TranslatableStringArray.h b/src/TranslatableStringArray.h deleted file mode 100644 index 97f300b24..000000000 --- a/src/TranslatableStringArray.h +++ /dev/null @@ -1,66 +0,0 @@ -/********************************************************************** - -Audacity: A Digital Audio Editor - -TranslatableStringArray.h - -Paul Licameli - -**********************************************************************/ - -#ifndef __AUDACITY_TRANSLATABLE_STRING_ARRAY__ -#define __AUDACITY_TRANSLATABLE_STRING_ARRAY__ - -#include // used in inline function template - -class wxArrayStringEx; - -wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API, EVT_LANGUAGE_CHANGE, wxCommandEvent); - -/* -This class can maintain a static table containing user visible strings that updates -itself properly when the language is changed in Preferences. - -Typical usage is to define a derived class, override Populate(), and then -make a singleton instance of the class. - -Populate() is called only as needed to fill the table on demand the first -time it is used after application startup or language change. -*/ - -template class TranslatableArray /* not final */ - : public wxEvtHandler -{ -public: - - TranslatableArray() - { - if (wxTheApp) - wxTheApp->Bind(EVT_LANGUAGE_CHANGE, - &TranslatableArray::Invalidate, - this); - } - - const ArrayType& Get() - { - if (mContents.empty()) - Populate(); - return mContents; - } - -protected: - // Override this function to fill in mContents, - // typically by lines like - // mContents.push_back(_("Translate me")); - virtual void Populate() = 0; - - void Invalidate(wxCommandEvent &evt) - { - mContents.clear(); - evt.Skip(); - } - - ArrayType mContents; -}; - -#endif diff --git a/src/effects/Distortion.cpp b/src/effects/Distortion.cpp index 0d5abe530..ee1c3b683 100644 --- a/src/effects/Distortion.cpp +++ b/src/effects/Distortion.cpp @@ -46,7 +46,6 @@ #include "../Shuttle.h" #include "../ShuttleGui.h" #include "../widgets/valnum.h" -#include "../TranslatableStringArray.h" enum kTableType { diff --git a/src/export/ExportFFmpegDialogs.cpp b/src/export/ExportFFmpegDialogs.cpp index 149f14024..cc8b28e39 100644 --- a/src/export/ExportFFmpegDialogs.cpp +++ b/src/export/ExportFFmpegDialogs.cpp @@ -59,7 +59,6 @@ #include "../FileFormats.h" #include "../Mix.h" #include "../Tags.h" -#include "../TranslatableStringArray.h" #include "../widgets/AudacityMessageBox.h" #include "../widgets/HelpSystem.h" diff --git a/src/prefs/GUIPrefs.cpp b/src/prefs/GUIPrefs.cpp index b30818abc..8d44e4818 100644 --- a/src/prefs/GUIPrefs.cpp +++ b/src/prefs/GUIPrefs.cpp @@ -35,11 +35,8 @@ #include "ThemePrefs.h" #include "../AColor.h" -#include "../TranslatableStringArray.h" #include "../widgets/AudacityMessageBox.h" -wxDEFINE_EVENT(EVT_LANGUAGE_CHANGE, wxCommandEvent); - GUIPrefs::GUIPrefs(wxWindow * parent, wxWindowID winid) /* i18n-hint: refers to Audacity's user interface settings */ : PrefsPanel(parent, winid, XO("Interface")) @@ -350,12 +347,6 @@ wxString GUIPrefs::SetLang( const wxString & lang ) Internat::Init(); - // Notify listeners of language changes - { - wxCommandEvent evt(EVT_LANGUAGE_CHANGE); - wxTheApp->ProcessEvent(evt); - } - // Unused strings that we want to be translated, even though // we're not using them yet... using future1 = decltype( XO("Master Gain Control") ); diff --git a/src/prefs/SpectrogramSettings.cpp b/src/prefs/SpectrogramSettings.cpp index 4c690de9a..78e232d7b 100644 --- a/src/prefs/SpectrogramSettings.cpp +++ b/src/prefs/SpectrogramSettings.cpp @@ -19,7 +19,6 @@ Paul Licameli #include "../Experimental.h" #include "../NumberScale.h" -#include "../TranslatableStringArray.h" #include diff --git a/src/prefs/WaveformSettings.cpp b/src/prefs/WaveformSettings.cpp index 71d461bd6..71572b8e3 100644 --- a/src/prefs/WaveformSettings.cpp +++ b/src/prefs/WaveformSettings.cpp @@ -23,7 +23,6 @@ Paul Licameli #include #include "../Prefs.h" -#include "../TranslatableStringArray.h" WaveformSettings::Globals::Globals() diff --git a/src/widgets/NumericTextCtrl.cpp b/src/widgets/NumericTextCtrl.cpp index 7008463c5..19b20f334 100644 --- a/src/widgets/NumericTextCtrl.cpp +++ b/src/widgets/NumericTextCtrl.cpp @@ -172,7 +172,6 @@ different formats. #include "../AllThemeResources.h" #include "../AColor.h" #include "../KeyboardCapture.h" -#include "../TranslatableStringArray.h" #include #include diff --git a/win/Projects/Audacity/Audacity.vcxproj b/win/Projects/Audacity/Audacity.vcxproj index aed3b0cfd..39fb49fe2 100755 --- a/win/Projects/Audacity/Audacity.vcxproj +++ b/win/Projects/Audacity/Audacity.vcxproj @@ -647,7 +647,6 @@ - diff --git a/win/Projects/Audacity/Audacity.vcxproj.filters b/win/Projects/Audacity/Audacity.vcxproj.filters index 1805c387e..de0201398 100755 --- a/win/Projects/Audacity/Audacity.vcxproj.filters +++ b/win/Projects/Audacity/Audacity.vcxproj.filters @@ -2122,9 +2122,6 @@ src\effects\VST - - src - src