diff --git a/locale/POTFILES.in b/locale/POTFILES.in index 2c7b5ab6b..a9d706445 100644 --- a/locale/POTFILES.in +++ b/locale/POTFILES.in @@ -162,6 +162,8 @@ src/ProjectFileIORegistry.cpp src/ProjectFileIORegistry.h src/ProjectFSCK.cpp src/ProjectFSCK.h +src/ProjectSettings.cpp +src/ProjectSettings.h src/RealFFTf.cpp src/RealFFTf.h src/RealFFTf48x.cpp diff --git a/mac/Audacity.xcodeproj/project.pbxproj b/mac/Audacity.xcodeproj/project.pbxproj index c3452a5f5..e4bd56784 100644 --- a/mac/Audacity.xcodeproj/project.pbxproj +++ b/mac/Audacity.xcodeproj/project.pbxproj @@ -1211,6 +1211,7 @@ 5E08E014217E5F66003C6C99 /* LabelMenus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E08E013217E5F66003C6C99 /* LabelMenus.cpp */; }; 5E0A1CDD20E95FF7001AAF8D /* CellularPanel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E0A1CDB20E95FF7001AAF8D /* CellularPanel.cpp */; }; 5E10D9061EC8F81300B3AC57 /* PlayableTrackButtonHandles.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E10D9041EC8F81300B3AC57 /* PlayableTrackButtonHandles.cpp */; }; + 5E135A36229EDBE80076E983 /* ProjectSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E135A34229EDBE80076E983 /* ProjectSettings.cpp */; }; 5E15123D1DB000C000702E29 /* UIHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E15123B1DB000C000702E29 /* UIHandle.cpp */; }; 5E15125A1DB000DC00702E29 /* LabelTrackControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E1512401DB000DC00702E29 /* LabelTrackControls.cpp */; }; 5E15125B1DB000DC00702E29 /* LabelTrackUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E1512421DB000DC00702E29 /* LabelTrackUI.cpp */; }; @@ -3175,6 +3176,8 @@ 5E0D233E21B468BF0057D7C3 /* ClientData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientData.h; sourceTree = ""; }; 5E10D9041EC8F81300B3AC57 /* PlayableTrackButtonHandles.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlayableTrackButtonHandles.cpp; sourceTree = ""; }; 5E10D9051EC8F81300B3AC57 /* PlayableTrackButtonHandles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlayableTrackButtonHandles.h; sourceTree = ""; }; + 5E135A34229EDBE80076E983 /* ProjectSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProjectSettings.cpp; sourceTree = ""; }; + 5E135A35229EDBE80076E983 /* ProjectSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectSettings.h; sourceTree = ""; }; 5E1512381DB000C000702E29 /* HitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HitTestResult.h; sourceTree = ""; }; 5E1512391DB000C000702E29 /* RefreshCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RefreshCode.h; sourceTree = ""; }; 5E15123A1DB000C000702E29 /* TrackPanelMouseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrackPanelMouseEvent.h; sourceTree = ""; }; @@ -4360,6 +4363,7 @@ 1790B0D009883BFD008A330A /* Project.cpp */, 5E18CFEE2291C31000E75250 /* ProjectFileIORegistry.cpp */, 5ECF728C228B307E007F2A35 /* ProjectFSCK.cpp */, + 5E135A34229EDBE80076E983 /* ProjectSettings.cpp */, 28DABFBC0FF19DB100AC7848 /* RealFFTf.cpp */, EDFCEBA218894B2A00C98E51 /* RealFFTf48x.cpp */, 1790B0D209883BFD008A330A /* Resample.cpp */, @@ -4475,6 +4479,7 @@ 1790B0D109883BFD008A330A /* Project.h */, 5E18CFEF2291C31000E75250 /* ProjectFileIORegistry.h */, 5ECF728B228B307E007F2A35 /* ProjectFSCK.h */, + 5E135A35229EDBE80076E983 /* ProjectSettings.h */, 28DABFBD0FF19DB100AC7848 /* RealFFTf.h */, EDFCEBA318894B2A00C98E51 /* RealFFTf48x.h */, 5E1512391DB000C000702E29 /* RefreshCode.h */, @@ -8639,6 +8644,7 @@ 5E15126D1DB0010C00702E29 /* CommonTrackPanelCell.cpp in Sources */, 284FD04217FC72A50009A025 /* ScienFilter.cpp in Sources */, 284FD04517FC72EE0009A025 /* Biquad.cpp in Sources */, + 5E135A36229EDBE80076E983 /* ProjectSettings.cpp in Sources */, 28C3946D1818356800FDDAC9 /* AudacityLogger.cpp in Sources */, 28F2CED4181867BB00573D61 /* numformatter.cpp in Sources */, 28F2CED5181867BB00573D61 /* valnum.cpp in Sources */, diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index 9095c81f8..3344ddb27 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -83,6 +83,7 @@ It handles initialization and termination by subclassing wxApp. #include "MissingAliasFileDialog.h" #include "PluginManager.h" #include "Project.h" +#include "ProjectSettings.h" #include "Screenshot.h" #include "Sequence.h" #include "WaveTrack.h" diff --git a/src/BatchCommands.cpp b/src/BatchCommands.cpp index fcc4db34a..f6b7d342e 100644 --- a/src/BatchCommands.cpp +++ b/src/BatchCommands.cpp @@ -25,6 +25,7 @@ processing. See also MacrosWindow and ApplyMacroDialog. #include #include "Project.h" +#include "ProjectSettings.h" #include "commands/CommandManager.h" #include "effects/EffectManager.h" #include "FileNames.h" diff --git a/src/Dependencies.cpp b/src/Dependencies.cpp index a4ecd0422..9a240b4cb 100644 --- a/src/Dependencies.cpp +++ b/src/Dependencies.cpp @@ -53,6 +53,7 @@ AliasedFile s. #include "DirManager.h" #include "Prefs.h" #include "Project.h" +#include "ProjectSettings.h" #include "Sequence.h" #include "ShuttleGui.h" #include "WaveTrack.h" diff --git a/src/LabelTrack.cpp b/src/LabelTrack.cpp index 31ac4ba42..709afc905 100644 --- a/src/LabelTrack.cpp +++ b/src/LabelTrack.cpp @@ -63,6 +63,7 @@ for drawing different aspects of the label and its text box. #include "AllThemeResources.h" #include "AColor.h" #include "Project.h" +#include "ProjectSettings.h" #include "ProjectFileIORegistry.h" #include "TrackArtist.h" #include "TrackPanel.h" diff --git a/src/Makefile.am b/src/Makefile.am index e26ead79c..462363b1a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -213,6 +213,8 @@ audacity_SOURCES = \ ProjectFileIORegistry.h \ ProjectFSCK.cpp \ ProjectFSCK.h \ + ProjectSettings.cpp \ + ProjectSettings.h \ RealFFTf.cpp \ RealFFTf.h \ RealFFTf48x.cpp \ diff --git a/src/Makefile.in b/src/Makefile.in index bb7f369a0..dcdd55cd2 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -321,14 +321,14 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \ PluginManager.cpp PluginManager.h Printing.cpp Printing.h \ Profiler.cpp Profiler.h Project.cpp Project.h \ ProjectFileIORegistry.cpp ProjectFileIORegistry.h \ - ProjectFSCK.cpp ProjectFSCK.h RealFFTf.cpp RealFFTf.h \ - RealFFTf48x.cpp RealFFTf48x.h RefreshCode.h Resample.cpp \ - Resample.h RevisionIdent.h RingBuffer.cpp RingBuffer.h \ - Screenshot.cpp Screenshot.h SelectedRegion.cpp \ - SelectedRegion.h SelectionState.cpp SelectionState.h \ - Shuttle.cpp Shuttle.h ShuttleGetDefinition.cpp \ - ShuttleGetDefinition.h ShuttleGui.cpp ShuttleGui.h \ - ShuttlePrefs.cpp ShuttlePrefs.h Snap.cpp Snap.h \ + ProjectFSCK.cpp ProjectFSCK.h ProjectSettings.cpp \ + ProjectSettings.h RealFFTf.cpp RealFFTf.h RealFFTf48x.cpp \ + RealFFTf48x.h RefreshCode.h Resample.cpp Resample.h \ + RevisionIdent.h RingBuffer.cpp RingBuffer.h Screenshot.cpp \ + Screenshot.h SelectedRegion.cpp SelectedRegion.h \ + SelectionState.cpp SelectionState.h Shuttle.cpp Shuttle.h \ + ShuttleGetDefinition.cpp ShuttleGetDefinition.h ShuttleGui.cpp \ + ShuttleGui.h ShuttlePrefs.cpp ShuttlePrefs.h Snap.cpp Snap.h \ SoundActivatedRecord.cpp SoundActivatedRecord.h Spectrum.cpp \ Spectrum.h SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \ SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \ @@ -665,7 +665,8 @@ am_audacity_OBJECTS = $(am__objects_1) audacity-AboutDialog.$(OBJEXT) \ audacity-PluginManager.$(OBJEXT) audacity-Printing.$(OBJEXT) \ audacity-Profiler.$(OBJEXT) audacity-Project.$(OBJEXT) \ audacity-ProjectFileIORegistry.$(OBJEXT) \ - audacity-ProjectFSCK.$(OBJEXT) audacity-RealFFTf.$(OBJEXT) \ + audacity-ProjectFSCK.$(OBJEXT) \ + audacity-ProjectSettings.$(OBJEXT) audacity-RealFFTf.$(OBJEXT) \ audacity-RealFFTf48x.$(OBJEXT) audacity-Resample.$(OBJEXT) \ audacity-RingBuffer.$(OBJEXT) audacity-Screenshot.$(OBJEXT) \ audacity-SelectedRegion.$(OBJEXT) \ @@ -1383,14 +1384,14 @@ audacity_SOURCES = $(libaudacity_la_SOURCES) AboutDialog.cpp \ PluginManager.cpp PluginManager.h Printing.cpp Printing.h \ Profiler.cpp Profiler.h Project.cpp Project.h \ ProjectFileIORegistry.cpp ProjectFileIORegistry.h \ - ProjectFSCK.cpp ProjectFSCK.h RealFFTf.cpp RealFFTf.h \ - RealFFTf48x.cpp RealFFTf48x.h RefreshCode.h Resample.cpp \ - Resample.h RevisionIdent.h RingBuffer.cpp RingBuffer.h \ - Screenshot.cpp Screenshot.h SelectedRegion.cpp \ - SelectedRegion.h SelectionState.cpp SelectionState.h \ - Shuttle.cpp Shuttle.h ShuttleGetDefinition.cpp \ - ShuttleGetDefinition.h ShuttleGui.cpp ShuttleGui.h \ - ShuttlePrefs.cpp ShuttlePrefs.h Snap.cpp Snap.h \ + ProjectFSCK.cpp ProjectFSCK.h ProjectSettings.cpp \ + ProjectSettings.h RealFFTf.cpp RealFFTf.h RealFFTf48x.cpp \ + RealFFTf48x.h RefreshCode.h Resample.cpp Resample.h \ + RevisionIdent.h RingBuffer.cpp RingBuffer.h Screenshot.cpp \ + Screenshot.h SelectedRegion.cpp SelectedRegion.h \ + SelectionState.cpp SelectionState.h Shuttle.cpp Shuttle.h \ + ShuttleGetDefinition.cpp ShuttleGetDefinition.h ShuttleGui.cpp \ + ShuttleGui.h ShuttlePrefs.cpp ShuttlePrefs.h Snap.cpp Snap.h \ SoundActivatedRecord.cpp SoundActivatedRecord.h Spectrum.cpp \ Spectrum.h SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \ SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \ @@ -2559,6 +2560,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Project.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectFSCK.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectFileIORegistry.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectSettings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-RealFFTf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-RealFFTf48x.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Resample.Po@am__quote@ @@ -3988,6 +3990,20 @@ audacity-ProjectFSCK.obj: ProjectFSCK.cpp @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-ProjectFSCK.obj `if test -f 'ProjectFSCK.cpp'; then $(CYGPATH_W) 'ProjectFSCK.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectFSCK.cpp'; fi` +audacity-ProjectSettings.o: ProjectSettings.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectSettings.o -MD -MP -MF $(DEPDIR)/audacity-ProjectSettings.Tpo -c -o audacity-ProjectSettings.o `test -f 'ProjectSettings.cpp' || echo '$(srcdir)/'`ProjectSettings.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectSettings.Tpo $(DEPDIR)/audacity-ProjectSettings.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ProjectSettings.cpp' object='audacity-ProjectSettings.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-ProjectSettings.o `test -f 'ProjectSettings.cpp' || echo '$(srcdir)/'`ProjectSettings.cpp + +audacity-ProjectSettings.obj: ProjectSettings.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectSettings.obj -MD -MP -MF $(DEPDIR)/audacity-ProjectSettings.Tpo -c -o audacity-ProjectSettings.obj `if test -f 'ProjectSettings.cpp'; then $(CYGPATH_W) 'ProjectSettings.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectSettings.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectSettings.Tpo $(DEPDIR)/audacity-ProjectSettings.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ProjectSettings.cpp' object='audacity-ProjectSettings.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-ProjectSettings.obj `if test -f 'ProjectSettings.cpp'; then $(CYGPATH_W) 'ProjectSettings.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectSettings.cpp'; fi` + audacity-RealFFTf.o: RealFFTf.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-RealFFTf.o -MD -MP -MF $(DEPDIR)/audacity-RealFFTf.Tpo -c -o audacity-RealFFTf.o `test -f 'RealFFTf.cpp' || echo '$(srcdir)/'`RealFFTf.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-RealFFTf.Tpo $(DEPDIR)/audacity-RealFFTf.Po diff --git a/src/Menus.cpp b/src/Menus.cpp index 095f73007..a305fdd75 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -40,6 +40,7 @@ #endif // USE_MIDI #include "Prefs.h" #include "Project.h" +#include "ProjectSettings.h" #include "TrackPanel.h" #include "UndoManager.h" #include "ViewInfo.h" diff --git a/src/MixerBoard.cpp b/src/MixerBoard.cpp index 9769defc3..979da57a0 100644 --- a/src/MixerBoard.cpp +++ b/src/MixerBoard.cpp @@ -38,6 +38,7 @@ #include "KeyboardCapture.h" #include "Prefs.h" // for RTL_WORKAROUND #include "Project.h" +#include "ProjectSettings.h" #include "TrackPanel.h" // for EVT_TRACK_PANEL_TIMER #include "UndoManager.h" #include "WaveTrack.h" diff --git a/src/Project.cpp b/src/Project.cpp index 854dff472..58bd28f73 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -52,6 +52,7 @@ scroll information. It also has some status flags. #include "Project.h" #include "ProjectFileIORegistry.h" +#include "ProjectSettings.h" #include "Experimental.h" @@ -1375,36 +1376,6 @@ DefaultSpeedPlayOptions( AudacityProject &project ) return options; } -void ProjectSettings::UpdatePrefs() -{ - gPrefs->Read(wxT("/AudioFiles/ShowId3Dialog"), &mShowId3Dialog, true); - gPrefs->Read(wxT("/AudioFiles/NormalizeOnLoad"),&mNormalizeOnLoad, false); - gPrefs->Read(wxT("/GUI/EmptyCanBeDirty"), &mEmptyCanBeDirty, true ); - gPrefs->Read(wxT("/GUI/ShowSplashScreen"), &mShowSplashScreen, true); - gPrefs->Read(wxT("/GUI/Solo"), &mSoloPref, wxT("Simple")); - // Update the old default to the NEW default. - if (mSoloPref == wxT("Standard")) - mSoloPref = wxT("Simple"); - gPrefs->Read(wxT("/GUI/TracksFitVerticallyZoomed"), &mTracksFitVerticallyZoomed, false); - // gPrefs->Read(wxT("/GUI/UpdateSpectrogram"), &mViewInfo.bUpdateSpectrogram, true); - - // This code to change an empty projects rate is currently disabled, after discussion. - // The rule 'Default sample rate' only affects newly created projects was felt to - // be simpler and better. -#if 0 - // The DefaultProjectSample rate is the rate for new projects. - // Do not change this project's rate, unless there are no tracks. - if( TrackList::Get( *this ).size() == 0){ - gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"), &mRate, AudioIO::GetOptimalSupportedSampleRate()); - // If necessary, we change this rate in the selection toolbar too. - auto bar = SelectionBar::Get( *this ); - bar.SetRate( mRate ); - } -#endif - - mDefaultFormat = QualityPrefs::SampleFormatChoice(); -} - void AudacityProject::UpdatePrefs() { SetProjectTitle(); @@ -1680,36 +1651,6 @@ void AudacityProject::SSBL_ModifySpectralSelection(double &bottom, double &top, #endif } -const NumericFormatSymbol & ProjectSettings::GetFrequencySelectionFormatName() const -{ - return mFrequencySelectionFormatName; -} - -void ProjectSettings::SetFrequencySelectionFormatName(const NumericFormatSymbol & formatName) -{ - mFrequencySelectionFormatName = formatName; -} - -const NumericFormatSymbol & ProjectSettings::GetBandwidthSelectionFormatName() const -{ - return mBandwidthSelectionFormatName; -} - -void ProjectSettings::SetBandwidthSelectionFormatName(const NumericFormatSymbol & formatName) -{ - mBandwidthSelectionFormatName = formatName; -} - -void ProjectSettings::SetSelectionFormat(const NumericFormatSymbol & format) -{ - mSelectionFormat = format; -} - -const NumericFormatSymbol & ProjectSettings::GetSelectionFormat() const -{ - return mSelectionFormat; -} - void AudacityProject::AS_ModifySelection(double &start, double &end, bool done) { @@ -5195,34 +5136,6 @@ void AudacityProject::OnAudioIONewBlockFiles(const AutoSaveFile & blockFileLog) } } -void ProjectSettings::SetSnapTo(int snap) -{ - mSnapTo = snap; -} - -int ProjectSettings::GetSnapTo() const -{ - return mSnapTo; -} - -bool ProjectSettings::IsSyncLocked() const -{ -#ifdef EXPERIMENTAL_SYNC_LOCK - return mIsSyncLocked; -#else - return false; -#endif -} - -void ProjectSettings::SetSyncLock(bool flag) -{ - auto &project = mProject; - if (flag != mIsSyncLocked) { - mIsSyncLocked = flag; - TrackPanel::Get( project ).Refresh(false); - } -} - bool AudacityProject::IsProjectSaved() { auto &project = *this; auto &dirManager = DirManager::Get( project ); @@ -5537,51 +5450,3 @@ void AudacityProject::CloseLock() mLastSavedTracks.reset(); } } - -static const AudacityProject::AttachedObjects::RegisteredFactory sProjectSettingsKey{ - []( AudacityProject &project ){ - auto result = std::make_shared< ProjectSettings >( project ); - return result; - } -}; - -ProjectSettings &ProjectSettings::Get( AudacityProject &project ) -{ - return project.AttachedObjects::Get< ProjectSettings >( sProjectSettingsKey ); -} - -const ProjectSettings &ProjectSettings::Get( const AudacityProject &project ) -{ - return Get( const_cast< AudacityProject & >( project ) ); -} - -ProjectSettings::ProjectSettings( AudacityProject &project ) -: mProject{ project } -, mSelectionFormat{ NumericTextCtrl::LookupFormat( - NumericConverter::TIME, - gPrefs->Read(wxT("/SelectionFormat"), wxT("")) ) -} -, mFrequencySelectionFormatName{ NumericTextCtrl::LookupFormat( - NumericConverter::FREQUENCY, - gPrefs->Read(wxT("/FrequencySelectionFormatName"), wxT("")) ) -} -, mBandwidthSelectionFormatName{ NumericTextCtrl::LookupFormat( - NumericConverter::BANDWIDTH, - gPrefs->Read(wxT("/BandwidthSelectionFormatName"), wxT("")) ) -} -, mDefaultFormat{ QualityPrefs::SampleFormatChoice() } -, mSnapTo( gPrefs->Read(wxT("/SnapTo"), SNAP_OFF) ) -{ - if (!gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"), &mRate, - AudioIO::GetOptimalSupportedSampleRate())) { - // The default given above can vary with host/devices. So unless there is - // an entry for the default sample rate in audacity.cfg, Audacity can open - // with a rate which is different from the rate with which it closed. - // See bug 1879. - gPrefs->Write(wxT("/SamplingRate/DefaultProjectSampleRate"), mRate); - gPrefs->Flush(); - } - gPrefs->Read(wxT("/GUI/SyncLockTracks"), &mIsSyncLocked, false); - - UpdatePrefs(); -} diff --git a/src/Project.h b/src/Project.h index a61efe723..ee06debd3 100644 --- a/src/Project.h +++ b/src/Project.h @@ -599,82 +599,6 @@ inline const wxFrame *FindProjectFrame( const AudacityProject *project ) { return project ? &GetProjectFrame( *project ) : nullptr; } -class ProjectSettings final - : public ClientData::Base - , private PrefsListener -{ -public: - static ProjectSettings &Get( AudacityProject &project ); - static const ProjectSettings &Get( const AudacityProject &project ); - - ProjectSettings( AudacityProject &project ); - - sampleFormat GetDefaultFormat() const { return mDefaultFormat; } - - double GetRate() const { return mRate; } - void SetRate( double value ) { mRate = value; } - - bool GetTracksFitVerticallyZoomed() const { return mTracksFitVerticallyZoomed; } //lda - void SetTracksFitVerticallyZoomed(bool flag) { mTracksFitVerticallyZoomed = flag; } //lda - - bool GetShowId3Dialog() const { return mShowId3Dialog; } //lda - void SetShowId3Dialog(bool flag) { mShowId3Dialog = flag; } //lda - - bool GetNormalizeOnLoad() const { return mNormalizeOnLoad; } //lda - void SetNormalizeOnLoad(bool flag) { mNormalizeOnLoad = flag; } //lda - - bool IsSyncLocked() const; - void SetSyncLock(bool flag); - - // Snap To - - void SetSnapTo(int snap); - int GetSnapTo() const; - - // Selection Format - - void SetSelectionFormat(const NumericFormatSymbol & format); - const NumericFormatSymbol & GetSelectionFormat() const; - - // Spectral Selection Formats - - void SetFrequencySelectionFormatName(const NumericFormatSymbol & format); - const NumericFormatSymbol & GetFrequencySelectionFormatName() const; - - void SetBandwidthSelectionFormatName(const NumericFormatSymbol & format); - const NumericFormatSymbol & GetBandwidthSelectionFormatName() const; - - bool IsSoloSimple() const { return mSoloPref == wxT("Simple"); } - bool IsSoloNone() const { return mSoloPref == wxT("None"); } - - bool EmptyCanBeDirty() const { return mEmptyCanBeDirty; } - - bool GetShowSplashScreen() const { return mShowSplashScreen; } - -private: - void UpdatePrefs() override; - - AudacityProject &mProject; - - NumericFormatSymbol mSelectionFormat; - NumericFormatSymbol mFrequencySelectionFormatName; - NumericFormatSymbol mBandwidthSelectionFormatName; - - wxString mSoloPref; - - double mRate; - - sampleFormat mDefaultFormat; - int mSnapTo; - - bool mTracksFitVerticallyZoomed{ false }; //lda - bool mShowId3Dialog{ true }; //lda - bool mNormalizeOnLoad; //lda - bool mIsSyncLocked{ false }; - bool mEmptyCanBeDirty; - bool mShowSplashScreen; -}; - AudioIOStartStreamOptions DefaultPlayOptions( AudacityProject &project ); AudioIOStartStreamOptions DefaultSpeedPlayOptions( AudacityProject &project ); diff --git a/src/ProjectSettings.cpp b/src/ProjectSettings.cpp new file mode 100644 index 000000000..5b58b935a --- /dev/null +++ b/src/ProjectSettings.cpp @@ -0,0 +1,163 @@ +/********************************************************************** + +Audacity: A Digital Audio Editor + +ProjectSettings.cpp + +Paul Licameli split from AudacityProject.cpp + +**********************************************************************/ + +#include "ProjectSettings.h" + +#include "AudioIO.h" +#include "Project.h" +#include "Snap.h" +#include "TrackPanel.h" +#include "prefs/QualityPrefs.h" + +static const AudacityProject::AttachedObjects::RegisteredFactory +sProjectSettingsKey{ + []( AudacityProject &project ){ + auto result = std::make_shared< ProjectSettings >( project ); + return result; + } +}; + +ProjectSettings &ProjectSettings::Get( AudacityProject &project ) +{ + return project.AttachedObjects::Get< ProjectSettings >( + sProjectSettingsKey ); +} + +const ProjectSettings &ProjectSettings::Get( const AudacityProject &project ) +{ + return Get( const_cast< AudacityProject & >( project ) ); +} + +ProjectSettings::ProjectSettings( AudacityProject &project ) +: mProject{ project } +, mSelectionFormat{ NumericTextCtrl::LookupFormat( + NumericConverter::TIME, + gPrefs->Read(wxT("/SelectionFormat"), wxT("")) ) +} +, mFrequencySelectionFormatName{ NumericTextCtrl::LookupFormat( + NumericConverter::FREQUENCY, + gPrefs->Read(wxT("/FrequencySelectionFormatName"), wxT("")) ) +} +, mBandwidthSelectionFormatName{ NumericTextCtrl::LookupFormat( + NumericConverter::BANDWIDTH, + gPrefs->Read(wxT("/BandwidthSelectionFormatName"), wxT("")) ) +} +, mDefaultFormat{ QualityPrefs::SampleFormatChoice() } +, mSnapTo( gPrefs->Read(wxT("/SnapTo"), SNAP_OFF) ) +{ + if (!gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"), &mRate, + AudioIO::GetOptimalSupportedSampleRate())) { + // The default given above can vary with host/devices. So unless there is + // an entry for the default sample rate in audacity.cfg, Audacity can open + // with a rate which is different from the rate with which it closed. + // See bug 1879. + gPrefs->Write(wxT("/SamplingRate/DefaultProjectSampleRate"), mRate); + gPrefs->Flush(); + } + gPrefs->Read(wxT("/GUI/SyncLockTracks"), &mIsSyncLocked, false); + + UpdatePrefs(); +} + +void ProjectSettings::UpdatePrefs() +{ + gPrefs->Read(wxT("/AudioFiles/ShowId3Dialog"), &mShowId3Dialog, true); + gPrefs->Read(wxT("/AudioFiles/NormalizeOnLoad"),&mNormalizeOnLoad, false); + gPrefs->Read(wxT("/GUI/EmptyCanBeDirty"), &mEmptyCanBeDirty, true ); + gPrefs->Read(wxT("/GUI/ShowSplashScreen"), &mShowSplashScreen, true); + gPrefs->Read(wxT("/GUI/Solo"), &mSoloPref, wxT("Simple")); + // Update the old default to the NEW default. + if (mSoloPref == wxT("Standard")) + mSoloPref = wxT("Simple"); + gPrefs->Read(wxT("/GUI/TracksFitVerticallyZoomed"), + &mTracksFitVerticallyZoomed, false); + // gPrefs->Read(wxT("/GUI/UpdateSpectrogram"), + // &mViewInfo.bUpdateSpectrogram, true); + + // This code to change an empty projects rate is currently disabled, after + // discussion. The rule 'Default sample rate' only affects newly created + // projects was felt to be simpler and better. +#if 0 + // The DefaultProjectSample rate is the rate for new projects. + // Do not change this project's rate, unless there are no tracks. + if( TrackList::Get( *this ).size() == 0){ + gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"), &mRate, + AudioIO::GetOptimalSupportedSampleRate()); + // If necessary, we change this rate in the selection toolbar too. + auto bar = SelectionBar::Get( *this ); + bar.SetRate( mRate ); + } +#endif + + mDefaultFormat = QualityPrefs::SampleFormatChoice(); +} + +const NumericFormatSymbol & +ProjectSettings::GetFrequencySelectionFormatName() const +{ + return mFrequencySelectionFormatName; +} + +void ProjectSettings::SetFrequencySelectionFormatName( + const NumericFormatSymbol & formatName) +{ + mFrequencySelectionFormatName = formatName; +} + +const NumericFormatSymbol & +ProjectSettings::GetBandwidthSelectionFormatName() const +{ + return mBandwidthSelectionFormatName; +} + +void ProjectSettings::SetBandwidthSelectionFormatName( + const NumericFormatSymbol & formatName) +{ + mBandwidthSelectionFormatName = formatName; +} + +void ProjectSettings::SetSelectionFormat(const NumericFormatSymbol & format) +{ + mSelectionFormat = format; +} + +const NumericFormatSymbol & ProjectSettings::GetSelectionFormat() const +{ + return mSelectionFormat; +} + +void ProjectSettings::SetSnapTo(int snap) +{ + mSnapTo = snap; +} + +int ProjectSettings::GetSnapTo() const +{ + return mSnapTo; +} + +bool ProjectSettings::IsSyncLocked() const +{ +#ifdef EXPERIMENTAL_SYNC_LOCK + return mIsSyncLocked; +#else + return false; +#endif +} + +void ProjectSettings::SetSyncLock(bool flag) +{ + auto &project = mProject; + if (flag != mIsSyncLocked) { + mIsSyncLocked = flag; + TrackPanel::Get( project ).Refresh(false); + } +} + diff --git a/src/ProjectSettings.h b/src/ProjectSettings.h new file mode 100644 index 000000000..f8c2a3f66 --- /dev/null +++ b/src/ProjectSettings.h @@ -0,0 +1,97 @@ +/********************************************************************** + +Audacity: A Digital Audio Editor + +ProjectSettings.h + +Paul Licameli split from AudacityProject.h + +**********************************************************************/ + +#ifndef __AUDACITY_PROJECT_SETTINGS__ +#define __AUDACITY_PROJECT_SETTINGS__ + +#include "ClientData.h" // to inherit +#include "Prefs.h" // to inherit + +class AudacityProject; + +///\brief Holds various per-project settings values, including the sample rate, +/// and sends events to the project when certain values change +class ProjectSettings final + : public ClientData::Base + , private PrefsListener +{ +public: + static ProjectSettings &Get( AudacityProject &project ); + static const ProjectSettings &Get( const AudacityProject &project ); + + ProjectSettings( AudacityProject &project ); + + sampleFormat GetDefaultFormat() const { return mDefaultFormat; } + + double GetRate() const { return mRate; } + void SetRate( double value ) { mRate = value; } + + bool GetTracksFitVerticallyZoomed() const { return mTracksFitVerticallyZoomed; } //lda + void SetTracksFitVerticallyZoomed(bool flag) { mTracksFitVerticallyZoomed = flag; } //lda + + bool GetShowId3Dialog() const { return mShowId3Dialog; } //lda + void SetShowId3Dialog(bool flag) { mShowId3Dialog = flag; } //lda + + bool GetNormalizeOnLoad() const { return mNormalizeOnLoad; } //lda + void SetNormalizeOnLoad(bool flag) { mNormalizeOnLoad = flag; } //lda + + bool IsSyncLocked() const; + void SetSyncLock(bool flag); + + // Snap To + + void SetSnapTo(int snap); + int GetSnapTo() const; + + // Selection Format + + void SetSelectionFormat(const NumericFormatSymbol & format); + const NumericFormatSymbol & GetSelectionFormat() const; + + // Spectral Selection Formats + + void SetFrequencySelectionFormatName(const NumericFormatSymbol & format); + const NumericFormatSymbol & GetFrequencySelectionFormatName() const; + + void SetBandwidthSelectionFormatName(const NumericFormatSymbol & format); + const NumericFormatSymbol & GetBandwidthSelectionFormatName() const; + + bool IsSoloSimple() const { return mSoloPref == wxT("Simple"); } + bool IsSoloNone() const { return mSoloPref == wxT("None"); } + + bool EmptyCanBeDirty() const { return mEmptyCanBeDirty; } + + bool GetShowSplashScreen() const { return mShowSplashScreen; } + +private: + void UpdatePrefs() override; + + AudacityProject &mProject; + + NumericFormatSymbol mSelectionFormat; + NumericFormatSymbol mFrequencySelectionFormatName; + NumericFormatSymbol mBandwidthSelectionFormatName; + + wxString mSoloPref; + + double mRate; + + sampleFormat mDefaultFormat; + int mSnapTo; + + bool mTracksFitVerticallyZoomed{ false }; //lda + bool mShowId3Dialog{ true }; //lda + bool mNormalizeOnLoad; //lda + bool mIsSyncLocked{ false }; + bool mEmptyCanBeDirty; + bool mShowSplashScreen; +}; + +#endif diff --git a/src/Snap.cpp b/src/Snap.cpp index ea19857e3..e2cf7fdd0 100644 --- a/src/Snap.cpp +++ b/src/Snap.cpp @@ -15,6 +15,7 @@ #include #include "Project.h" +#include "ProjectSettings.h" #include "LabelTrack.h" #include "NoteTrack.h" #include "WaveClip.h" diff --git a/src/TimeTrack.cpp b/src/TimeTrack.cpp index d384afe55..4d85b828b 100644 --- a/src/TimeTrack.cpp +++ b/src/TimeTrack.cpp @@ -27,6 +27,7 @@ #include "Envelope.h" #include "Prefs.h" #include "Project.h" +#include "ProjectSettings.h" #include "ProjectFileIORegistry.h" #include "TrackArtist.h" #include "ViewInfo.h" diff --git a/src/Track.cpp b/src/Track.cpp index 65fa56340..6a74a5d18 100644 --- a/src/Track.cpp +++ b/src/Track.cpp @@ -40,6 +40,7 @@ and TimeTrack. #include "NoteTrack.h" #include "LabelTrack.h" #include "Project.h" +#include "ProjectSettings.h" #include "DirManager.h" #include "InconsistencyException.h" diff --git a/src/WaveTrack.cpp b/src/WaveTrack.cpp index 9e021b64d..901256aa0 100644 --- a/src/WaveTrack.cpp +++ b/src/WaveTrack.cpp @@ -49,6 +49,7 @@ Track classes. #include "Project.h" #include "ProjectFileIORegistry.h" +#include "ProjectSettings.h" #include "AudioIO.h" #include "Prefs.h" diff --git a/src/effects/Contrast.cpp b/src/effects/Contrast.cpp index dbb32c78b..3c27898b9 100644 --- a/src/effects/Contrast.cpp +++ b/src/effects/Contrast.cpp @@ -15,6 +15,7 @@ #include "../WaveTrack.h" #include "../Prefs.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../ShuttleGui.h" #include "../FileNames.h" #include "../ViewInfo.h" diff --git a/src/effects/Effect.cpp b/src/effects/Effect.cpp index 2496073f9..f2d07400c 100644 --- a/src/effects/Effect.cpp +++ b/src/effects/Effect.cpp @@ -55,6 +55,7 @@ greater use in future. #include "../PluginManager.h" #include "../Prefs.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../PluginManager.h" #include "../ShuttleGui.h" #include "../Shuttle.h" diff --git a/src/effects/Equalization.cpp b/src/effects/Equalization.cpp index 21090a20d..3bd7379d7 100644 --- a/src/effects/Equalization.cpp +++ b/src/effects/Equalization.cpp @@ -98,6 +98,7 @@ #include "../FFT.h" #include "../Prefs.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../TrackArtist.h" #include "../WaveClip.h" #include "../ViewInfo.h" diff --git a/src/effects/ScienFilter.cpp b/src/effects/ScienFilter.cpp index b26ce1344..70d67aeaf 100644 --- a/src/effects/ScienFilter.cpp +++ b/src/effects/ScienFilter.cpp @@ -56,6 +56,7 @@ a graph for EffectScienFilter. #include "../PlatformCompatibility.h" #include "../Prefs.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../Shuttle.h" #include "../ShuttleGui.h" #include "../WaveTrack.h" diff --git a/src/effects/ToneGen.cpp b/src/effects/ToneGen.cpp index 30b78c33c..d0db6b5cd 100644 --- a/src/effects/ToneGen.cpp +++ b/src/effects/ToneGen.cpp @@ -29,6 +29,7 @@ frequency changes smoothly during the tone. #include #include "../Project.h" +#include "../ProjectSettings.h" #include "../Shuttle.h" #include "../ShuttleGui.h" #include "../widgets/valnum.h" diff --git a/src/effects/TruncSilence.cpp b/src/effects/TruncSilence.cpp index 41c974cc5..e92f1d795 100644 --- a/src/effects/TruncSilence.cpp +++ b/src/effects/TruncSilence.cpp @@ -29,6 +29,7 @@ #include "../Prefs.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../Shuttle.h" #include "../ShuttleGui.h" #include "../WaveTrack.h" diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index 9ee460e45..2b7008d4b 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -61,6 +61,7 @@ effects from this one class. #include "../../TimeTrack.h" #include "../../prefs/SpectrogramSettings.h" #include "../../Project.h" +#include "../../ProjectSettings.h" #include "../../ShuttleGetDefinition.h" #include "../../ShuttleGui.h" #include "../../ViewInfo.h" diff --git a/src/export/Export.cpp b/src/export/Export.cpp index 87464d3d2..ba3d2cf95 100644 --- a/src/export/Export.cpp +++ b/src/export/Export.cpp @@ -65,6 +65,7 @@ #include "../Mix.h" #include "../Prefs.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../ShuttleGui.h" #include "../WaveTrack.h" #include "../widgets/AudacityMessageBox.h" diff --git a/src/export/ExportCL.cpp b/src/export/ExportCL.cpp index 25e130bbe..e265653d1 100644 --- a/src/export/ExportCL.cpp +++ b/src/export/ExportCL.cpp @@ -14,7 +14,7 @@ #include "../Audacity.h" #include "ExportCL.h" -#include "../Project.h" +#include "../ProjectSettings.h" #include #include diff --git a/src/export/ExportFFmpeg.cpp b/src/export/ExportFFmpeg.cpp index 09daabfe2..05dcc0249 100644 --- a/src/export/ExportFFmpeg.cpp +++ b/src/export/ExportFFmpeg.cpp @@ -37,7 +37,7 @@ function. #include "../FileFormats.h" #include "../Mix.h" -#include "../Project.h" +#include "../ProjectSettings.h" #include "../Tags.h" #include "../Track.h" #include "../widgets/AudacityMessageBox.h" diff --git a/src/export/ExportFLAC.cpp b/src/export/ExportFLAC.cpp index 1a858fe96..2741295fc 100644 --- a/src/export/ExportFLAC.cpp +++ b/src/export/ExportFLAC.cpp @@ -32,7 +32,7 @@ and libvorbis examples, Monty #include "FLAC++/encoder.h" #include "../float_cast.h" -#include "../Project.h" +#include "../ProjectSettings.h" #include "../Mix.h" #include "../Prefs.h" #include "../ShuttleGui.h" diff --git a/src/export/ExportMP2.cpp b/src/export/ExportMP2.cpp index d6bbcbf1f..66e829f1d 100644 --- a/src/export/ExportMP2.cpp +++ b/src/export/ExportMP2.cpp @@ -50,7 +50,7 @@ #include "../FileIO.h" #include "../Mix.h" #include "../Prefs.h" -#include "../Project.h" +#include "../ProjectSettings.h" #include "../ShuttleGui.h" #include "../Tags.h" #include "../Track.h" diff --git a/src/export/ExportMP3.cpp b/src/export/ExportMP3.cpp index 237cb2ade..21a4338bd 100644 --- a/src/export/ExportMP3.cpp +++ b/src/export/ExportMP3.cpp @@ -85,6 +85,7 @@ #include "../Mix.h" #include "../Prefs.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../ShuttleGui.h" #include "../Tags.h" #include "../Track.h" diff --git a/src/export/ExportMultiple.cpp b/src/export/ExportMultiple.cpp index 316f318ee..28afa5f5d 100644 --- a/src/export/ExportMultiple.cpp +++ b/src/export/ExportMultiple.cpp @@ -43,6 +43,7 @@ #include "../FileNames.h" #include "../LabelTrack.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../Prefs.h" #include "../SelectionState.h" #include "../ShuttleGui.h" diff --git a/src/export/ExportOGG.cpp b/src/export/ExportOGG.cpp index fa112e1da..04b9f0876 100644 --- a/src/export/ExportOGG.cpp +++ b/src/export/ExportOGG.cpp @@ -28,7 +28,7 @@ #include #include "../FileIO.h" -#include "../Project.h" +#include "../ProjectSettings.h" #include "../Mix.h" #include "../Prefs.h" #include "../ShuttleGui.h" diff --git a/src/export/ExportPCM.cpp b/src/export/ExportPCM.cpp index 174f99eee..cbdaf91d0 100644 --- a/src/export/ExportPCM.cpp +++ b/src/export/ExportPCM.cpp @@ -28,7 +28,7 @@ #include "../FileFormats.h" #include "../Mix.h" #include "../Prefs.h" -#include "../Project.h" +#include "../ProjectSettings.h" #include "../ShuttleGui.h" #include "../Tags.h" #include "../Track.h" diff --git a/src/menus/ClipMenus.cpp b/src/menus/ClipMenus.cpp index 367f92207..46e85fcd4 100644 --- a/src/menus/ClipMenus.cpp +++ b/src/menus/ClipMenus.cpp @@ -1,4 +1,5 @@ #include "../Project.h" +#include "../ProjectSettings.h" #include "../TrackPanel.h" #include "../UndoManager.h" #include "../WaveClip.h" diff --git a/src/menus/EditMenus.cpp b/src/menus/EditMenus.cpp index f1be7646c..043b5620b 100644 --- a/src/menus/EditMenus.cpp +++ b/src/menus/EditMenus.cpp @@ -6,6 +6,7 @@ #include "../NoteTrack.h" #include "../Prefs.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../Tags.h" #include "../TimeTrack.h" #include "../TrackPanel.h" diff --git a/src/menus/PluginMenus.cpp b/src/menus/PluginMenus.cpp index 6fb4ee77e..b04f1116f 100644 --- a/src/menus/PluginMenus.cpp +++ b/src/menus/PluginMenus.cpp @@ -10,6 +10,7 @@ #include "../PluginManager.h" #include "../Prefs.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../Screenshot.h" #include "../TrackPanel.h" #include "../ViewInfo.h" diff --git a/src/menus/SelectMenus.cpp b/src/menus/SelectMenus.cpp index 4b875f6a4..24131b949 100644 --- a/src/menus/SelectMenus.cpp +++ b/src/menus/SelectMenus.cpp @@ -7,6 +7,7 @@ #include "../Menus.h" // for PrefsListener #include "../Prefs.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../SelectionState.h" #include "../TimeDialog.h" #include "../TrackPanel.h" diff --git a/src/menus/TrackMenus.cpp b/src/menus/TrackMenus.cpp index b8e63373a..788a19f4a 100644 --- a/src/menus/TrackMenus.cpp +++ b/src/menus/TrackMenus.cpp @@ -8,6 +8,7 @@ #include "../Prefs.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../PluginManager.h" #include "../ShuttleGui.h" #include "../TimeTrack.h" diff --git a/src/menus/TransportMenus.cpp b/src/menus/TransportMenus.cpp index 40ffe0aa7..e228a865a 100644 --- a/src/menus/TransportMenus.cpp +++ b/src/menus/TransportMenus.cpp @@ -8,6 +8,7 @@ #include "../Menus.h" #include "../Prefs.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../SoundActivatedRecord.h" #include "../TimerRecordDialog.h" #include "../TrackPanel.h" diff --git a/src/toolbars/ControlToolBar.cpp b/src/toolbars/ControlToolBar.cpp index 0c13a9397..ac90586db 100644 --- a/src/toolbars/ControlToolBar.cpp +++ b/src/toolbars/ControlToolBar.cpp @@ -66,6 +66,7 @@ #include "../Menus.h" #include "../Prefs.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../ViewInfo.h" #include "../widgets/AButton.h" #include "../widgets/Meter.h" diff --git a/src/tracks/playabletrack/notetrack/ui/StretchHandle.cpp b/src/tracks/playabletrack/notetrack/ui/StretchHandle.cpp index ab3e1a720..d4ca4025a 100644 --- a/src/tracks/playabletrack/notetrack/ui/StretchHandle.cpp +++ b/src/tracks/playabletrack/notetrack/ui/StretchHandle.cpp @@ -16,6 +16,7 @@ Paul Licameli split from TrackPanel.cpp #include "../../../../HitTestResult.h" #include "../../../../NoteTrack.h" #include "../../../../Project.h" +#include "../../../../ProjectSettings.h" #include "../../../../RefreshCode.h" #include "../../../../TrackPanelMouseEvent.h" #include "../../../../UndoManager.h" diff --git a/src/tracks/playabletrack/ui/PlayableTrackButtonHandles.cpp b/src/tracks/playabletrack/ui/PlayableTrackButtonHandles.cpp index 4eec49a23..91096d1de 100644 --- a/src/tracks/playabletrack/ui/PlayableTrackButtonHandles.cpp +++ b/src/tracks/playabletrack/ui/PlayableTrackButtonHandles.cpp @@ -14,6 +14,7 @@ Paul Licameli split from TrackPanel.cpp #include "../../../commands/CommandManager.h" #include "../../../Menus.h" #include "../../../Project.h" +#include "../../../ProjectSettings.h" #include "../../../RefreshCode.h" #include "../../../Track.h" #include "../../../TrackPanel.h" diff --git a/src/tracks/ui/SelectHandle.cpp b/src/tracks/ui/SelectHandle.cpp index 3807b4917..37b642ac5 100644 --- a/src/tracks/ui/SelectHandle.cpp +++ b/src/tracks/ui/SelectHandle.cpp @@ -21,6 +21,7 @@ Paul Licameli split from TrackPanel.cpp #include "../../Menus.h" #include "../../NumberScale.h" #include "../../Project.h" +#include "../../ProjectSettings.h" #include "../../RefreshCode.h" #include "../../SelectionState.h" #include "../../TrackPanel.h" diff --git a/src/tracks/ui/TimeShiftHandle.cpp b/src/tracks/ui/TimeShiftHandle.cpp index d8a44a593..b6021d2ae 100644 --- a/src/tracks/ui/TimeShiftHandle.cpp +++ b/src/tracks/ui/TimeShiftHandle.cpp @@ -18,6 +18,7 @@ Paul Licameli split from TrackPanel.cpp #include "../../HitTestResult.h" #include "../../NoteTrack.h" #include "../../Project.h" +#include "../../ProjectSettings.h" #include "../../RefreshCode.h" #include "../../TrackPanelMouseEvent.h" #include "../../toolbars/ToolsToolBar.h" diff --git a/src/widgets/Meter.cpp b/src/widgets/Meter.cpp index 1934f1573..66bf4f846 100644 --- a/src/widgets/Meter.cpp +++ b/src/widgets/Meter.cpp @@ -67,6 +67,7 @@ #include "../ImageManipulation.h" #include "../prefs/GUISettings.h" #include "../Project.h" +#include "../ProjectSettings.h" #include "../Prefs.h" #include "../ShuttleGui.h" diff --git a/win/Projects/Audacity/Audacity.vcxproj b/win/Projects/Audacity/Audacity.vcxproj index 7bba31656..529440f65 100755 --- a/win/Projects/Audacity/Audacity.vcxproj +++ b/win/Projects/Audacity/Audacity.vcxproj @@ -223,6 +223,7 @@ + @@ -650,6 +651,7 @@ + diff --git a/win/Projects/Audacity/Audacity.vcxproj.filters b/win/Projects/Audacity/Audacity.vcxproj.filters index e67db9739..02fa75a49 100755 --- a/win/Projects/Audacity/Audacity.vcxproj.filters +++ b/win/Projects/Audacity/Audacity.vcxproj.filters @@ -266,6 +266,9 @@ src + + src + src @@ -1324,6 +1327,9 @@ src + + src + src