More factoring of former AudacityProject and cycle-breaking...
... Four more pieces of former AudacityProject are: 1 ProjectAudioManager, for the callbacks from AudioIO 2 ProjectSelectionManager, for the callbacks from selection toolbars 3 ProjectHistory, for interacting with the undo manager 4 ProjectFileManager, combining parts that were in ProjectManager and ProjectFileIO; it is intermediate between them To summarize relations among the nine pieces of former AudacityProject: ProjectManager (highest level) uses: ProjectAudioManager, which uses ProjectAudioIO, and ProjectFileManager, which uses ProjectSelectionManager and ProjectFileIO Those subordinate managers are also directly used elsewhere, avoiding uses of the top manager that would make cycles. ProjectHistory is used in many places to make undo transactions, and it also uses ProjectFileIO for auto-save. It uses ProjectWindow and ProjectSettings too. ProjectWindow is widely used, and uses ProjectAudioIO. ProjectAudioIO and ProjectSettings are lowest-level and widely used. Dependency of ProjectFileIO on ProjectWindow is now severed. AutoRecovery is also split in two, with a new high-level file for a dialog. There are thus five new .cpp files. ProjectAudioManager and ProjectHistory are still in the big strongly connected component, as still are ProjectAudioIO, ProjectFileIO, ProjectSettings, and ProjectWindow. 13 files, including ProjectManager, are freed from it to higher levels. Net loss of 11, leaving 102 files. Import file handles also use a registration system so Import.cpp doesn't depend on them. This move was needed to free ProjectManager and others from the cycles.
This commit is contained in:
commit
9bb5723777
|
@ -44,6 +44,8 @@ src/AudioIO.h
|
|||
src/AudioIOListener.h
|
||||
src/AutoRecovery.cpp
|
||||
src/AutoRecovery.h
|
||||
src/AutoRecoveryDialog.cpp
|
||||
src/AutoRecoveryDialog.h
|
||||
src/BatchCommandDialog.cpp
|
||||
src/BatchCommandDialog.h
|
||||
src/BatchCommands.cpp
|
||||
|
@ -160,14 +162,22 @@ src/Project.cpp
|
|||
src/Project.h
|
||||
src/ProjectAudioIO.cpp
|
||||
src/ProjectAudioIO.h
|
||||
src/ProjectAudioManager.cpp
|
||||
src/ProjectAudioManager.h
|
||||
src/ProjectFileIO.cpp
|
||||
src/ProjectFileIO.h
|
||||
src/ProjectFileIORegistry.cpp
|
||||
src/ProjectFileIORegistry.h
|
||||
src/ProjectFileManager.cpp
|
||||
src/ProjectFileManager.h
|
||||
src/ProjectFSCK.cpp
|
||||
src/ProjectFSCK.h
|
||||
src/ProjectHistory.cpp
|
||||
src/ProjectHistory.h
|
||||
src/ProjectManager.cpp
|
||||
src/ProjectManager.h
|
||||
src/ProjectSelectionManager.cpp
|
||||
src/ProjectSelectionManager.h
|
||||
src/ProjectSettings.cpp
|
||||
src/ProjectSettings.h
|
||||
src/ProjectWindow.cpp
|
||||
|
@ -497,25 +507,17 @@ src/import/FormatClassifier.h
|
|||
src/import/Import.cpp
|
||||
src/import/Import.h
|
||||
src/import/ImportFFmpeg.cpp
|
||||
src/import/ImportFFmpeg.h
|
||||
src/import/ImportFLAC.cpp
|
||||
src/import/ImportFLAC.h
|
||||
src/import/ImportForwards.h
|
||||
src/import/ImportGStreamer.cpp
|
||||
src/import/ImportGStreamer.h
|
||||
src/import/ImportLOF.cpp
|
||||
src/import/ImportLOF.h
|
||||
src/import/ImportMIDI.cpp
|
||||
src/import/ImportMIDI.h
|
||||
src/import/ImportMP3.cpp
|
||||
src/import/ImportMP3.h
|
||||
src/import/ImportOGG.cpp
|
||||
src/import/ImportOGG.h
|
||||
src/import/ImportPCM.cpp
|
||||
src/import/ImportPCM.h
|
||||
src/import/ImportPlugin.h
|
||||
src/import/ImportQT.cpp
|
||||
src/import/ImportQT.h
|
||||
src/import/ImportRaw.cpp
|
||||
src/import/ImportRaw.h
|
||||
src/import/MultiFormatReader.cpp
|
||||
|
|
|
@ -1216,6 +1216,7 @@
|
|||
5E135A3C229EDF2E0076E983 /* ProjectManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E135A3A229EDF2E0076E983 /* ProjectManager.cpp */; };
|
||||
5E135A45229EE4DE0076E983 /* ProjectFileIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E135A43229EE4DE0076E983 /* ProjectFileIO.cpp */; };
|
||||
5E135A48229EE5530076E983 /* ProjectWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E135A46229EE5530076E983 /* ProjectWindow.cpp */; };
|
||||
5E135A5122A93DC60076E983 /* ProjectAudioManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E135A4F22A93DC60076E983 /* ProjectAudioManager.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 */; };
|
||||
|
@ -1228,9 +1229,10 @@
|
|||
5E15126F1DB0010C00702E29 /* TrackUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E15126A1DB0010C00702E29 /* TrackUI.cpp */; };
|
||||
5E1512701DB0010C00702E29 /* TrackVRulerControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E15126B1DB0010C00702E29 /* TrackVRulerControls.cpp */; };
|
||||
5E16FF4D1FF9CE0B0085E1B8 /* LanguageNames.txt in Resources */ = {isa = PBXBuildFile; fileRef = 5E16FF4C1FF9CE0B0085E1B8 /* LanguageNames.txt */; };
|
||||
5E18CFF322931D3D00E75250 /* AudacityMessageBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E18CFF222931D3D00E75250 /* AudacityMessageBox.cpp */; };
|
||||
5E18CFF02291C31000E75250 /* ProjectFileIORegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E18CFEE2291C31000E75250 /* ProjectFileIORegistry.cpp */; };
|
||||
5E18CFF322931D3D00E75250 /* AudacityMessageBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E18CFF222931D3D00E75250 /* AudacityMessageBox.cpp */; };
|
||||
5E19D655217D51190024D0B1 /* PluginMenus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E19D64C217D51190024D0B1 /* PluginMenus.cpp */; };
|
||||
5E19F59922A9665500E3F88E /* AutoRecoveryDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E19F59722A9665500E3F88E /* AutoRecoveryDialog.cpp */; };
|
||||
5E2A19941EED688500217B58 /* SelectionState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E2A19921EED688500217B58 /* SelectionState.cpp */; };
|
||||
5E36A0A8217FA2430068E082 /* EditMenus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E36A09F217FA2430068E082 /* EditMenus.cpp */; };
|
||||
5E36A0A9217FA2430068E082 /* ExtraMenus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E36A0A0217FA2430068E082 /* ExtraMenus.cpp */; };
|
||||
|
@ -1243,6 +1245,7 @@
|
|||
5E36A0B0217FA2430068E082 /* WindowMenus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E36A0A7217FA2430068E082 /* WindowMenus.cpp */; };
|
||||
5E36A0B2217FC5A10068E082 /* (null) in Sources */ = {isa = PBXBuildFile; };
|
||||
5E36A0B4217FC6540068E082 /* HelpMenus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E36A0B3217FC6540068E082 /* HelpMenus.cpp */; };
|
||||
5E3A530822AD277A00C4ADB8 /* ProjectSelectionManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E3A530622AD277A00C4ADB8 /* ProjectSelectionManager.cpp */; };
|
||||
5E3FFE721EC9032B0020F7C9 /* NoteTrackSliderHandles.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E3FFE701EC9032B0020F7C9 /* NoteTrackSliderHandles.cpp */; };
|
||||
5E667A601F0BEE5F00C942A5 /* WaveTrackVZoomHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E667A5E1F0BEE5F00C942A5 /* WaveTrackVZoomHandle.cpp */; };
|
||||
5E667A651F0BEE8C00C942A5 /* NoteTrackButtonHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E667A611F0BEE8C00C942A5 /* NoteTrackButtonHandle.cpp */; };
|
||||
|
@ -1278,6 +1281,7 @@
|
|||
5EA0182B1EC7B226001F2996 /* WaveTrackControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EA018231EC7B226001F2996 /* WaveTrackControls.cpp */; };
|
||||
5EA0182C1EC7B226001F2996 /* WaveTrackUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EA018251EC7B226001F2996 /* WaveTrackUI.cpp */; };
|
||||
5EA0182D1EC7B226001F2996 /* WaveTrackVRulerControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EA018261EC7B226001F2996 /* WaveTrackVRulerControls.cpp */; };
|
||||
5EB15A2022A94043009FEC89 /* ProjectHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EB15A1E22A94043009FEC89 /* ProjectHistory.cpp */; };
|
||||
5EBD243D1F74C50800132E0A /* eu_ES.po in Sources */ = {isa = PBXBuildFile; fileRef = 5EBD243C1F74C50800132E0A /* eu_ES.po */; };
|
||||
5EBD35861F78D37A0084D13F /* pt_PT.po in Sources */ = {isa = PBXBuildFile; fileRef = 5EBD35851F78D37A0084D13F /* pt_PT.po */; };
|
||||
5EC7ED061E101C5C0052CAE2 /* NotYetAvailableException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EC7ED041E101C5C0052CAE2 /* NotYetAvailableException.cpp */; };
|
||||
|
@ -1299,6 +1303,7 @@
|
|||
5EF3E65C203FDACE006C6882 /* SetProjectCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF3E658203FDACE006C6882 /* SetProjectCommand.cpp */; };
|
||||
5EF3E65F203FDFE9006C6882 /* SetEnvelopeCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF3E65D203FDFE9006C6882 /* SetEnvelopeCommand.cpp */; };
|
||||
5EF3E662203FE73C006C6882 /* DragCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF3E660203FE73C006C6882 /* DragCommand.cpp */; };
|
||||
5EF5706B22AAAEDA00C4702C /* ProjectFileManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF5706922AAAEDA00C4702C /* ProjectFileManager.cpp */; };
|
||||
5EF958851DEB121800191280 /* InconsistencyException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EF958831DEB121800191280 /* InconsistencyException.cpp */; };
|
||||
5EFEAD9E22723E390077DFF6 /* Clipboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EFEAD9C22723E390077DFF6 /* Clipboard.cpp */; };
|
||||
5EFEADA02273382D0077DFF6 /* AudacityApp.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5EFEAD9F2273382D0077DFF6 /* AudacityApp.mm */; };
|
||||
|
@ -2048,17 +2053,12 @@
|
|||
1790B07F09883BFD008A330A /* Import.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = Import.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08009883BFD008A330A /* Import.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = Import.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08109883BFD008A330A /* ImportFLAC.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ImportFLAC.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08209883BFD008A330A /* ImportFLAC.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ImportFLAC.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08309883BFD008A330A /* ImportLOF.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ImportLOF.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08409883BFD008A330A /* ImportLOF.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ImportLOF.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08509883BFD008A330A /* ImportMIDI.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ImportMIDI.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08609883BFD008A330A /* ImportMIDI.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ImportMIDI.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08709883BFD008A330A /* ImportMP3.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ImportMP3.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08809883BFD008A330A /* ImportMP3.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ImportMP3.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08909883BFD008A330A /* ImportOGG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ImportOGG.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08A09883BFD008A330A /* ImportOGG.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ImportOGG.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08B09883BFD008A330A /* ImportPCM.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ImportPCM.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08C09883BFD008A330A /* ImportPCM.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ImportPCM.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08D09883BFD008A330A /* ImportPlugin.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ImportPlugin.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08E09883BFD008A330A /* ImportRaw.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ImportRaw.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||
1790B08F09883BFD008A330A /* ImportRaw.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ImportRaw.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||
|
@ -2216,7 +2216,6 @@
|
|||
280112791943EE0E00D98A16 /* HelpSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HelpSystem.cpp; sourceTree = "<group>"; };
|
||||
2801127A1943EE0E00D98A16 /* HelpSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelpSystem.h; sourceTree = "<group>"; };
|
||||
2801A6430BF9268700648258 /* ImportQT.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ImportQT.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||
2801A6440BF9268700648258 /* ImportQT.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ImportQT.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||
2803810018313B070078452A /* lame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lame.h; path = lame/lame/lame.h; sourceTree = "<group>"; };
|
||||
2803C8B519F35AA000278526 /* PluginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginManager.h; sourceTree = "<group>"; };
|
||||
2803C8B619F35AA000278526 /* TrackPanelListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrackPanelListener.h; sourceTree = "<group>"; };
|
||||
|
@ -2298,7 +2297,6 @@
|
|||
282D474A0B9E8D900034BC49 /* Snap.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = Snap.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||
282D474B0B9E8D900034BC49 /* Snap.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = Snap.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||
283135EA0DFB9D110076D551 /* ImportFFmpeg.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = ImportFFmpeg.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||
283135EB0DFB9D110076D551 /* ImportFFmpeg.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = ImportFFmpeg.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||
283135FD0DFBA2E80076D551 /* FFmpeg.cpp */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.cpp.cpp; path = FFmpeg.cpp; sourceTree = "<group>"; tabWidth = 3; };
|
||||
283135FE0DFBA2E80076D551 /* FFmpeg.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.h; path = FFmpeg.h; sourceTree = "<group>"; tabWidth = 3; };
|
||||
283506280A3A88ED00EB1EBD /* pa_unix_util.c */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 3; lastKnownFileType = sourcecode.c.c; path = pa_unix_util.c; sourceTree = "<group>"; tabWidth = 3; };
|
||||
|
@ -3190,6 +3188,8 @@
|
|||
5E135A44229EE4DE0076E983 /* ProjectFileIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectFileIO.h; sourceTree = "<group>"; };
|
||||
5E135A46229EE5530076E983 /* ProjectWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProjectWindow.cpp; sourceTree = "<group>"; };
|
||||
5E135A47229EE5530076E983 /* ProjectWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectWindow.h; sourceTree = "<group>"; };
|
||||
5E135A4F22A93DC60076E983 /* ProjectAudioManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProjectAudioManager.cpp; sourceTree = "<group>"; };
|
||||
5E135A5022A93DC60076E983 /* ProjectAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectAudioManager.h; sourceTree = "<group>"; };
|
||||
5E1512381DB000C000702E29 /* HitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HitTestResult.h; sourceTree = "<group>"; };
|
||||
5E1512391DB000C000702E29 /* RefreshCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RefreshCode.h; sourceTree = "<group>"; };
|
||||
5E15123A1DB000C000702E29 /* TrackPanelMouseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrackPanelMouseEvent.h; sourceTree = "<group>"; };
|
||||
|
@ -3213,11 +3213,13 @@
|
|||
5E15126B1DB0010C00702E29 /* TrackVRulerControls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TrackVRulerControls.cpp; sourceTree = "<group>"; };
|
||||
5E15126C1DB0010C00702E29 /* TrackVRulerControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrackVRulerControls.h; sourceTree = "<group>"; };
|
||||
5E16FF4C1FF9CE0B0085E1B8 /* LanguageNames.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LanguageNames.txt; path = ../locale/LanguageNames.txt; sourceTree = "<group>"; };
|
||||
5E18CFF122931CA900E75250 /* AudacityMessageBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudacityMessageBox.h; sourceTree = "<group>"; };
|
||||
5E18CFF222931D3D00E75250 /* AudacityMessageBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudacityMessageBox.cpp; sourceTree = "<group>"; };
|
||||
5E18CFEE2291C31000E75250 /* ProjectFileIORegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProjectFileIORegistry.cpp; sourceTree = "<group>"; };
|
||||
5E18CFEF2291C31000E75250 /* ProjectFileIORegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectFileIORegistry.h; sourceTree = "<group>"; };
|
||||
5E18CFF122931CA900E75250 /* AudacityMessageBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudacityMessageBox.h; sourceTree = "<group>"; };
|
||||
5E18CFF222931D3D00E75250 /* AudacityMessageBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudacityMessageBox.cpp; sourceTree = "<group>"; };
|
||||
5E19D64C217D51190024D0B1 /* PluginMenus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PluginMenus.cpp; path = menus/PluginMenus.cpp; sourceTree = "<group>"; };
|
||||
5E19F59722A9665500E3F88E /* AutoRecoveryDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AutoRecoveryDialog.cpp; sourceTree = "<group>"; };
|
||||
5E19F59822A9665500E3F88E /* AutoRecoveryDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutoRecoveryDialog.h; sourceTree = "<group>"; };
|
||||
5E2A19921EED688500217B58 /* SelectionState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionState.cpp; sourceTree = "<group>"; };
|
||||
5E2A19931EED688500217B58 /* SelectionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectionState.h; sourceTree = "<group>"; };
|
||||
5E36A09F217FA2430068E082 /* EditMenus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EditMenus.cpp; path = menus/EditMenus.cpp; sourceTree = "<group>"; };
|
||||
|
@ -3230,6 +3232,8 @@
|
|||
5E36A0A6217FA2430068E082 /* ViewMenus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ViewMenus.cpp; path = menus/ViewMenus.cpp; sourceTree = "<group>"; };
|
||||
5E36A0A7217FA2430068E082 /* WindowMenus.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; name = WindowMenus.cpp; path = menus/WindowMenus.cpp; sourceTree = "<group>"; };
|
||||
5E36A0B3217FC6540068E082 /* HelpMenus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HelpMenus.cpp; path = menus/HelpMenus.cpp; sourceTree = "<group>"; };
|
||||
5E3A530622AD277A00C4ADB8 /* ProjectSelectionManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProjectSelectionManager.cpp; sourceTree = "<group>"; };
|
||||
5E3A530722AD277A00C4ADB8 /* ProjectSelectionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectSelectionManager.h; sourceTree = "<group>"; };
|
||||
5E3FFE701EC9032B0020F7C9 /* NoteTrackSliderHandles.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NoteTrackSliderHandles.cpp; sourceTree = "<group>"; };
|
||||
5E3FFE711EC9032B0020F7C9 /* NoteTrackSliderHandles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoteTrackSliderHandles.h; sourceTree = "<group>"; };
|
||||
5E4685F81CCA9D84008741F2 /* CommandFunctors.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommandFunctors.h; sourceTree = "<group>"; };
|
||||
|
@ -3293,7 +3297,6 @@
|
|||
5E78388D1DE4995E003270C0 /* AudacityException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudacityException.cpp; sourceTree = "<group>"; };
|
||||
5E7838931DE4BBC2003270C0 /* CommandFlag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommandFlag.h; sourceTree = "<group>"; };
|
||||
5E79B33F1D5CC38D001D677D /* ImportGStreamer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImportGStreamer.cpp; sourceTree = "<group>"; };
|
||||
5E79B3401D5CC38D001D677D /* ImportGStreamer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImportGStreamer.h; sourceTree = "<group>"; };
|
||||
5E89EEE91F78D017000F5E82 /* zh_CN.po */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = zh_CN.po; path = ../locale/zh_CN.po; sourceTree = "<group>"; };
|
||||
5E94A1B81D1F1C8400A8713A /* wxPanelWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wxPanelWrapper.cpp; sourceTree = "<group>"; };
|
||||
5E94A1B91D1F1C8400A8713A /* wxPanelWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wxPanelWrapper.h; sourceTree = "<group>"; };
|
||||
|
@ -3308,6 +3311,8 @@
|
|||
5EA018251EC7B226001F2996 /* WaveTrackUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WaveTrackUI.cpp; sourceTree = "<group>"; };
|
||||
5EA018261EC7B226001F2996 /* WaveTrackVRulerControls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WaveTrackVRulerControls.cpp; sourceTree = "<group>"; };
|
||||
5EA018271EC7B226001F2996 /* WaveTrackVRulerControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaveTrackVRulerControls.h; sourceTree = "<group>"; };
|
||||
5EB15A1E22A94043009FEC89 /* ProjectHistory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProjectHistory.cpp; sourceTree = "<group>"; };
|
||||
5EB15A1F22A94043009FEC89 /* ProjectHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectHistory.h; sourceTree = "<group>"; };
|
||||
5EB9EA281D5B81270050AF40 /* ImportForwards.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImportForwards.h; sourceTree = "<group>"; };
|
||||
5EBD243C1F74C50800132E0A /* eu_ES.po */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = eu_ES.po; path = ../locale/eu_ES.po; sourceTree = "<group>"; };
|
||||
5EBD35851F78D37A0084D13F /* pt_PT.po */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = pt_PT.po; path = ../locale/pt_PT.po; sourceTree = "<group>"; };
|
||||
|
@ -3352,6 +3357,8 @@
|
|||
5EF3E65E203FDFE9006C6882 /* SetEnvelopeCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetEnvelopeCommand.h; sourceTree = "<group>"; };
|
||||
5EF3E660203FE73C006C6882 /* DragCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DragCommand.cpp; sourceTree = "<group>"; };
|
||||
5EF3E661203FE73C006C6882 /* DragCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DragCommand.h; sourceTree = "<group>"; };
|
||||
5EF5706922AAAEDA00C4702C /* ProjectFileManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProjectFileManager.cpp; sourceTree = "<group>"; };
|
||||
5EF5706A22AAAEDA00C4702C /* ProjectFileManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectFileManager.h; sourceTree = "<group>"; };
|
||||
5EF958831DEB121800191280 /* InconsistencyException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InconsistencyException.cpp; sourceTree = "<group>"; };
|
||||
5EF958841DEB121800191280 /* InconsistencyException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InconsistencyException.h; sourceTree = "<group>"; };
|
||||
5EFEAD9C22723E390077DFF6 /* Clipboard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Clipboard.cpp; sourceTree = "<group>"; };
|
||||
|
@ -4322,6 +4329,7 @@
|
|||
28C3946B1818356800FDDAC9 /* AudacityLogger.cpp */,
|
||||
1790AFD209883BFD008A330A /* AudioIO.cpp */,
|
||||
28560C8F0A75E40F00A3429E /* AutoRecovery.cpp */,
|
||||
5E19F59722A9665500E3F88E /* AutoRecoveryDialog.cpp */,
|
||||
1790AFD409883BFD008A330A /* BatchCommandDialog.cpp */,
|
||||
1790AFD609883BFD008A330A /* BatchCommands.cpp */,
|
||||
1790AFD809883BFD008A330A /* BatchProcessDialog.cpp */,
|
||||
|
@ -4374,10 +4382,14 @@
|
|||
186CCEA30E523C8E00659159 /* Profiler.cpp */,
|
||||
1790B0D009883BFD008A330A /* Project.cpp */,
|
||||
5E135A37229EDEBA0076E983 /* ProjectAudioIO.cpp */,
|
||||
5E135A4F22A93DC60076E983 /* ProjectAudioManager.cpp */,
|
||||
5E135A43229EE4DE0076E983 /* ProjectFileIO.cpp */,
|
||||
5E18CFEE2291C31000E75250 /* ProjectFileIORegistry.cpp */,
|
||||
5EF5706922AAAEDA00C4702C /* ProjectFileManager.cpp */,
|
||||
5ECF728C228B307E007F2A35 /* ProjectFSCK.cpp */,
|
||||
5EB15A1E22A94043009FEC89 /* ProjectHistory.cpp */,
|
||||
5E135A3A229EDF2E0076E983 /* ProjectManager.cpp */,
|
||||
5E3A530622AD277A00C4ADB8 /* ProjectSelectionManager.cpp */,
|
||||
5E135A34229EDBE80076E983 /* ProjectSettings.cpp */,
|
||||
5E135A46229EE5530076E983 /* ProjectWindow.cpp */,
|
||||
28DABFBC0FF19DB100AC7848 /* RealFFTf.cpp */,
|
||||
|
@ -4429,6 +4441,7 @@
|
|||
1790AFD309883BFD008A330A /* AudioIO.h */,
|
||||
28F996D91A2A9261008FEEF3 /* AudioIOListener.h */,
|
||||
28560C900A75E40F00A3429E /* AutoRecovery.h */,
|
||||
5E19F59822A9665500E3F88E /* AutoRecoveryDialog.h */,
|
||||
1790AFD509883BFD008A330A /* BatchCommandDialog.h */,
|
||||
1790AFD709883BFD008A330A /* BatchCommands.h */,
|
||||
1790AFD909883BFD008A330A /* BatchProcessDialog.h */,
|
||||
|
@ -4494,10 +4507,14 @@
|
|||
186CCEA20E523C8D00659159 /* Profiler.h */,
|
||||
1790B0D109883BFD008A330A /* Project.h */,
|
||||
5E135A38229EDEBA0076E983 /* ProjectAudioIO.h */,
|
||||
5E135A5022A93DC60076E983 /* ProjectAudioManager.h */,
|
||||
5E135A44229EE4DE0076E983 /* ProjectFileIO.h */,
|
||||
5E18CFEF2291C31000E75250 /* ProjectFileIORegistry.h */,
|
||||
5EF5706A22AAAEDA00C4702C /* ProjectFileManager.h */,
|
||||
5ECF728B228B307E007F2A35 /* ProjectFSCK.h */,
|
||||
5EB15A1F22A94043009FEC89 /* ProjectHistory.h */,
|
||||
5E135A3B229EDF2E0076E983 /* ProjectManager.h */,
|
||||
5E3A530722AD277A00C4ADB8 /* ProjectSelectionManager.h */,
|
||||
5E135A35229EDBE80076E983 /* ProjectSettings.h */,
|
||||
5E135A47229EE5530076E983 /* ProjectWindow.h */,
|
||||
28DABFBD0FF19DB100AC7848 /* RealFFTf.h */,
|
||||
|
@ -4764,25 +4781,17 @@
|
|||
1790B07F09883BFD008A330A /* Import.cpp */,
|
||||
1790B08009883BFD008A330A /* Import.h */,
|
||||
283135EA0DFB9D110076D551 /* ImportFFmpeg.cpp */,
|
||||
283135EB0DFB9D110076D551 /* ImportFFmpeg.h */,
|
||||
1790B08109883BFD008A330A /* ImportFLAC.cpp */,
|
||||
1790B08209883BFD008A330A /* ImportFLAC.h */,
|
||||
5EB9EA281D5B81270050AF40 /* ImportForwards.h */,
|
||||
5E79B33F1D5CC38D001D677D /* ImportGStreamer.cpp */,
|
||||
5E79B3401D5CC38D001D677D /* ImportGStreamer.h */,
|
||||
1790B08309883BFD008A330A /* ImportLOF.cpp */,
|
||||
1790B08409883BFD008A330A /* ImportLOF.h */,
|
||||
1790B08509883BFD008A330A /* ImportMIDI.cpp */,
|
||||
1790B08609883BFD008A330A /* ImportMIDI.h */,
|
||||
1790B08709883BFD008A330A /* ImportMP3.cpp */,
|
||||
1790B08809883BFD008A330A /* ImportMP3.h */,
|
||||
1790B08909883BFD008A330A /* ImportOGG.cpp */,
|
||||
1790B08A09883BFD008A330A /* ImportOGG.h */,
|
||||
1790B08B09883BFD008A330A /* ImportPCM.cpp */,
|
||||
1790B08C09883BFD008A330A /* ImportPCM.h */,
|
||||
1790B08D09883BFD008A330A /* ImportPlugin.h */,
|
||||
2801A6430BF9268700648258 /* ImportQT.cpp */,
|
||||
2801A6440BF9268700648258 /* ImportQT.h */,
|
||||
1790B08E09883BFD008A330A /* ImportRaw.cpp */,
|
||||
1790B08F09883BFD008A330A /* ImportRaw.h */,
|
||||
28F67175197DFA1C00075C32 /* MultiFormatReader.cpp */,
|
||||
|
@ -8455,6 +8464,7 @@
|
|||
28EBA7FC0A78FADE00C8BB1F /* Repair.cpp in Sources */,
|
||||
28EBA8010A78FAF800C8BB1F /* InterpolateAudio.cpp in Sources */,
|
||||
28EBA8020A78FAF800C8BB1F /* Matrix.cpp in Sources */,
|
||||
5EF5706B22AAAEDA00C4702C /* ProjectFileManager.cpp in Sources */,
|
||||
28E3E6E80A7C14CA00AB1361 /* ExportFLAC.cpp in Sources */,
|
||||
2897F6F00AB3DB5A003C20C5 /* ControlToolBar.cpp in Sources */,
|
||||
2897F6F10AB3DB5A003C20C5 /* EditToolBar.cpp in Sources */,
|
||||
|
@ -8511,6 +8521,7 @@
|
|||
5EA0182C1EC7B226001F2996 /* WaveTrackUI.cpp in Sources */,
|
||||
5E07842E1DEE6B8600CA76EA /* FileException.cpp in Sources */,
|
||||
2860BA250E0F0D8600A13878 /* TimerRecordDialog.cpp in Sources */,
|
||||
5E19F59922A9665500E3F88E /* AutoRecoveryDialog.cpp in Sources */,
|
||||
2860BA280E0F0DD800A13878 /* ExportFFmpeg.cpp in Sources */,
|
||||
5E36A0AB217FA2430068E082 /* NavigationMenus.cpp in Sources */,
|
||||
28D587CB0E264CF4009C7DEA /* LoadLV2.cpp in Sources */,
|
||||
|
@ -8531,6 +8542,7 @@
|
|||
28B97B890FBF771A0076CF28 /* VSTEffect.cpp in Sources */,
|
||||
284B279A0FC66864005EAC96 /* DevicePrefs.cpp in Sources */,
|
||||
284B279B0FC66864005EAC96 /* ImportExportPrefs.cpp in Sources */,
|
||||
5E3A530822AD277A00C4ADB8 /* ProjectSelectionManager.cpp in Sources */,
|
||||
284B279C0FC66864005EAC96 /* LibraryPrefs.cpp in Sources */,
|
||||
5E15126E1DB0010C00702E29 /* TrackControls.cpp in Sources */,
|
||||
5EA0182A1EC7B226001F2996 /* NoteTrackVRulerControls.cpp in Sources */,
|
||||
|
@ -8602,6 +8614,7 @@
|
|||
AA0084191EA8C6E70070CCE3 /* TracksBehaviorsPrefs.cpp in Sources */,
|
||||
28884948131B6CF600B59735 /* bs.po in Sources */,
|
||||
28884949131B6CF600B59735 /* ca.po in Sources */,
|
||||
5EB15A2022A94043009FEC89 /* ProjectHistory.cpp in Sources */,
|
||||
2888494A131B6CF600B59735 /* ca_ES@valencia.po in Sources */,
|
||||
2888494B131B6CF600B59735 /* cs.po in Sources */,
|
||||
5ECF728A22887B3B007F2A35 /* MissingAliasFileDialog.cpp in Sources */,
|
||||
|
@ -8651,6 +8664,7 @@
|
|||
2888496E131B6CF600B59735 /* tg.po in Sources */,
|
||||
5E7396441DAFD8C600BA0A4D /* TimeShiftHandle.cpp in Sources */,
|
||||
5E73966A1DAFDB5600BA0A4D /* LabelGlyphHandle.cpp in Sources */,
|
||||
5E135A5122A93DC60076E983 /* ProjectAudioManager.cpp in Sources */,
|
||||
2888496F131B6CF600B59735 /* tr.po in Sources */,
|
||||
28884970131B6CF600B59735 /* uk.po in Sources */,
|
||||
28884971131B6CF600B59735 /* vi.po in Sources */,
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "Prefs.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectAudioIO.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "ProjectAudioManager.h"
|
||||
#include "ProjectWindow.h"
|
||||
#include "RefreshCode.h"
|
||||
#include "Snap.h"
|
||||
|
|
|
@ -84,6 +84,8 @@ It handles initialization and termination by subclassing wxApp.
|
|||
#include "PluginManager.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectAudioIO.h"
|
||||
#include "ProjectFileManager.h"
|
||||
#include "ProjectHistory.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "ProjectSettings.h"
|
||||
#include "ProjectWindow.h"
|
||||
|
@ -95,6 +97,7 @@ It handles initialization and termination by subclassing wxApp.
|
|||
#include "PlatformCompatibility.h"
|
||||
#include "FileNames.h"
|
||||
#include "AutoRecovery.h"
|
||||
#include "AutoRecoveryDialog.h"
|
||||
#include "SplashDialog.h"
|
||||
#include "FFT.h"
|
||||
#include "BlockFile.h"
|
||||
|
@ -869,7 +872,7 @@ END_EVENT_TABLE()
|
|||
// - Inform the user if DefaultOpenPath not set.
|
||||
// - Switch focus to correct instance of project window, if already open.
|
||||
bool AudacityApp::MRUOpen(const FilePath &fullPathStr) {
|
||||
// Most of the checks below are copied from AudacityProject::OpenFiles.
|
||||
// Most of the checks below are copied from ProjectManager::OpenFiles.
|
||||
// - some rationalisation might be possible.
|
||||
|
||||
AudacityProject *proj = GetActiveProject();
|
||||
|
@ -885,7 +888,7 @@ bool AudacityApp::MRUOpen(const FilePath &fullPathStr) {
|
|||
// Test here even though AudacityProject::OpenFile() also now checks, because
|
||||
// that method does not return the bad result.
|
||||
// That itself may be a FIXME.
|
||||
if (ProjectManager::IsAlreadyOpen(fullPathStr))
|
||||
if (ProjectFileManager::IsAlreadyOpen(fullPathStr))
|
||||
return false;
|
||||
|
||||
// DMM: If the project is dirty, that means it's been touched at
|
||||
|
@ -899,7 +902,7 @@ bool AudacityApp::MRUOpen(const FilePath &fullPathStr) {
|
|||
// bad things can happen, including data files moving to the NEW
|
||||
// project directory, etc.
|
||||
if (proj && (
|
||||
ProjectManager::Get( *proj ).GetDirty() ||
|
||||
ProjectHistory::Get( *proj ).GetDirty() ||
|
||||
!TrackList::Get( *proj ).empty()
|
||||
) )
|
||||
proj = nullptr;
|
||||
|
@ -944,7 +947,7 @@ void AudacityApp::OnMRUFile(wxCommandEvent& event) {
|
|||
// PRL: Don't call SafeMRUOpen
|
||||
// -- if open fails for some exceptional reason of resource exhaustion that
|
||||
// the user can correct, leave the file in history.
|
||||
if (!ProjectManager::IsAlreadyOpen(fullPathStr) && !MRUOpen(fullPathStr))
|
||||
if (!ProjectFileManager::IsAlreadyOpen(fullPathStr) && !MRUOpen(fullPathStr))
|
||||
history.RemoveFileFromHistory(n);
|
||||
}
|
||||
|
||||
|
@ -1081,7 +1084,7 @@ bool AudacityApp::OnExceptionInMainLoop()
|
|||
// Restore the state of the project to what it was before the
|
||||
// failed operation
|
||||
if (pProject) {
|
||||
ProjectManager::Get( *pProject ).RollbackState();
|
||||
ProjectHistory::Get( *pProject ).RollbackState();
|
||||
|
||||
// Forget pending changes in the TrackList
|
||||
TrackList::Get( *pProject ).ClearPendingTracks();
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#ifndef __AUDACITY_AUDIO_IO_LISTENER__
|
||||
#define __AUDACITY_AUDIO_IO_LISTENER__
|
||||
|
||||
#include "Audacity.h"
|
||||
|
||||
class AutoSaveFile;
|
||||
|
||||
class AUDACITY_DLL_API AudioIOListener /* not final */ {
|
||||
|
|
|
@ -21,261 +21,17 @@ text or binary format to a file.
|
|||
#include "Audacity.h"
|
||||
#include "AutoRecovery.h"
|
||||
#include "DirManager.h"
|
||||
#include "FileNames.h"
|
||||
#include "blockfile/SimpleBlockFile.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "Sequence.h"
|
||||
#include "ShuttleGui.h"
|
||||
|
||||
#include <wx/evtloop.h>
|
||||
#include <wx/wxprec.h>
|
||||
#include <wx/filefn.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/dir.h>
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/app.h>
|
||||
|
||||
#include "WaveClip.h"
|
||||
#include "WaveTrack.h"
|
||||
#include "widgets/AudacityMessageBox.h"
|
||||
#include "widgets/wxPanelWrapper.h"
|
||||
|
||||
enum {
|
||||
ID_RECOVER_ALL = 10000,
|
||||
ID_RECOVER_NONE,
|
||||
ID_QUIT_AUDACITY,
|
||||
ID_FILE_LIST
|
||||
};
|
||||
|
||||
class AutoRecoveryDialog final : public wxDialogWrapper
|
||||
{
|
||||
public:
|
||||
AutoRecoveryDialog(wxWindow *parent);
|
||||
|
||||
private:
|
||||
void PopulateList();
|
||||
void PopulateOrExchange(ShuttleGui & S);
|
||||
|
||||
void OnQuitAudacity(wxCommandEvent &evt);
|
||||
void OnRecoverNone(wxCommandEvent &evt);
|
||||
void OnRecoverAll(wxCommandEvent &evt);
|
||||
|
||||
wxListCtrl *mFileList;
|
||||
|
||||
public:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
AutoRecoveryDialog::AutoRecoveryDialog(wxWindow *parent) :
|
||||
wxDialogWrapper(parent, -1, _("Automatic Crash Recovery"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxDEFAULT_DIALOG_STYLE & (~wxCLOSE_BOX)) // no close box
|
||||
{
|
||||
SetName(GetTitle());
|
||||
ShuttleGui S(this, eIsCreating);
|
||||
PopulateOrExchange(S);
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(AutoRecoveryDialog, wxDialogWrapper)
|
||||
EVT_BUTTON(ID_RECOVER_ALL, AutoRecoveryDialog::OnRecoverAll)
|
||||
EVT_BUTTON(ID_RECOVER_NONE, AutoRecoveryDialog::OnRecoverNone)
|
||||
EVT_BUTTON(ID_QUIT_AUDACITY, AutoRecoveryDialog::OnQuitAudacity)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
void AutoRecoveryDialog::PopulateOrExchange(ShuttleGui& S)
|
||||
{
|
||||
S.SetBorder(5);
|
||||
S.StartVerticalLay();
|
||||
{
|
||||
S.AddVariableText(_("Some projects were not saved properly the last time Audacity was run.\nFortunately, the following projects can be automatically recovered:"), false);
|
||||
|
||||
S.StartStatic(_("Recoverable projects"));
|
||||
{
|
||||
mFileList = S.Id(ID_FILE_LIST).AddListControlReportMode();
|
||||
/*i18n-hint: (noun). It's the name of the project to recover.*/
|
||||
mFileList->InsertColumn(0, _("Name"));
|
||||
mFileList->SetColumnWidth(0, wxLIST_AUTOSIZE);
|
||||
PopulateList();
|
||||
}
|
||||
S.EndStatic();
|
||||
|
||||
S.AddVariableText(_("After recovery, save the project to save the changes to disk."), false);
|
||||
|
||||
S.StartHorizontalLay();
|
||||
{
|
||||
S.Id(ID_QUIT_AUDACITY).AddButton(_("Quit Audacity"));
|
||||
S.Id(ID_RECOVER_NONE).AddButton(_("Discard Projects"));
|
||||
S.Id(ID_RECOVER_ALL).AddButton(_("Recover Projects"));
|
||||
}
|
||||
S.EndHorizontalLay();
|
||||
}
|
||||
S.EndVerticalLay();
|
||||
|
||||
Layout();
|
||||
Fit();
|
||||
SetMinSize(GetSize());
|
||||
|
||||
// Sometimes it centers on wxGTK and sometimes it doesn't.
|
||||
// Yielding before centering seems to be a good workaround,
|
||||
// but will leave to implement on a rainy day.
|
||||
Center();
|
||||
}
|
||||
|
||||
void AutoRecoveryDialog::PopulateList()
|
||||
{
|
||||
mFileList->DeleteAllItems();
|
||||
|
||||
wxDir dir(FileNames::AutoSaveDir());
|
||||
if (!dir.IsOpened())
|
||||
return;
|
||||
|
||||
wxString filename;
|
||||
int i = 0;
|
||||
for (bool c = dir.GetFirst(&filename, wxT("*.autosave"), wxDIR_FILES);
|
||||
c; c = dir.GetNext(&filename))
|
||||
mFileList->InsertItem(i++, wxFileName{ filename }.GetName());
|
||||
|
||||
mFileList->SetColumnWidth(0, wxLIST_AUTOSIZE);
|
||||
}
|
||||
|
||||
void AutoRecoveryDialog::OnQuitAudacity(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
EndModal(ID_QUIT_AUDACITY);
|
||||
}
|
||||
|
||||
void AutoRecoveryDialog::OnRecoverNone(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
int ret = AudacityMessageBox(
|
||||
_("Are you sure you want to discard all recoverable projects?\n\nChoosing \"Yes\" discards all recoverable projects immediately."),
|
||||
_("Confirm Discard Projects"), wxICON_QUESTION | wxYES_NO | wxNO_DEFAULT, this);
|
||||
|
||||
if (ret == wxYES)
|
||||
EndModal(ID_RECOVER_NONE);
|
||||
}
|
||||
|
||||
void AutoRecoveryDialog::OnRecoverAll(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
EndModal(ID_RECOVER_ALL);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static bool HaveFilesToRecover()
|
||||
{
|
||||
wxDir dir(FileNames::AutoSaveDir());
|
||||
if (!dir.IsOpened())
|
||||
{
|
||||
AudacityMessageBox(_("Could not enumerate files in auto save directory."),
|
||||
_("Error"), wxICON_STOP);
|
||||
return false;
|
||||
}
|
||||
|
||||
wxString filename;
|
||||
bool c = dir.GetFirst(&filename, wxT("*.autosave"), wxDIR_FILES);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static bool RemoveAllAutoSaveFiles()
|
||||
{
|
||||
FilePaths files;
|
||||
wxDir::GetAllFiles(FileNames::AutoSaveDir(), &files,
|
||||
wxT("*.autosave"), wxDIR_FILES);
|
||||
|
||||
for (unsigned int i = 0; i < files.size(); i++)
|
||||
{
|
||||
if (!wxRemoveFile(files[i]))
|
||||
{
|
||||
// I don't think this error message is actually useful.
|
||||
// -dmazzoni
|
||||
//AudacityMessageBox(wxT("Could not remove auto save file: " + files[i]),
|
||||
// _("Error"), wxICON_STOP);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool RecoverAllProjects(AudacityProject** pproj)
|
||||
{
|
||||
wxDir dir(FileNames::AutoSaveDir());
|
||||
if (!dir.IsOpened())
|
||||
{
|
||||
AudacityMessageBox(_("Could not enumerate files in auto save directory."),
|
||||
_("Error"), wxICON_STOP);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Open a project window for each auto save file
|
||||
wxString filename;
|
||||
|
||||
FilePaths files;
|
||||
wxDir::GetAllFiles(FileNames::AutoSaveDir(), &files,
|
||||
wxT("*.autosave"), wxDIR_FILES);
|
||||
|
||||
for (unsigned int i = 0; i < files.size(); i++)
|
||||
{
|
||||
AudacityProject* proj{};
|
||||
if (*pproj)
|
||||
{
|
||||
// Reuse existing project window
|
||||
proj = *pproj;
|
||||
*pproj = NULL;
|
||||
}
|
||||
|
||||
// Open project. When an auto-save file has been opened successfully,
|
||||
// the opened auto-save file is automatically deleted and a NEW one
|
||||
// is created.
|
||||
(void) ProjectManager::OpenProject( proj, files[i], false );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ShowAutoRecoveryDialogIfNeeded(AudacityProject** pproj,
|
||||
bool *didRecoverAnything)
|
||||
{
|
||||
if (didRecoverAnything)
|
||||
*didRecoverAnything = false;
|
||||
if (HaveFilesToRecover())
|
||||
{
|
||||
// Under wxGTK3, the auto recovery dialog will not get
|
||||
// the focus since the project window hasn't been allowed
|
||||
// to completely initialize.
|
||||
//
|
||||
// Yielding seems to allow the initialization to complete.
|
||||
//
|
||||
// Additionally, it also corrects a sizing issue in the dialog
|
||||
// related to wxWidgets bug:
|
||||
//
|
||||
// http://trac.wxwidgets.org/ticket/16440
|
||||
//
|
||||
// This must be done before "dlg" is declared.
|
||||
wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI);
|
||||
|
||||
int ret = AutoRecoveryDialog{nullptr}.ShowModal();
|
||||
|
||||
switch (ret)
|
||||
{
|
||||
case ID_RECOVER_NONE:
|
||||
return RemoveAllAutoSaveFiles();
|
||||
|
||||
case ID_RECOVER_ALL:
|
||||
if (didRecoverAnything)
|
||||
*didRecoverAnything = true;
|
||||
return RecoverAllProjects(pproj);
|
||||
|
||||
default:
|
||||
// This includes ID_QUIT_AUDACITY
|
||||
return false;
|
||||
}
|
||||
} else
|
||||
{
|
||||
// Nothing to recover, move along
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
/// Recording recovery handler
|
||||
|
|
|
@ -21,22 +21,6 @@
|
|||
class wxFFile;
|
||||
class AudacityProject;
|
||||
|
||||
//
|
||||
// Show auto recovery dialog if there are projects to recover. Should be
|
||||
// called once at Audacity startup.
|
||||
//
|
||||
// This function possibly opens NEW project windows while it recovers all
|
||||
// projects. If so, it will re-use *pproj, if != NULL and set it to NULL.
|
||||
//
|
||||
// Returns: True, if the start of Audacity should continue as normal
|
||||
// False if Audacity should be quit immediately
|
||||
//
|
||||
// The didRecoverAnything param is strictly for a return value.
|
||||
// Any value passed in is ignored.
|
||||
//
|
||||
bool ShowAutoRecoveryDialogIfNeeded(AudacityProject** pproj,
|
||||
bool *didRecoverAnything);
|
||||
|
||||
//
|
||||
// XML Handler for a <recordingrecovery> tag
|
||||
//
|
||||
|
|
|
@ -0,0 +1,259 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
AutoRecoveryDialog.cpp
|
||||
|
||||
Paul Licameli split from AutoRecovery.cpp
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "AutoRecoveryDialog.h"
|
||||
|
||||
#include "FileNames.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "ShuttleGui.h"
|
||||
#include "widgets/AudacityMessageBox.h"
|
||||
#include "widgets/wxPanelWrapper.h"
|
||||
|
||||
#include <wx/evtloop.h>
|
||||
#include <wx/filefn.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/listctrl.h>
|
||||
|
||||
enum {
|
||||
ID_RECOVER_ALL = 10000,
|
||||
ID_RECOVER_NONE,
|
||||
ID_QUIT_AUDACITY,
|
||||
ID_FILE_LIST
|
||||
};
|
||||
|
||||
class AutoRecoveryDialog final : public wxDialogWrapper
|
||||
{
|
||||
public:
|
||||
AutoRecoveryDialog(wxWindow *parent);
|
||||
|
||||
private:
|
||||
void PopulateList();
|
||||
void PopulateOrExchange(ShuttleGui & S);
|
||||
|
||||
void OnQuitAudacity(wxCommandEvent &evt);
|
||||
void OnRecoverNone(wxCommandEvent &evt);
|
||||
void OnRecoverAll(wxCommandEvent &evt);
|
||||
|
||||
wxListCtrl *mFileList;
|
||||
|
||||
public:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
AutoRecoveryDialog::AutoRecoveryDialog(wxWindow *parent) :
|
||||
wxDialogWrapper(parent, -1, _("Automatic Crash Recovery"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxDEFAULT_DIALOG_STYLE & (~wxCLOSE_BOX)) // no close box
|
||||
{
|
||||
SetName(GetTitle());
|
||||
ShuttleGui S(this, eIsCreating);
|
||||
PopulateOrExchange(S);
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(AutoRecoveryDialog, wxDialogWrapper)
|
||||
EVT_BUTTON(ID_RECOVER_ALL, AutoRecoveryDialog::OnRecoverAll)
|
||||
EVT_BUTTON(ID_RECOVER_NONE, AutoRecoveryDialog::OnRecoverNone)
|
||||
EVT_BUTTON(ID_QUIT_AUDACITY, AutoRecoveryDialog::OnQuitAudacity)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
void AutoRecoveryDialog::PopulateOrExchange(ShuttleGui& S)
|
||||
{
|
||||
S.SetBorder(5);
|
||||
S.StartVerticalLay();
|
||||
{
|
||||
S.AddVariableText(_("Some projects were not saved properly the last time Audacity was run.\nFortunately, the following projects can be automatically recovered:"), false);
|
||||
|
||||
S.StartStatic(_("Recoverable projects"));
|
||||
{
|
||||
mFileList = S.Id(ID_FILE_LIST).AddListControlReportMode();
|
||||
/*i18n-hint: (noun). It's the name of the project to recover.*/
|
||||
mFileList->InsertColumn(0, _("Name"));
|
||||
mFileList->SetColumnWidth(0, wxLIST_AUTOSIZE);
|
||||
PopulateList();
|
||||
}
|
||||
S.EndStatic();
|
||||
|
||||
S.AddVariableText(_("After recovery, save the project to save the changes to disk."), false);
|
||||
|
||||
S.StartHorizontalLay();
|
||||
{
|
||||
S.Id(ID_QUIT_AUDACITY).AddButton(_("Quit Audacity"));
|
||||
S.Id(ID_RECOVER_NONE).AddButton(_("Discard Projects"));
|
||||
S.Id(ID_RECOVER_ALL).AddButton(_("Recover Projects"));
|
||||
}
|
||||
S.EndHorizontalLay();
|
||||
}
|
||||
S.EndVerticalLay();
|
||||
|
||||
Layout();
|
||||
Fit();
|
||||
SetMinSize(GetSize());
|
||||
|
||||
// Sometimes it centers on wxGTK and sometimes it doesn't.
|
||||
// Yielding before centering seems to be a good workaround,
|
||||
// but will leave to implement on a rainy day.
|
||||
Center();
|
||||
}
|
||||
|
||||
void AutoRecoveryDialog::PopulateList()
|
||||
{
|
||||
mFileList->DeleteAllItems();
|
||||
|
||||
wxDir dir(FileNames::AutoSaveDir());
|
||||
if (!dir.IsOpened())
|
||||
return;
|
||||
|
||||
wxString filename;
|
||||
int i = 0;
|
||||
for (bool c = dir.GetFirst(&filename, wxT("*.autosave"), wxDIR_FILES);
|
||||
c; c = dir.GetNext(&filename))
|
||||
mFileList->InsertItem(i++, wxFileName{ filename }.GetName());
|
||||
|
||||
mFileList->SetColumnWidth(0, wxLIST_AUTOSIZE);
|
||||
}
|
||||
|
||||
void AutoRecoveryDialog::OnQuitAudacity(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
EndModal(ID_QUIT_AUDACITY);
|
||||
}
|
||||
|
||||
void AutoRecoveryDialog::OnRecoverNone(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
int ret = AudacityMessageBox(
|
||||
_("Are you sure you want to discard all recoverable projects?\n\nChoosing \"Yes\" discards all recoverable projects immediately."),
|
||||
_("Confirm Discard Projects"), wxICON_QUESTION | wxYES_NO | wxNO_DEFAULT, this);
|
||||
|
||||
if (ret == wxYES)
|
||||
EndModal(ID_RECOVER_NONE);
|
||||
}
|
||||
|
||||
void AutoRecoveryDialog::OnRecoverAll(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
EndModal(ID_RECOVER_ALL);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static bool HaveFilesToRecover()
|
||||
{
|
||||
wxDir dir(FileNames::AutoSaveDir());
|
||||
if (!dir.IsOpened())
|
||||
{
|
||||
AudacityMessageBox(_("Could not enumerate files in auto save directory."),
|
||||
_("Error"), wxICON_STOP);
|
||||
return false;
|
||||
}
|
||||
|
||||
wxString filename;
|
||||
bool c = dir.GetFirst(&filename, wxT("*.autosave"), wxDIR_FILES);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static bool RemoveAllAutoSaveFiles()
|
||||
{
|
||||
FilePaths files;
|
||||
wxDir::GetAllFiles(FileNames::AutoSaveDir(), &files,
|
||||
wxT("*.autosave"), wxDIR_FILES);
|
||||
|
||||
for (unsigned int i = 0; i < files.size(); i++)
|
||||
{
|
||||
if (!wxRemoveFile(files[i]))
|
||||
{
|
||||
// I don't think this error message is actually useful.
|
||||
// -dmazzoni
|
||||
//AudacityMessageBox(wxT("Could not remove auto save file: " + files[i]),
|
||||
// _("Error"), wxICON_STOP);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool RecoverAllProjects(AudacityProject** pproj)
|
||||
{
|
||||
wxDir dir(FileNames::AutoSaveDir());
|
||||
if (!dir.IsOpened())
|
||||
{
|
||||
AudacityMessageBox(_("Could not enumerate files in auto save directory."),
|
||||
_("Error"), wxICON_STOP);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Open a project window for each auto save file
|
||||
wxString filename;
|
||||
|
||||
FilePaths files;
|
||||
wxDir::GetAllFiles(FileNames::AutoSaveDir(), &files,
|
||||
wxT("*.autosave"), wxDIR_FILES);
|
||||
|
||||
for (unsigned int i = 0; i < files.size(); i++)
|
||||
{
|
||||
AudacityProject* proj{};
|
||||
if (*pproj)
|
||||
{
|
||||
// Reuse existing project window
|
||||
proj = *pproj;
|
||||
*pproj = NULL;
|
||||
}
|
||||
|
||||
// Open project. When an auto-save file has been opened successfully,
|
||||
// the opened auto-save file is automatically deleted and a NEW one
|
||||
// is created.
|
||||
(void) ProjectManager::OpenProject( proj, files[i], false );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ShowAutoRecoveryDialogIfNeeded(AudacityProject** pproj,
|
||||
bool *didRecoverAnything)
|
||||
{
|
||||
if (didRecoverAnything)
|
||||
*didRecoverAnything = false;
|
||||
if (HaveFilesToRecover())
|
||||
{
|
||||
// Under wxGTK3, the auto recovery dialog will not get
|
||||
// the focus since the project window hasn't been allowed
|
||||
// to completely initialize.
|
||||
//
|
||||
// Yielding seems to allow the initialization to complete.
|
||||
//
|
||||
// Additionally, it also corrects a sizing issue in the dialog
|
||||
// related to wxWidgets bug:
|
||||
//
|
||||
// http://trac.wxwidgets.org/ticket/16440
|
||||
//
|
||||
// This must be done before "dlg" is declared.
|
||||
wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI);
|
||||
|
||||
int ret = AutoRecoveryDialog{nullptr}.ShowModal();
|
||||
|
||||
switch (ret)
|
||||
{
|
||||
case ID_RECOVER_NONE:
|
||||
return RemoveAllAutoSaveFiles();
|
||||
|
||||
case ID_RECOVER_ALL:
|
||||
if (didRecoverAnything)
|
||||
*didRecoverAnything = true;
|
||||
return RecoverAllProjects(pproj);
|
||||
|
||||
default:
|
||||
// This includes ID_QUIT_AUDACITY
|
||||
return false;
|
||||
}
|
||||
} else
|
||||
{
|
||||
// Nothing to recover, move along
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
AutoRecoveryDialog.h
|
||||
|
||||
Paul Licameli split from AutoRecovery.h
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_AUTO_RECOVERY_DIALOG__
|
||||
#define __AUDACITY_AUTO_RECOVERY_DIALOG__
|
||||
|
||||
class AudacityProject;
|
||||
|
||||
//
|
||||
// Show auto recovery dialog if there are projects to recover. Should be
|
||||
// called once at Audacity startup.
|
||||
//
|
||||
// This function possibly opens NEW project windows while it recovers all
|
||||
// projects. If so, it will re-use *pproj, if != NULL and set it to NULL.
|
||||
//
|
||||
// Returns: True, if the start of Audacity should continue as normal
|
||||
// False if Audacity should be quit immediately
|
||||
//
|
||||
// The didRecoverAnything param is strictly for a return value.
|
||||
// Any value passed in is ignored.
|
||||
//
|
||||
bool ShowAutoRecoveryDialogIfNeeded(AudacityProject** pproj,
|
||||
bool *didRecoverAnything);
|
||||
|
||||
#endif
|
|
@ -25,7 +25,7 @@ processing. See also MacrosWindow and ApplyMacroDialog.
|
|||
#include <wx/textfile.h>
|
||||
|
||||
#include "Project.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "ProjectHistory.h"
|
||||
#include "ProjectSettings.h"
|
||||
#include "commands/CommandManager.h"
|
||||
#include "effects/EffectManager.h"
|
||||
|
@ -843,7 +843,7 @@ bool MacroCommands::ApplyMacro(
|
|||
if (!res) {
|
||||
if(proj) {
|
||||
// Macro failed or was cancelled; revert to the previous state
|
||||
ProjectManager::Get( *proj ).RollbackState();
|
||||
ProjectHistory::Get( *proj ).RollbackState();
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
@ -889,7 +889,7 @@ bool MacroCommands::ApplyMacro(
|
|||
if (!proj)
|
||||
return false;
|
||||
if( MacroReentryCount <= 1 )
|
||||
ProjectManager::Get( *proj ).PushState(longDesc, shortDesc);
|
||||
ProjectHistory::Get( *proj ).PushState(longDesc, shortDesc);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
#include "Menus.h"
|
||||
#include "Prefs.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectFileManager.h"
|
||||
#include "ProjectHistory.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "ProjectWindow.h"
|
||||
#include "commands/CommandManager.h"
|
||||
|
@ -463,7 +465,7 @@ void ApplyMacroDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
|
|||
fileList->EnsureVisible(i);
|
||||
|
||||
auto success = GuardedCall< bool >( [&] {
|
||||
ProjectManager::Get( *project ).Import(files[i]);
|
||||
ProjectFileManager::Get( *project ).Import(files[i]);
|
||||
ProjectWindow::Get( *project ).ZoomAfterImport(nullptr);
|
||||
SelectActions::DoSelectAll(*project);
|
||||
if (!mMacroCommands.ApplyMacro(mCatalog))
|
||||
|
|
|
@ -39,7 +39,7 @@ undo memory so as to free up space.
|
|||
#include "../images/Empty9x16.xpm"
|
||||
#include "UndoManager.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "ProjectHistory.h"
|
||||
#include "ShuttleGui.h"
|
||||
|
||||
enum {
|
||||
|
@ -256,7 +256,7 @@ void HistoryWindow::OnDiscard(wxCommandEvent & WXUNUSED(event))
|
|||
|
||||
mSelected -= i;
|
||||
mManager->RemoveStates(i);
|
||||
ProjectManager::Get( *mProject ).SetStateTo(mSelected + 1);
|
||||
ProjectHistory::Get( *mProject ).SetStateTo(mSelected + 1);
|
||||
|
||||
while(--i >= 0)
|
||||
mList->DeleteItem(i);
|
||||
|
@ -294,7 +294,7 @@ void HistoryWindow::OnItemSelected(wxListEvent &event)
|
|||
// entry. Doing so can cause unnecessary delays upon initial load or while
|
||||
// clicking the same entry over and over.
|
||||
if (selected != mSelected) {
|
||||
ProjectManager::Get( *mProject ).SetStateTo(selected + 1);
|
||||
ProjectHistory::Get( *mProject ).SetStateTo(selected + 1);
|
||||
}
|
||||
mSelected = selected;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ for drawing different aspects of the label and its text box.
|
|||
#include "AllThemeResources.h"
|
||||
#include "AColor.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "ProjectHistory.h"
|
||||
#include "ProjectSettings.h"
|
||||
#include "ProjectFileIORegistry.h"
|
||||
#include "ProjectWindow.h"
|
||||
|
@ -1812,7 +1812,7 @@ unsigned LabelTrack::KeyDown(wxKeyEvent & event, ViewInfo &viewInfo, wxWindow *W
|
|||
// Pass keystroke to labeltrack's handler and add to history if any
|
||||
// updates were done
|
||||
if (OnKeyDown(viewInfo.selectedRegion, event)) {
|
||||
ProjectManager::Get( *pProj ).PushState(_("Modified Label"),
|
||||
ProjectHistory::Get( *pProj ).PushState(_("Modified Label"),
|
||||
_("Label Edit"),
|
||||
UndoPush::CONSOLIDATE);
|
||||
}
|
||||
|
@ -1844,7 +1844,7 @@ unsigned LabelTrack::Char(wxKeyEvent & event, ViewInfo &viewInfo, wxWindow *)
|
|||
AudacityProject *const pProj = GetActiveProject();
|
||||
|
||||
if (OnChar(viewInfo.selectedRegion, event))
|
||||
ProjectManager::Get( *pProj ).PushState(_("Modified Label"),
|
||||
ProjectHistory::Get( *pProj ).PushState(_("Modified Label"),
|
||||
_("Label Edit"),
|
||||
UndoPush::CONSOLIDATE);
|
||||
|
||||
|
@ -2129,13 +2129,13 @@ bool LabelTrack::OnChar(SelectedRegion &WXUNUSED(newSel), wxKeyEvent & event)
|
|||
}
|
||||
SetSelected(true);
|
||||
AddLabel(selectedRegion, title, -2);
|
||||
ProjectManager::Get( *p ).PushState(_("Added label"), _("Label"));
|
||||
ProjectHistory::Get( *p ).PushState(_("Added label"), _("Label"));
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
SetSelected(true);
|
||||
AddLabel(selectedRegion);
|
||||
ProjectManager::Get( *p ).PushState(_("Added label"), _("Label"));
|
||||
ProjectHistory::Get( *p ).PushState(_("Added label"), _("Label"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2229,7 +2229,7 @@ void LabelTrack::OnContextMenu(wxCommandEvent & evt)
|
|||
case OnCutSelectedTextID:
|
||||
if (CutSelectedText())
|
||||
{
|
||||
ProjectManager::Get( *p ).PushState(_("Modified Label"),
|
||||
ProjectHistory::Get( *p ).PushState(_("Modified Label"),
|
||||
_("Label Edit"),
|
||||
UndoPush::CONSOLIDATE);
|
||||
}
|
||||
|
@ -2244,7 +2244,7 @@ void LabelTrack::OnContextMenu(wxCommandEvent & evt)
|
|||
case OnPasteSelectedTextID:
|
||||
if (PasteSelectedText(selectedRegion.t0(), selectedRegion.t1()))
|
||||
{
|
||||
ProjectManager::Get( *p ).PushState(_("Modified Label"),
|
||||
ProjectHistory::Get( *p ).PushState(_("Modified Label"),
|
||||
_("Label Edit"),
|
||||
UndoPush::CONSOLIDATE);
|
||||
}
|
||||
|
@ -2256,7 +2256,7 @@ void LabelTrack::OnContextMenu(wxCommandEvent & evt)
|
|||
if (ndx != -1)
|
||||
{
|
||||
DeleteLabel(ndx);
|
||||
ProjectManager::Get( *p ).PushState(_("Deleted Label"),
|
||||
ProjectHistory::Get( *p ).PushState(_("Deleted Label"),
|
||||
_("Label Edit"),
|
||||
UndoPush::CONSOLIDATE);
|
||||
}
|
||||
|
@ -3103,7 +3103,7 @@ void LabelTrack::DoEditLabels
|
|||
#endif
|
||||
|
||||
if (dlg.ShowModal() == wxID_OK) {
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Edited labels"), _("Label"));
|
||||
window.RedrawProject();
|
||||
}
|
||||
|
|
|
@ -115,6 +115,8 @@ audacity_SOURCES = \
|
|||
AudioIOListener.h \
|
||||
AutoRecovery.cpp \
|
||||
AutoRecovery.h \
|
||||
AutoRecoveryDialog.cpp \
|
||||
AutoRecoveryDialog.h \
|
||||
BatchCommandDialog.cpp \
|
||||
BatchCommandDialog.h \
|
||||
BatchCommands.cpp \
|
||||
|
@ -211,14 +213,22 @@ audacity_SOURCES = \
|
|||
Project.h \
|
||||
ProjectAudioIO.cpp \
|
||||
ProjectAudioIO.h \
|
||||
ProjectAudioManager.cpp \
|
||||
ProjectAudioManager.h \
|
||||
ProjectFileIO.cpp \
|
||||
ProjectFileIO.h \
|
||||
ProjectFileIORegistry.cpp \
|
||||
ProjectFileIORegistry.h \
|
||||
ProjectFileManager.cpp \
|
||||
ProjectFileManager.h \
|
||||
ProjectFSCK.cpp \
|
||||
ProjectFSCK.h \
|
||||
ProjectHistory.cpp \
|
||||
ProjectHistory.h \
|
||||
ProjectManager.cpp \
|
||||
ProjectManager.h \
|
||||
ProjectSelectionManager.cpp \
|
||||
ProjectSelectionManager.h \
|
||||
ProjectSettings.cpp \
|
||||
ProjectSettings.h \
|
||||
ProjectWindow.cpp \
|
||||
|
@ -485,16 +495,11 @@ audacity_SOURCES = \
|
|||
import/Import.cpp \
|
||||
import/Import.h \
|
||||
import/ImportFLAC.cpp \
|
||||
import/ImportFLAC.h \
|
||||
import/ImportForwards.h \
|
||||
import/ImportLOF.cpp \
|
||||
import/ImportLOF.h \
|
||||
import/ImportMP3.cpp \
|
||||
import/ImportMP3.h \
|
||||
import/ImportOGG.cpp \
|
||||
import/ImportOGG.h \
|
||||
import/ImportPCM.cpp \
|
||||
import/ImportPCM.h \
|
||||
import/ImportPlugin.h \
|
||||
import/ImportRaw.cpp \
|
||||
import/ImportRaw.h \
|
||||
|
@ -766,7 +771,6 @@ audacity_SOURCES += \
|
|||
export/ExportFFmpegDialogs.cpp \
|
||||
export/ExportFFmpegDialogs.h \
|
||||
import/ImportFFmpeg.cpp \
|
||||
import/ImportFFmpeg.h \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
|
@ -775,7 +779,6 @@ audacity_CPPFLAGS += $(GSTREAMER_CFLAGS)
|
|||
audacity_LDADD += $(GSTREAMER_LIBS)
|
||||
audacity_SOURCES += \
|
||||
import/ImportGStreamer.cpp \
|
||||
import/ImportGStreamer.h \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
|
@ -871,7 +874,6 @@ audacity_CPPFLAGS += $(QUICKTIME_CFLAGS)
|
|||
audacity_LDADD += $(QUICKTIME_LIBS)
|
||||
audacity_SOURCES += \
|
||||
import/ImportQT.cpp \
|
||||
import/ImportQT.h \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
|
|
260
src/Makefile.in
260
src/Makefile.in
|
@ -105,14 +105,12 @@ bin_PROGRAMS = audacity$(EXEEXT)
|
|||
@USE_FFMPEG_TRUE@ export/ExportFFmpegDialogs.cpp \
|
||||
@USE_FFMPEG_TRUE@ export/ExportFFmpegDialogs.h \
|
||||
@USE_FFMPEG_TRUE@ import/ImportFFmpeg.cpp \
|
||||
@USE_FFMPEG_TRUE@ import/ImportFFmpeg.h \
|
||||
@USE_FFMPEG_TRUE@ $(NULL)
|
||||
|
||||
@USE_GSTREAMER_TRUE@am__append_7 = $(GSTREAMER_CFLAGS)
|
||||
@USE_GSTREAMER_TRUE@am__append_8 = $(GSTREAMER_LIBS)
|
||||
@USE_GSTREAMER_TRUE@am__append_9 = \
|
||||
@USE_GSTREAMER_TRUE@ import/ImportGStreamer.cpp \
|
||||
@USE_GSTREAMER_TRUE@ import/ImportGStreamer.h \
|
||||
@USE_GSTREAMER_TRUE@ $(NULL)
|
||||
|
||||
@USE_LADSPA_TRUE@am__append_10 = $(LADSPA_CFLAGS)
|
||||
|
@ -175,7 +173,6 @@ bin_PROGRAMS = audacity$(EXEEXT)
|
|||
@USE_QUICKTIME_TRUE@am__append_40 = $(QUICKTIME_LIBS)
|
||||
@USE_QUICKTIME_TRUE@am__append_41 = \
|
||||
@USE_QUICKTIME_TRUE@ import/ImportQT.cpp \
|
||||
@USE_QUICKTIME_TRUE@ import/ImportQT.h \
|
||||
@USE_QUICKTIME_TRUE@ $(NULL)
|
||||
|
||||
@USE_SBSMS_TRUE@am__append_42 = $(SBSMS_CFLAGS)
|
||||
|
@ -294,36 +291,40 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \
|
|||
AudacityApp.cpp AudacityApp.h AudacityException.cpp \
|
||||
AudacityException.h AudacityLogger.cpp AudacityLogger.h \
|
||||
AudioIO.cpp AudioIO.h AudioIOListener.h AutoRecovery.cpp \
|
||||
AutoRecovery.h BatchCommandDialog.cpp BatchCommandDialog.h \
|
||||
BatchCommands.cpp BatchCommands.h BatchProcessDialog.cpp \
|
||||
BatchProcessDialog.h Benchmark.cpp Benchmark.h \
|
||||
CellularPanel.cpp CellularPanel.h ClientData.h \
|
||||
ClientDataHelpers.h Clipboard.cpp Clipboard.h CrashReport.cpp \
|
||||
CrashReport.h Dependencies.cpp Dependencies.h DeviceChange.cpp \
|
||||
DeviceChange.h DeviceManager.cpp DeviceManager.h Diags.cpp \
|
||||
Diags.h Envelope.cpp Envelope.h Experimental.h FFmpeg.cpp \
|
||||
FFmpeg.h FFT.cpp FFT.h FileException.cpp FileException.h \
|
||||
FileIO.cpp FileIO.h FileNames.cpp FileNames.h float_cast.h \
|
||||
FreqWindow.cpp FreqWindow.h HelpText.cpp HelpText.h \
|
||||
HistoryWindow.cpp HistoryWindow.h HitTestResult.h \
|
||||
ImageManipulation.cpp ImageManipulation.h \
|
||||
InconsistencyException.cpp InconsistencyException.h \
|
||||
InterpolateAudio.cpp InterpolateAudio.h KeyboardCapture.cpp \
|
||||
KeyboardCapture.h LabelDialog.cpp LabelDialog.h LabelTrack.cpp \
|
||||
LabelTrack.h LangChoice.cpp LangChoice.h Languages.cpp \
|
||||
Languages.h Legacy.cpp Legacy.h Lyrics.cpp Lyrics.h \
|
||||
LyricsWindow.cpp LyricsWindow.h MacroMagic.h Matrix.cpp \
|
||||
Matrix.h MemoryX.h Menus.cpp Menus.h \
|
||||
MissingAliasFileDialog.cpp MissingAliasFileDialog.h Mix.cpp \
|
||||
Mix.h MixerBoard.cpp MixerBoard.h ModuleManager.cpp \
|
||||
ModuleManager.h NumberScale.h PitchName.cpp PitchName.h \
|
||||
PlatformCompatibility.cpp PlatformCompatibility.h \
|
||||
PluginManager.cpp PluginManager.h Printing.cpp Printing.h \
|
||||
Profiler.cpp Profiler.h Project.cpp Project.h \
|
||||
ProjectAudioIO.cpp ProjectAudioIO.h ProjectFileIO.cpp \
|
||||
ProjectFileIO.h ProjectFileIORegistry.cpp \
|
||||
ProjectFileIORegistry.h ProjectFSCK.cpp ProjectFSCK.h \
|
||||
ProjectManager.cpp ProjectManager.h ProjectSettings.cpp \
|
||||
AutoRecovery.h AutoRecoveryDialog.cpp AutoRecoveryDialog.h \
|
||||
BatchCommandDialog.cpp BatchCommandDialog.h BatchCommands.cpp \
|
||||
BatchCommands.h BatchProcessDialog.cpp BatchProcessDialog.h \
|
||||
Benchmark.cpp Benchmark.h CellularPanel.cpp CellularPanel.h \
|
||||
ClientData.h ClientDataHelpers.h Clipboard.cpp Clipboard.h \
|
||||
CrashReport.cpp CrashReport.h Dependencies.cpp Dependencies.h \
|
||||
DeviceChange.cpp DeviceChange.h DeviceManager.cpp \
|
||||
DeviceManager.h Diags.cpp Diags.h Envelope.cpp Envelope.h \
|
||||
Experimental.h FFmpeg.cpp FFmpeg.h FFT.cpp FFT.h \
|
||||
FileException.cpp FileException.h FileIO.cpp FileIO.h \
|
||||
FileNames.cpp FileNames.h float_cast.h FreqWindow.cpp \
|
||||
FreqWindow.h HelpText.cpp HelpText.h HistoryWindow.cpp \
|
||||
HistoryWindow.h HitTestResult.h ImageManipulation.cpp \
|
||||
ImageManipulation.h InconsistencyException.cpp \
|
||||
InconsistencyException.h InterpolateAudio.cpp \
|
||||
InterpolateAudio.h KeyboardCapture.cpp KeyboardCapture.h \
|
||||
LabelDialog.cpp LabelDialog.h LabelTrack.cpp LabelTrack.h \
|
||||
LangChoice.cpp LangChoice.h Languages.cpp Languages.h \
|
||||
Legacy.cpp Legacy.h Lyrics.cpp Lyrics.h LyricsWindow.cpp \
|
||||
LyricsWindow.h MacroMagic.h Matrix.cpp Matrix.h MemoryX.h \
|
||||
Menus.cpp Menus.h MissingAliasFileDialog.cpp \
|
||||
MissingAliasFileDialog.h Mix.cpp Mix.h MixerBoard.cpp \
|
||||
MixerBoard.h ModuleManager.cpp ModuleManager.h NumberScale.h \
|
||||
PitchName.cpp PitchName.h PlatformCompatibility.cpp \
|
||||
PlatformCompatibility.h PluginManager.cpp PluginManager.h \
|
||||
Printing.cpp Printing.h Profiler.cpp Profiler.h Project.cpp \
|
||||
Project.h ProjectAudioIO.cpp ProjectAudioIO.h \
|
||||
ProjectAudioManager.cpp ProjectAudioManager.h \
|
||||
ProjectFileIO.cpp ProjectFileIO.h ProjectFileIORegistry.cpp \
|
||||
ProjectFileIORegistry.h ProjectFileManager.cpp \
|
||||
ProjectFileManager.h ProjectFSCK.cpp ProjectFSCK.h \
|
||||
ProjectHistory.cpp ProjectHistory.h ProjectManager.cpp \
|
||||
ProjectManager.h ProjectSelectionManager.cpp \
|
||||
ProjectSelectionManager.h ProjectSettings.cpp \
|
||||
ProjectSettings.h ProjectWindow.cpp ProjectWindow.h \
|
||||
RealFFTf.cpp RealFFTf.h RealFFTf48x.cpp RealFFTf48x.h \
|
||||
RefreshCode.h Resample.cpp Resample.h RevisionIdent.h \
|
||||
|
@ -428,18 +429,16 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \
|
|||
export/ExportMultiple.cpp export/ExportMultiple.h \
|
||||
export/ExportOGG.cpp export/ExportOGG.h export/ExportPCM.cpp \
|
||||
export/ExportPCM.h import/Import.cpp import/Import.h \
|
||||
import/ImportFLAC.cpp import/ImportFLAC.h \
|
||||
import/ImportForwards.h import/ImportLOF.cpp \
|
||||
import/ImportLOF.h import/ImportMP3.cpp import/ImportMP3.h \
|
||||
import/ImportOGG.cpp import/ImportOGG.h import/ImportPCM.cpp \
|
||||
import/ImportPCM.h import/ImportPlugin.h import/ImportRaw.cpp \
|
||||
import/ImportRaw.h import/RawAudioGuess.cpp \
|
||||
import/RawAudioGuess.h import/FormatClassifier.cpp \
|
||||
import/FormatClassifier.h import/MultiFormatReader.cpp \
|
||||
import/MultiFormatReader.h import/SpecPowerMeter.cpp \
|
||||
import/SpecPowerMeter.h menus/ClipMenus.cpp \
|
||||
menus/EditMenus.cpp menus/ExtraMenus.cpp menus/FileMenus.cpp \
|
||||
menus/HelpMenus.cpp menus/LabelMenus.cpp \
|
||||
import/ImportFLAC.cpp import/ImportForwards.h \
|
||||
import/ImportLOF.cpp import/ImportMP3.cpp import/ImportOGG.cpp \
|
||||
import/ImportPCM.cpp import/ImportPlugin.h \
|
||||
import/ImportRaw.cpp import/ImportRaw.h \
|
||||
import/RawAudioGuess.cpp import/RawAudioGuess.h \
|
||||
import/FormatClassifier.cpp import/FormatClassifier.h \
|
||||
import/MultiFormatReader.cpp import/MultiFormatReader.h \
|
||||
import/SpecPowerMeter.cpp import/SpecPowerMeter.h \
|
||||
menus/ClipMenus.cpp menus/EditMenus.cpp menus/ExtraMenus.cpp \
|
||||
menus/FileMenus.cpp menus/HelpMenus.cpp menus/LabelMenus.cpp \
|
||||
menus/NavigationMenus.cpp menus/PluginMenus.cpp \
|
||||
menus/SelectMenus.cpp menus/ToolbarMenus.cpp \
|
||||
menus/TrackMenus.cpp menus/TransportMenus.cpp \
|
||||
|
@ -581,8 +580,7 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \
|
|||
effects/audiounits/AudioUnitEffect.h export/ExportFFmpeg.cpp \
|
||||
export/ExportFFmpeg.h export/ExportFFmpegDialogs.cpp \
|
||||
export/ExportFFmpegDialogs.h import/ImportFFmpeg.cpp \
|
||||
import/ImportFFmpeg.h import/ImportGStreamer.cpp \
|
||||
import/ImportGStreamer.h effects/ladspa/ladspa.h \
|
||||
import/ImportGStreamer.cpp effects/ladspa/ladspa.h \
|
||||
effects/ladspa/LadspaEffect.cpp effects/ladspa/LadspaEffect.h \
|
||||
ondemand/ODDecodeFlacTask.cpp ondemand/ODDecodeFlacTask.h \
|
||||
effects/nyquist/LoadNyquist.cpp effects/nyquist/LoadNyquist.h \
|
||||
|
@ -590,7 +588,7 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \
|
|||
effects/lv2/LoadLV2.cpp effects/lv2/LoadLV2.h \
|
||||
effects/lv2/LV2Effect.cpp effects/lv2/LV2Effect.h \
|
||||
NoteTrack.cpp NoteTrack.h import/ImportMIDI.cpp \
|
||||
import/ImportMIDI.h import/ImportQT.cpp import/ImportQT.h \
|
||||
import/ImportMIDI.h import/ImportQT.cpp \
|
||||
effects/vamp/LoadVamp.cpp effects/vamp/LoadVamp.h \
|
||||
effects/vamp/VampEffect.cpp effects/vamp/VampEffect.h \
|
||||
effects/VST/aeffectx.h effects/VST/VSTEffect.cpp \
|
||||
|
@ -639,6 +637,7 @@ am_audacity_OBJECTS = $(am__objects_1) audacity-AboutDialog.$(OBJEXT) \
|
|||
audacity-AudacityException.$(OBJEXT) \
|
||||
audacity-AudacityLogger.$(OBJEXT) audacity-AudioIO.$(OBJEXT) \
|
||||
audacity-AutoRecovery.$(OBJEXT) \
|
||||
audacity-AutoRecoveryDialog.$(OBJEXT) \
|
||||
audacity-BatchCommandDialog.$(OBJEXT) \
|
||||
audacity-BatchCommands.$(OBJEXT) \
|
||||
audacity-BatchProcessDialog.$(OBJEXT) \
|
||||
|
@ -668,10 +667,14 @@ am_audacity_OBJECTS = $(am__objects_1) audacity-AboutDialog.$(OBJEXT) \
|
|||
audacity-PluginManager.$(OBJEXT) audacity-Printing.$(OBJEXT) \
|
||||
audacity-Profiler.$(OBJEXT) audacity-Project.$(OBJEXT) \
|
||||
audacity-ProjectAudioIO.$(OBJEXT) \
|
||||
audacity-ProjectAudioManager.$(OBJEXT) \
|
||||
audacity-ProjectFileIO.$(OBJEXT) \
|
||||
audacity-ProjectFileIORegistry.$(OBJEXT) \
|
||||
audacity-ProjectFileManager.$(OBJEXT) \
|
||||
audacity-ProjectFSCK.$(OBJEXT) \
|
||||
audacity-ProjectHistory.$(OBJEXT) \
|
||||
audacity-ProjectManager.$(OBJEXT) \
|
||||
audacity-ProjectSelectionManager.$(OBJEXT) \
|
||||
audacity-ProjectSettings.$(OBJEXT) \
|
||||
audacity-ProjectWindow.$(OBJEXT) audacity-RealFFTf.$(OBJEXT) \
|
||||
audacity-RealFFTf48x.$(OBJEXT) audacity-Resample.$(OBJEXT) \
|
||||
|
@ -1364,36 +1367,40 @@ audacity_SOURCES = $(libaudacity_la_SOURCES) AboutDialog.cpp \
|
|||
AudacityApp.cpp AudacityApp.h AudacityException.cpp \
|
||||
AudacityException.h AudacityLogger.cpp AudacityLogger.h \
|
||||
AudioIO.cpp AudioIO.h AudioIOListener.h AutoRecovery.cpp \
|
||||
AutoRecovery.h BatchCommandDialog.cpp BatchCommandDialog.h \
|
||||
BatchCommands.cpp BatchCommands.h BatchProcessDialog.cpp \
|
||||
BatchProcessDialog.h Benchmark.cpp Benchmark.h \
|
||||
CellularPanel.cpp CellularPanel.h ClientData.h \
|
||||
ClientDataHelpers.h Clipboard.cpp Clipboard.h CrashReport.cpp \
|
||||
CrashReport.h Dependencies.cpp Dependencies.h DeviceChange.cpp \
|
||||
DeviceChange.h DeviceManager.cpp DeviceManager.h Diags.cpp \
|
||||
Diags.h Envelope.cpp Envelope.h Experimental.h FFmpeg.cpp \
|
||||
FFmpeg.h FFT.cpp FFT.h FileException.cpp FileException.h \
|
||||
FileIO.cpp FileIO.h FileNames.cpp FileNames.h float_cast.h \
|
||||
FreqWindow.cpp FreqWindow.h HelpText.cpp HelpText.h \
|
||||
HistoryWindow.cpp HistoryWindow.h HitTestResult.h \
|
||||
ImageManipulation.cpp ImageManipulation.h \
|
||||
InconsistencyException.cpp InconsistencyException.h \
|
||||
InterpolateAudio.cpp InterpolateAudio.h KeyboardCapture.cpp \
|
||||
KeyboardCapture.h LabelDialog.cpp LabelDialog.h LabelTrack.cpp \
|
||||
LabelTrack.h LangChoice.cpp LangChoice.h Languages.cpp \
|
||||
Languages.h Legacy.cpp Legacy.h Lyrics.cpp Lyrics.h \
|
||||
LyricsWindow.cpp LyricsWindow.h MacroMagic.h Matrix.cpp \
|
||||
Matrix.h MemoryX.h Menus.cpp Menus.h \
|
||||
MissingAliasFileDialog.cpp MissingAliasFileDialog.h Mix.cpp \
|
||||
Mix.h MixerBoard.cpp MixerBoard.h ModuleManager.cpp \
|
||||
ModuleManager.h NumberScale.h PitchName.cpp PitchName.h \
|
||||
PlatformCompatibility.cpp PlatformCompatibility.h \
|
||||
PluginManager.cpp PluginManager.h Printing.cpp Printing.h \
|
||||
Profiler.cpp Profiler.h Project.cpp Project.h \
|
||||
ProjectAudioIO.cpp ProjectAudioIO.h ProjectFileIO.cpp \
|
||||
ProjectFileIO.h ProjectFileIORegistry.cpp \
|
||||
ProjectFileIORegistry.h ProjectFSCK.cpp ProjectFSCK.h \
|
||||
ProjectManager.cpp ProjectManager.h ProjectSettings.cpp \
|
||||
AutoRecovery.h AutoRecoveryDialog.cpp AutoRecoveryDialog.h \
|
||||
BatchCommandDialog.cpp BatchCommandDialog.h BatchCommands.cpp \
|
||||
BatchCommands.h BatchProcessDialog.cpp BatchProcessDialog.h \
|
||||
Benchmark.cpp Benchmark.h CellularPanel.cpp CellularPanel.h \
|
||||
ClientData.h ClientDataHelpers.h Clipboard.cpp Clipboard.h \
|
||||
CrashReport.cpp CrashReport.h Dependencies.cpp Dependencies.h \
|
||||
DeviceChange.cpp DeviceChange.h DeviceManager.cpp \
|
||||
DeviceManager.h Diags.cpp Diags.h Envelope.cpp Envelope.h \
|
||||
Experimental.h FFmpeg.cpp FFmpeg.h FFT.cpp FFT.h \
|
||||
FileException.cpp FileException.h FileIO.cpp FileIO.h \
|
||||
FileNames.cpp FileNames.h float_cast.h FreqWindow.cpp \
|
||||
FreqWindow.h HelpText.cpp HelpText.h HistoryWindow.cpp \
|
||||
HistoryWindow.h HitTestResult.h ImageManipulation.cpp \
|
||||
ImageManipulation.h InconsistencyException.cpp \
|
||||
InconsistencyException.h InterpolateAudio.cpp \
|
||||
InterpolateAudio.h KeyboardCapture.cpp KeyboardCapture.h \
|
||||
LabelDialog.cpp LabelDialog.h LabelTrack.cpp LabelTrack.h \
|
||||
LangChoice.cpp LangChoice.h Languages.cpp Languages.h \
|
||||
Legacy.cpp Legacy.h Lyrics.cpp Lyrics.h LyricsWindow.cpp \
|
||||
LyricsWindow.h MacroMagic.h Matrix.cpp Matrix.h MemoryX.h \
|
||||
Menus.cpp Menus.h MissingAliasFileDialog.cpp \
|
||||
MissingAliasFileDialog.h Mix.cpp Mix.h MixerBoard.cpp \
|
||||
MixerBoard.h ModuleManager.cpp ModuleManager.h NumberScale.h \
|
||||
PitchName.cpp PitchName.h PlatformCompatibility.cpp \
|
||||
PlatformCompatibility.h PluginManager.cpp PluginManager.h \
|
||||
Printing.cpp Printing.h Profiler.cpp Profiler.h Project.cpp \
|
||||
Project.h ProjectAudioIO.cpp ProjectAudioIO.h \
|
||||
ProjectAudioManager.cpp ProjectAudioManager.h \
|
||||
ProjectFileIO.cpp ProjectFileIO.h ProjectFileIORegistry.cpp \
|
||||
ProjectFileIORegistry.h ProjectFileManager.cpp \
|
||||
ProjectFileManager.h ProjectFSCK.cpp ProjectFSCK.h \
|
||||
ProjectHistory.cpp ProjectHistory.h ProjectManager.cpp \
|
||||
ProjectManager.h ProjectSelectionManager.cpp \
|
||||
ProjectSelectionManager.h ProjectSettings.cpp \
|
||||
ProjectSettings.h ProjectWindow.cpp ProjectWindow.h \
|
||||
RealFFTf.cpp RealFFTf.h RealFFTf48x.cpp RealFFTf48x.h \
|
||||
RefreshCode.h Resample.cpp Resample.h RevisionIdent.h \
|
||||
|
@ -1499,18 +1506,16 @@ audacity_SOURCES = $(libaudacity_la_SOURCES) AboutDialog.cpp \
|
|||
export/ExportMultiple.cpp export/ExportMultiple.h \
|
||||
export/ExportOGG.cpp export/ExportOGG.h export/ExportPCM.cpp \
|
||||
export/ExportPCM.h import/Import.cpp import/Import.h \
|
||||
import/ImportFLAC.cpp import/ImportFLAC.h \
|
||||
import/ImportForwards.h import/ImportLOF.cpp \
|
||||
import/ImportLOF.h import/ImportMP3.cpp import/ImportMP3.h \
|
||||
import/ImportOGG.cpp import/ImportOGG.h import/ImportPCM.cpp \
|
||||
import/ImportPCM.h import/ImportPlugin.h import/ImportRaw.cpp \
|
||||
import/ImportRaw.h import/RawAudioGuess.cpp \
|
||||
import/RawAudioGuess.h import/FormatClassifier.cpp \
|
||||
import/FormatClassifier.h import/MultiFormatReader.cpp \
|
||||
import/MultiFormatReader.h import/SpecPowerMeter.cpp \
|
||||
import/SpecPowerMeter.h menus/ClipMenus.cpp \
|
||||
menus/EditMenus.cpp menus/ExtraMenus.cpp menus/FileMenus.cpp \
|
||||
menus/HelpMenus.cpp menus/LabelMenus.cpp \
|
||||
import/ImportFLAC.cpp import/ImportForwards.h \
|
||||
import/ImportLOF.cpp import/ImportMP3.cpp import/ImportOGG.cpp \
|
||||
import/ImportPCM.cpp import/ImportPlugin.h \
|
||||
import/ImportRaw.cpp import/ImportRaw.h \
|
||||
import/RawAudioGuess.cpp import/RawAudioGuess.h \
|
||||
import/FormatClassifier.cpp import/FormatClassifier.h \
|
||||
import/MultiFormatReader.cpp import/MultiFormatReader.h \
|
||||
import/SpecPowerMeter.cpp import/SpecPowerMeter.h \
|
||||
menus/ClipMenus.cpp menus/EditMenus.cpp menus/ExtraMenus.cpp \
|
||||
menus/FileMenus.cpp menus/HelpMenus.cpp menus/LabelMenus.cpp \
|
||||
menus/NavigationMenus.cpp menus/PluginMenus.cpp \
|
||||
menus/SelectMenus.cpp menus/ToolbarMenus.cpp \
|
||||
menus/TrackMenus.cpp menus/TransportMenus.cpp \
|
||||
|
@ -2518,6 +2523,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-AudacityLogger.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-AudioIO.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-AutoRecovery.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-AutoRecoveryDialog.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-BatchCommandDialog.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-BatchCommands.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-BatchProcessDialog.Po@am__quote@
|
||||
|
@ -2569,10 +2575,14 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Profiler.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Project.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectAudioIO.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectAudioManager.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectFSCK.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectFileIO.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectFileIORegistry.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectFileManager.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectHistory.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectManager.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectSelectionManager.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectSettings.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectWindow.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-RealFFTf.Po@am__quote@
|
||||
|
@ -3374,6 +3384,20 @@ audacity-AutoRecovery.obj: AutoRecovery.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-AutoRecovery.obj `if test -f 'AutoRecovery.cpp'; then $(CYGPATH_W) 'AutoRecovery.cpp'; else $(CYGPATH_W) '$(srcdir)/AutoRecovery.cpp'; fi`
|
||||
|
||||
audacity-AutoRecoveryDialog.o: AutoRecoveryDialog.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-AutoRecoveryDialog.o -MD -MP -MF $(DEPDIR)/audacity-AutoRecoveryDialog.Tpo -c -o audacity-AutoRecoveryDialog.o `test -f 'AutoRecoveryDialog.cpp' || echo '$(srcdir)/'`AutoRecoveryDialog.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-AutoRecoveryDialog.Tpo $(DEPDIR)/audacity-AutoRecoveryDialog.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AutoRecoveryDialog.cpp' object='audacity-AutoRecoveryDialog.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-AutoRecoveryDialog.o `test -f 'AutoRecoveryDialog.cpp' || echo '$(srcdir)/'`AutoRecoveryDialog.cpp
|
||||
|
||||
audacity-AutoRecoveryDialog.obj: AutoRecoveryDialog.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-AutoRecoveryDialog.obj -MD -MP -MF $(DEPDIR)/audacity-AutoRecoveryDialog.Tpo -c -o audacity-AutoRecoveryDialog.obj `if test -f 'AutoRecoveryDialog.cpp'; then $(CYGPATH_W) 'AutoRecoveryDialog.cpp'; else $(CYGPATH_W) '$(srcdir)/AutoRecoveryDialog.cpp'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-AutoRecoveryDialog.Tpo $(DEPDIR)/audacity-AutoRecoveryDialog.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AutoRecoveryDialog.cpp' object='audacity-AutoRecoveryDialog.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-AutoRecoveryDialog.obj `if test -f 'AutoRecoveryDialog.cpp'; then $(CYGPATH_W) 'AutoRecoveryDialog.cpp'; else $(CYGPATH_W) '$(srcdir)/AutoRecoveryDialog.cpp'; fi`
|
||||
|
||||
audacity-BatchCommandDialog.o: BatchCommandDialog.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-BatchCommandDialog.o -MD -MP -MF $(DEPDIR)/audacity-BatchCommandDialog.Tpo -c -o audacity-BatchCommandDialog.o `test -f 'BatchCommandDialog.cpp' || echo '$(srcdir)/'`BatchCommandDialog.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-BatchCommandDialog.Tpo $(DEPDIR)/audacity-BatchCommandDialog.Po
|
||||
|
@ -3990,6 +4014,20 @@ audacity-ProjectAudioIO.obj: ProjectAudioIO.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-ProjectAudioIO.obj `if test -f 'ProjectAudioIO.cpp'; then $(CYGPATH_W) 'ProjectAudioIO.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectAudioIO.cpp'; fi`
|
||||
|
||||
audacity-ProjectAudioManager.o: ProjectAudioManager.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectAudioManager.o -MD -MP -MF $(DEPDIR)/audacity-ProjectAudioManager.Tpo -c -o audacity-ProjectAudioManager.o `test -f 'ProjectAudioManager.cpp' || echo '$(srcdir)/'`ProjectAudioManager.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectAudioManager.Tpo $(DEPDIR)/audacity-ProjectAudioManager.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ProjectAudioManager.cpp' object='audacity-ProjectAudioManager.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-ProjectAudioManager.o `test -f 'ProjectAudioManager.cpp' || echo '$(srcdir)/'`ProjectAudioManager.cpp
|
||||
|
||||
audacity-ProjectAudioManager.obj: ProjectAudioManager.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectAudioManager.obj -MD -MP -MF $(DEPDIR)/audacity-ProjectAudioManager.Tpo -c -o audacity-ProjectAudioManager.obj `if test -f 'ProjectAudioManager.cpp'; then $(CYGPATH_W) 'ProjectAudioManager.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectAudioManager.cpp'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectAudioManager.Tpo $(DEPDIR)/audacity-ProjectAudioManager.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ProjectAudioManager.cpp' object='audacity-ProjectAudioManager.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-ProjectAudioManager.obj `if test -f 'ProjectAudioManager.cpp'; then $(CYGPATH_W) 'ProjectAudioManager.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectAudioManager.cpp'; fi`
|
||||
|
||||
audacity-ProjectFileIO.o: ProjectFileIO.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectFileIO.o -MD -MP -MF $(DEPDIR)/audacity-ProjectFileIO.Tpo -c -o audacity-ProjectFileIO.o `test -f 'ProjectFileIO.cpp' || echo '$(srcdir)/'`ProjectFileIO.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectFileIO.Tpo $(DEPDIR)/audacity-ProjectFileIO.Po
|
||||
|
@ -4018,6 +4056,20 @@ audacity-ProjectFileIORegistry.obj: ProjectFileIORegistry.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-ProjectFileIORegistry.obj `if test -f 'ProjectFileIORegistry.cpp'; then $(CYGPATH_W) 'ProjectFileIORegistry.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectFileIORegistry.cpp'; fi`
|
||||
|
||||
audacity-ProjectFileManager.o: ProjectFileManager.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectFileManager.o -MD -MP -MF $(DEPDIR)/audacity-ProjectFileManager.Tpo -c -o audacity-ProjectFileManager.o `test -f 'ProjectFileManager.cpp' || echo '$(srcdir)/'`ProjectFileManager.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectFileManager.Tpo $(DEPDIR)/audacity-ProjectFileManager.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ProjectFileManager.cpp' object='audacity-ProjectFileManager.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-ProjectFileManager.o `test -f 'ProjectFileManager.cpp' || echo '$(srcdir)/'`ProjectFileManager.cpp
|
||||
|
||||
audacity-ProjectFileManager.obj: ProjectFileManager.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectFileManager.obj -MD -MP -MF $(DEPDIR)/audacity-ProjectFileManager.Tpo -c -o audacity-ProjectFileManager.obj `if test -f 'ProjectFileManager.cpp'; then $(CYGPATH_W) 'ProjectFileManager.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectFileManager.cpp'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectFileManager.Tpo $(DEPDIR)/audacity-ProjectFileManager.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ProjectFileManager.cpp' object='audacity-ProjectFileManager.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-ProjectFileManager.obj `if test -f 'ProjectFileManager.cpp'; then $(CYGPATH_W) 'ProjectFileManager.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectFileManager.cpp'; fi`
|
||||
|
||||
audacity-ProjectFSCK.o: ProjectFSCK.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectFSCK.o -MD -MP -MF $(DEPDIR)/audacity-ProjectFSCK.Tpo -c -o audacity-ProjectFSCK.o `test -f 'ProjectFSCK.cpp' || echo '$(srcdir)/'`ProjectFSCK.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectFSCK.Tpo $(DEPDIR)/audacity-ProjectFSCK.Po
|
||||
|
@ -4032,6 +4084,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-ProjectHistory.o: ProjectHistory.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectHistory.o -MD -MP -MF $(DEPDIR)/audacity-ProjectHistory.Tpo -c -o audacity-ProjectHistory.o `test -f 'ProjectHistory.cpp' || echo '$(srcdir)/'`ProjectHistory.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectHistory.Tpo $(DEPDIR)/audacity-ProjectHistory.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ProjectHistory.cpp' object='audacity-ProjectHistory.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-ProjectHistory.o `test -f 'ProjectHistory.cpp' || echo '$(srcdir)/'`ProjectHistory.cpp
|
||||
|
||||
audacity-ProjectHistory.obj: ProjectHistory.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectHistory.obj -MD -MP -MF $(DEPDIR)/audacity-ProjectHistory.Tpo -c -o audacity-ProjectHistory.obj `if test -f 'ProjectHistory.cpp'; then $(CYGPATH_W) 'ProjectHistory.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectHistory.cpp'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectHistory.Tpo $(DEPDIR)/audacity-ProjectHistory.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ProjectHistory.cpp' object='audacity-ProjectHistory.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-ProjectHistory.obj `if test -f 'ProjectHistory.cpp'; then $(CYGPATH_W) 'ProjectHistory.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectHistory.cpp'; fi`
|
||||
|
||||
audacity-ProjectManager.o: ProjectManager.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectManager.o -MD -MP -MF $(DEPDIR)/audacity-ProjectManager.Tpo -c -o audacity-ProjectManager.o `test -f 'ProjectManager.cpp' || echo '$(srcdir)/'`ProjectManager.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectManager.Tpo $(DEPDIR)/audacity-ProjectManager.Po
|
||||
|
@ -4046,6 +4112,20 @@ audacity-ProjectManager.obj: ProjectManager.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-ProjectManager.obj `if test -f 'ProjectManager.cpp'; then $(CYGPATH_W) 'ProjectManager.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectManager.cpp'; fi`
|
||||
|
||||
audacity-ProjectSelectionManager.o: ProjectSelectionManager.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectSelectionManager.o -MD -MP -MF $(DEPDIR)/audacity-ProjectSelectionManager.Tpo -c -o audacity-ProjectSelectionManager.o `test -f 'ProjectSelectionManager.cpp' || echo '$(srcdir)/'`ProjectSelectionManager.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectSelectionManager.Tpo $(DEPDIR)/audacity-ProjectSelectionManager.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ProjectSelectionManager.cpp' object='audacity-ProjectSelectionManager.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-ProjectSelectionManager.o `test -f 'ProjectSelectionManager.cpp' || echo '$(srcdir)/'`ProjectSelectionManager.cpp
|
||||
|
||||
audacity-ProjectSelectionManager.obj: ProjectSelectionManager.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectSelectionManager.obj -MD -MP -MF $(DEPDIR)/audacity-ProjectSelectionManager.Tpo -c -o audacity-ProjectSelectionManager.obj `if test -f 'ProjectSelectionManager.cpp'; then $(CYGPATH_W) 'ProjectSelectionManager.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectSelectionManager.cpp'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectSelectionManager.Tpo $(DEPDIR)/audacity-ProjectSelectionManager.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ProjectSelectionManager.cpp' object='audacity-ProjectSelectionManager.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-ProjectSelectionManager.obj `if test -f 'ProjectSelectionManager.cpp'; then $(CYGPATH_W) 'ProjectSelectionManager.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectSelectionManager.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
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include "Project.h"
|
||||
#include "ProjectAudioIO.h"
|
||||
#include "ProjectFileIO.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "ProjectHistory.h"
|
||||
#include "ProjectSettings.h"
|
||||
#include "ProjectWindow.h"
|
||||
#include "UndoManager.h"
|
||||
|
@ -331,7 +331,7 @@ void MenuManager::ModifyUndoMenuItems(AudacityProject &project)
|
|||
wxString::Format(_("&Undo %s"),
|
||||
desc));
|
||||
commandManager.Enable(wxT("Undo"),
|
||||
ProjectManager::Get( project ).UndoAvailable());
|
||||
ProjectHistory::Get( project ).UndoAvailable());
|
||||
}
|
||||
else {
|
||||
commandManager.Modify(wxT("Undo"),
|
||||
|
@ -344,7 +344,7 @@ void MenuManager::ModifyUndoMenuItems(AudacityProject &project)
|
|||
wxString::Format(_("&Redo %s"),
|
||||
desc));
|
||||
commandManager.Enable(wxT("Redo"),
|
||||
ProjectManager::Get( project ).RedoAvailable());
|
||||
ProjectHistory::Get( project ).RedoAvailable());
|
||||
}
|
||||
else {
|
||||
commandManager.Modify(wxT("Redo"),
|
||||
|
@ -525,11 +525,11 @@ CommandFlag MenuManager::GetUpdateFlags
|
|||
if (!mLastEffect.empty())
|
||||
flags |= HasLastEffectFlag;
|
||||
|
||||
auto &projectManager = ProjectManager::Get( project );
|
||||
if (projectManager.UndoAvailable())
|
||||
auto &history = ProjectHistory::Get( project );
|
||||
if (history.UndoAvailable())
|
||||
flags |= UndoAvailableFlag;
|
||||
|
||||
if (projectManager.RedoAvailable())
|
||||
if (history.RedoAvailable())
|
||||
flags |= RedoAvailableFlag;
|
||||
|
||||
if (ViewInfo::Get( project ).ZoomInAvailable() && (flags & TracksExistFlag))
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "Prefs.h" // for RTL_WORKAROUND
|
||||
#include "Project.h"
|
||||
#include "ProjectAudioIO.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "ProjectHistory.h"
|
||||
#include "ProjectSettings.h"
|
||||
#include "ProjectWindow.h"
|
||||
#include "TrackPanel.h" // for EVT_TRACK_PANEL_TIMER
|
||||
|
@ -414,7 +414,7 @@ void MixerTrackCluster::HandleSliderGain(const bool bWantPushState /*= false*/)
|
|||
// Update the TrackPanel correspondingly.
|
||||
TrackPanel::Get( *mProject ).RefreshTrack(mTrack.get());
|
||||
if (bWantPushState)
|
||||
ProjectManager::Get( *mProject )
|
||||
ProjectHistory::Get( *mProject )
|
||||
.PushState(_("Moved gain slider"), _("Gain"), UndoPush::CONSOLIDATE );
|
||||
}
|
||||
|
||||
|
@ -428,7 +428,7 @@ void MixerTrackCluster::HandleSliderVelocity(const bool bWantPushState /*= false
|
|||
// Update the TrackPanel correspondingly.
|
||||
TrackPanel::Get( *mProject ).RefreshTrack(mTrack.get());
|
||||
if (bWantPushState)
|
||||
ProjectManager::Get( *mProject )
|
||||
ProjectHistory::Get( *mProject )
|
||||
.PushState(_("Moved velocity slider"), _("Velocity"),
|
||||
UndoPush::CONSOLIDATE);
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ void MixerTrackCluster::HandleSliderPan(const bool bWantPushState /*= false*/)
|
|||
TrackPanel::Get( *mProject ).RefreshTrack(mTrack.get());
|
||||
|
||||
if (bWantPushState)
|
||||
ProjectManager::Get( *mProject )
|
||||
ProjectHistory::Get( *mProject )
|
||||
.PushState(_("Moved pan slider"), _("Pan"),
|
||||
UndoPush::CONSOLIDATE );
|
||||
}
|
||||
|
|
|
@ -0,0 +1,197 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ProjectAudioManager.cpp
|
||||
|
||||
Paul Licameli split from ProjectManager.cpp
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "ProjectAudioManager.h"
|
||||
|
||||
#include <wx/frame.h>
|
||||
#include <wx/statusbr.h>
|
||||
|
||||
#include "AudioIO.h"
|
||||
#include "AutoRecovery.h"
|
||||
#include "DirManager.h"
|
||||
#include "LabelTrack.h"
|
||||
#include "Menus.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectAudioIO.h"
|
||||
#include "ProjectFileIO.h"
|
||||
#include "ProjectHistory.h"
|
||||
#include "ProjectSettings.h"
|
||||
#include "ProjectWindow.h"
|
||||
#include "toolbars/ControlToolBar.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
#include "widgets/Warning.h"
|
||||
|
||||
static AudacityProject::AttachedObjects::RegisteredFactory
|
||||
sProjectAudioManagerKey {
|
||||
[]( AudacityProject &project ) {
|
||||
return std::make_shared< ProjectAudioManager >( project );
|
||||
}
|
||||
};
|
||||
|
||||
ProjectAudioManager &ProjectAudioManager::Get( AudacityProject &project )
|
||||
{
|
||||
return project.AttachedObjects::Get< ProjectAudioManager >(
|
||||
sProjectAudioManagerKey );
|
||||
}
|
||||
|
||||
const ProjectAudioManager &ProjectAudioManager::Get(
|
||||
const AudacityProject &project )
|
||||
{
|
||||
return Get( const_cast< AudacityProject & >( project ) );
|
||||
}
|
||||
|
||||
ProjectAudioManager::~ProjectAudioManager() = default;
|
||||
|
||||
void ProjectAudioManager::OnAudioIORate(int rate)
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &window = GetProjectFrame( project );
|
||||
wxString display;
|
||||
if (rate > 0) {
|
||||
display = wxString::Format(_("Actual Rate: %d"), rate);
|
||||
}
|
||||
else
|
||||
// clear the status field
|
||||
;
|
||||
|
||||
int x, y;
|
||||
auto statusBar = window.GetStatusBar();
|
||||
statusBar->GetTextExtent(display, &x, &y);
|
||||
int widths[] = {
|
||||
0,
|
||||
ControlToolBar::Get( project ).WidthForStatusBar(statusBar),
|
||||
-1,
|
||||
x+50
|
||||
};
|
||||
statusBar->SetStatusWidths(4, widths);
|
||||
statusBar->SetStatusText(display, rateStatusBarField);
|
||||
}
|
||||
|
||||
void ProjectAudioManager::OnAudioIOStartRecording()
|
||||
{
|
||||
auto &projectFileIO = ProjectFileIO::Get( mProject );
|
||||
// Before recording is started, auto-save the file. The file will have
|
||||
// empty tracks at the bottom where the recording will be put into
|
||||
projectFileIO.AutoSave();
|
||||
}
|
||||
|
||||
// This is called after recording has stopped and all tracks have flushed.
|
||||
void ProjectAudioManager::OnAudioIOStopRecording()
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &dirManager = DirManager::Get( project );
|
||||
auto &projectAudioIO = ProjectAudioIO::Get( project );
|
||||
auto &projectFileIO = ProjectFileIO::Get( project );
|
||||
auto &window = ProjectWindow::Get( project );
|
||||
|
||||
// Only push state if we were capturing and not monitoring
|
||||
if (projectAudioIO.GetAudioIOToken() > 0)
|
||||
{
|
||||
auto &tracks = TrackList::Get( project );
|
||||
auto &intervals = gAudioIO->LostCaptureIntervals();
|
||||
if (intervals.size()) {
|
||||
// Make a track with labels for recording errors
|
||||
auto uTrack = TrackFactory::Get( project ).NewLabelTrack();
|
||||
auto pTrack = uTrack.get();
|
||||
tracks.Add( uTrack );
|
||||
/* i18n-hint: A name given to a track, appearing as its menu button.
|
||||
The translation should be short or else it will not display well.
|
||||
At most, about 11 Latin characters.
|
||||
Dropout is a loss of a short sequence of audio sample data from the
|
||||
recording */
|
||||
pTrack->SetName(_("Dropouts"));
|
||||
long counter = 1;
|
||||
for (auto &interval : intervals)
|
||||
pTrack->AddLabel(
|
||||
SelectedRegion{ interval.first,
|
||||
interval.first + interval.second },
|
||||
wxString::Format(wxT("%ld"), counter++),
|
||||
-2 );
|
||||
ShowWarningDialog(&window, wxT("DropoutDetected"), _("\
|
||||
Recorded audio was lost at the labeled locations. Possible causes:\n\
|
||||
\n\
|
||||
Other applications are competing with Audacity for processor time\n\
|
||||
\n\
|
||||
You are saving directly to a slow external storage device\n\
|
||||
"
|
||||
),
|
||||
false,
|
||||
_("Turn off dropout detection"));
|
||||
}
|
||||
|
||||
// Add to history
|
||||
auto &history = ProjectHistory::Get( project );
|
||||
history.PushState(_("Recorded Audio"), _("Record"));
|
||||
|
||||
// Reset timer record
|
||||
if (IsTimerRecordCancelled())
|
||||
{
|
||||
EditActions::DoUndo( project );
|
||||
ResetTimerRecordCancelled();
|
||||
}
|
||||
|
||||
// Refresh the project window
|
||||
window.FixScrollbars();
|
||||
window.RedrawProject();
|
||||
}
|
||||
|
||||
// Write all cached files to disk, if any
|
||||
dirManager.WriteCacheToDisk();
|
||||
|
||||
// Now we auto-save again to get the project to a "normal" state again.
|
||||
projectFileIO.AutoSave();
|
||||
}
|
||||
|
||||
void ProjectAudioManager::OnAudioIONewBlockFiles(
|
||||
const AutoSaveFile & blockFileLog)
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &projectFileIO = ProjectFileIO::Get( project );
|
||||
// New blockfiles have been created, so add them to the auto-save file
|
||||
const auto &autoSaveFileName = projectFileIO.GetAutoSaveFileName();
|
||||
if ( !autoSaveFileName.empty() )
|
||||
{
|
||||
wxFFile f{ autoSaveFileName, wxT("ab") };
|
||||
if (!f.IsOpened())
|
||||
return; // Keep recording going, there's not much we can do here
|
||||
blockFileLog.Append(f);
|
||||
f.Close();
|
||||
}
|
||||
}
|
||||
|
||||
AudioIOStartStreamOptions
|
||||
DefaultPlayOptions( AudacityProject &project )
|
||||
{
|
||||
auto &projectAudioIO = ProjectAudioIO::Get( project );
|
||||
AudioIOStartStreamOptions options { &project,
|
||||
ProjectSettings::Get( project ).GetRate() };
|
||||
options.captureMeter = projectAudioIO.GetCaptureMeter();
|
||||
options.playbackMeter = projectAudioIO.GetPlaybackMeter();
|
||||
options.timeTrack = TrackList::Get( project ).GetTimeTrack();
|
||||
options.listener = &ProjectAudioManager::Get( project );
|
||||
return options;
|
||||
}
|
||||
|
||||
AudioIOStartStreamOptions
|
||||
DefaultSpeedPlayOptions( AudacityProject &project )
|
||||
{
|
||||
auto &projectAudioIO = ProjectAudioIO::Get( project );
|
||||
auto PlayAtSpeedRate = gAudioIO->GetBestRate(
|
||||
false, //not capturing
|
||||
true, //is playing
|
||||
ProjectSettings::Get( project ).GetRate() //suggested rate
|
||||
);
|
||||
AudioIOStartStreamOptions options{ &project, PlayAtSpeedRate };
|
||||
options.captureMeter = projectAudioIO.GetCaptureMeter();
|
||||
options.playbackMeter = projectAudioIO.GetPlaybackMeter();
|
||||
options.timeTrack = TrackList::Get( project ).GetTimeTrack();
|
||||
options.listener = &ProjectAudioManager::Get( project );
|
||||
return options;
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ProjectAudioManager.h
|
||||
|
||||
Paul Licameli split from ProjectManager.h
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_PROJECT_AUDIO_MANAGER__
|
||||
#define __AUDACITY_PROJECT_AUDIO_MANAGER__
|
||||
|
||||
#include "AudioIOListener.h" // to inherit
|
||||
#include "ClientData.h" // to inherit
|
||||
|
||||
class AudacityProject;
|
||||
struct AudioIOStartStreamOptions;
|
||||
|
||||
class ProjectAudioManager final
|
||||
: public ClientData::Base
|
||||
, public AudioIOListener
|
||||
{
|
||||
public:
|
||||
static ProjectAudioManager &Get( AudacityProject &project );
|
||||
static const ProjectAudioManager &Get( const AudacityProject &project );
|
||||
|
||||
explicit ProjectAudioManager( AudacityProject &project )
|
||||
: mProject{ project }
|
||||
{}
|
||||
~ProjectAudioManager() override;
|
||||
|
||||
bool IsTimerRecordCancelled() { return mTimerRecordCanceled; }
|
||||
void SetTimerRecordCancelled() { mTimerRecordCanceled = true; }
|
||||
void ResetTimerRecordCancelled() { mTimerRecordCanceled = false; }
|
||||
|
||||
private:
|
||||
// Audio IO callback methods
|
||||
void OnAudioIORate(int rate) override;
|
||||
void OnAudioIOStartRecording() override;
|
||||
void OnAudioIOStopRecording() override;
|
||||
void OnAudioIONewBlockFiles(const AutoSaveFile & blockFileLog) override;
|
||||
|
||||
AudacityProject &mProject;
|
||||
|
||||
//flag for cancellation of timer record.
|
||||
bool mTimerRecordCanceled{ false };
|
||||
};
|
||||
|
||||
AudioIOStartStreamOptions DefaultPlayOptions( AudacityProject &project );
|
||||
AudioIOStartStreamOptions DefaultSpeedPlayOptions( AudacityProject &project );
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
|
@ -16,13 +16,12 @@ Paul Licameli split from AudacityProject.h
|
|||
#include "xml/XMLTagHandler.h" // to inherit
|
||||
|
||||
class AudacityProject;
|
||||
class TrackList;
|
||||
|
||||
///\brief Object associated with a project that manages reading and writing
|
||||
/// of Audacity project file formats, and autosave
|
||||
class ProjectFileIO final
|
||||
: public ClientData::Base
|
||||
, private XMLTagHandler
|
||||
, public XMLTagHandler
|
||||
, private PrefsListener
|
||||
{
|
||||
public:
|
||||
|
@ -32,30 +31,8 @@ public:
|
|||
explicit ProjectFileIO( AudacityProject &project );
|
||||
~ProjectFileIO();
|
||||
|
||||
struct ReadProjectResults
|
||||
{
|
||||
bool decodeError;
|
||||
bool parseSuccess;
|
||||
bool trackError;
|
||||
wxString errorString;
|
||||
};
|
||||
ReadProjectResults ReadProjectFile( const FilePath &fileName );
|
||||
|
||||
void EnqueueODTasks();
|
||||
|
||||
bool WarnOfLegacyFile( );
|
||||
|
||||
// To be called when closing a project that has been saved, so that
|
||||
// block files are not erased
|
||||
void CloseLock();
|
||||
|
||||
bool Save();
|
||||
bool SaveAs(bool bWantSaveCopy = false, bool bLossless = false);
|
||||
bool SaveAs(const wxString & newFileName, bool bWantSaveCopy = false,
|
||||
bool addToHistory = true);
|
||||
// strProjectPathName is full path for aup except extension
|
||||
bool SaveFromTimerRecording( wxFileName fnFile );
|
||||
|
||||
const FilePath &GetAutoSaveFileName() { return mAutoSaveFileName; }
|
||||
|
||||
// It seems odd to put this method in this class, but the results do depend
|
||||
|
@ -65,42 +42,37 @@ public:
|
|||
|
||||
bool IsProjectSaved();
|
||||
|
||||
void ResetProjectFileIO();
|
||||
void Reset();
|
||||
|
||||
void AutoSave();
|
||||
void DeleteCurrentAutoSaveFile();
|
||||
|
||||
bool IsRecovered() const { return mIsRecovered; }
|
||||
void SetImportedDependencies( bool value ) { mImportedDependencies = value; }
|
||||
void SetIsRecovered( bool value ) { mIsRecovered = value; }
|
||||
bool IsLoadedFromAup() const { return mbLoadedFromAup; }
|
||||
void SetLoadedFromAup( bool value ) { mbLoadedFromAup = value; }
|
||||
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXMLHeader(XMLWriter &xmlFile) const;
|
||||
|
||||
// If the second argument is not null, that means we are saving a
|
||||
// compressed project, and the wave tracks have been exported into the
|
||||
// named files
|
||||
void WriteXML(
|
||||
XMLWriter &xmlFile, FilePaths *strOtherNamesArray) /* not override */;
|
||||
|
||||
private:
|
||||
bool SaveCopyWaveTracks(const FilePath & strProjectPathName,
|
||||
bool bLossless = false);
|
||||
bool DoSave(bool fromSaveAs, bool bWantSaveCopy, bool bLossless = false);
|
||||
// XMLTagHandler callback methods
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
|
||||
void UpdatePrefs() override;
|
||||
|
||||
// XMLTagHandler callback methods
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXMLHeader(XMLWriter &xmlFile) const;
|
||||
void WriteXML(
|
||||
XMLWriter &xmlFile, bool bWantSaveCopy) /* not override */;
|
||||
|
||||
// non-staic data members
|
||||
// non-static data members
|
||||
AudacityProject &mProject;
|
||||
|
||||
std::shared_ptr<TrackList> mLastSavedTracks;
|
||||
|
||||
FilePaths mStrOtherNamesArray; // used to make sure compressed file names are unique
|
||||
|
||||
// Last auto-save file name and path (empty if none)
|
||||
FilePath mAutoSaveFileName;
|
||||
|
||||
// The auto-save data dir the project has been recovered from
|
||||
FilePath mRecoveryAutoSaveDataDir;
|
||||
|
||||
// Are we currently auto-saving or not?
|
||||
bool mAutoSaving{ false };
|
||||
|
||||
|
@ -108,9 +80,6 @@ private:
|
|||
bool mIsRecovered{ false };
|
||||
|
||||
bool mbLoadedFromAup{ false };
|
||||
|
||||
// Dependencies have been imported and a warning should be shown on save
|
||||
bool mImportedDependencies{ false };
|
||||
};
|
||||
|
||||
class wxTopLevelWindow;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,142 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ProjectFileManager.h
|
||||
|
||||
Paul Licameli split from AudacityProject.h
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_PROJECT_FILE_MANAGER__
|
||||
#define __AUDACITY_PROJECT_FILE_MANAGER__
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "ClientData.h" // to inherit
|
||||
#include "import/ImportRaw.h" // defines TrackHolders
|
||||
|
||||
class wxString;
|
||||
class wxFileName;
|
||||
class AudacityProject;
|
||||
class ImportXMLTagHandler;
|
||||
class RecordingRecoveryHandler;
|
||||
class Track;
|
||||
class TrackList;
|
||||
class WaveTrack;
|
||||
class XMLTagHandler;
|
||||
namespace ProjectFileIORegistry{ struct Entry; }
|
||||
|
||||
using WaveTrackArray = std::vector < std::shared_ptr < WaveTrack > >;
|
||||
|
||||
class ProjectFileManager final
|
||||
: public ClientData::Base
|
||||
{
|
||||
public:
|
||||
static ProjectFileManager &Get( AudacityProject &project );
|
||||
static const ProjectFileManager &Get( const AudacityProject &project );
|
||||
|
||||
explicit ProjectFileManager( AudacityProject &project );
|
||||
~ProjectFileManager();
|
||||
|
||||
struct ReadProjectResults
|
||||
{
|
||||
bool decodeError;
|
||||
bool parseSuccess;
|
||||
bool trackError;
|
||||
wxString errorString;
|
||||
};
|
||||
ReadProjectResults ReadProjectFile( const FilePath &fileName );
|
||||
|
||||
void EnqueueODTasks();
|
||||
|
||||
// To be called when closing a project that has been saved, so that
|
||||
// block files are not erased
|
||||
void CloseLock();
|
||||
|
||||
bool Save();
|
||||
bool SaveAs(bool bWantSaveCopy = false, bool bLossless = false);
|
||||
bool SaveAs(const wxString & newFileName, bool bWantSaveCopy = false,
|
||||
bool addToHistory = true);
|
||||
// strProjectPathName is full path for aup except extension
|
||||
bool SaveFromTimerRecording( wxFileName fnFile );
|
||||
|
||||
void Reset();
|
||||
|
||||
/** @brief Show an open dialogue for opening audio files, and possibly other
|
||||
* sorts of files.
|
||||
*
|
||||
* The file type filter will automatically contain:
|
||||
* - "All files" with any extension or none,
|
||||
* - "All supported files" based on the file formats supported in this
|
||||
* build of Audacity,
|
||||
* - All of the individual formats specified by the importer plug-ins which
|
||||
* are built into this build of Audacity, each with the relevant file
|
||||
* extensions for that format.
|
||||
* The dialogue will start in the DefaultOpenPath directory read from the
|
||||
* preferences, failing that the working directory. The file format filter
|
||||
* will be set to the DefaultOpenType from the preferences, failing that
|
||||
* the first format specified in the dialogue. These two parameters will
|
||||
* be saved to the preferences once the user has chosen a file to open.
|
||||
* @param extraformat Specify the name of an additional format to allow
|
||||
* opening in this dialogue. This string is free-form, but should be short
|
||||
* enough to fit in the file dialogue filter drop-down. It should be
|
||||
* translated.
|
||||
* @param extrafilter Specify the file extension(s) for the additional format
|
||||
* specified by extraformat. The patterns must include the wildcard (e.g.
|
||||
* "*.aup" not "aup" or ".aup"), separate multiple patters with a semicolon,
|
||||
* e.g. "*.aup;*.AUP" because patterns are case-sensitive. Do not add a
|
||||
* trailing semicolon to the string. This string should not be translated
|
||||
* @return Array of file paths which the user selected to open (multiple
|
||||
* selections allowed).
|
||||
*/
|
||||
static wxArrayString ShowOpenDialog(const wxString &extraformat = {},
|
||||
const wxString &extrafilter = {});
|
||||
|
||||
static bool IsAlreadyOpen(const FilePath &projPathName);
|
||||
|
||||
void OpenFile(const FilePath &fileName, bool addtohistory = true);
|
||||
|
||||
// If pNewTrackList is passed in non-NULL, it gets filled with the pointers to NEW tracks.
|
||||
bool Import(const FilePath &fileName, WaveTrackArray *pTrackArray = NULL);
|
||||
|
||||
// Takes array of unique pointers; returns array of shared
|
||||
std::vector< std::shared_ptr<Track> >
|
||||
AddImportedTracks(const FilePath &fileName,
|
||||
TrackHolders &&newTracks);
|
||||
|
||||
bool GetMenuClose() const { return mMenuClose; }
|
||||
void SetMenuClose(bool value) { mMenuClose = value; }
|
||||
|
||||
private:
|
||||
void SetImportedDependencies( bool value ) { mImportedDependencies = value; }
|
||||
|
||||
// Push names of NEW export files onto the path list
|
||||
bool SaveCopyWaveTracks(const FilePath & strProjectPathName,
|
||||
bool bLossless, FilePaths &strOtherNamesArray);
|
||||
bool DoSave(bool fromSaveAs, bool bWantSaveCopy, bool bLossless = false);
|
||||
|
||||
// Declared in this class so that they can have access to private members
|
||||
static XMLTagHandler *RecordingRecoveryFactory( AudacityProject &project );
|
||||
static ProjectFileIORegistry::Entry sRecoveryFactory;
|
||||
static XMLTagHandler *ImportHandlerFactory( AudacityProject &project );
|
||||
static ProjectFileIORegistry::Entry sImportHandlerFactory;
|
||||
|
||||
AudacityProject &mProject;
|
||||
|
||||
std::shared_ptr<TrackList> mLastSavedTracks;
|
||||
|
||||
// The handler that handles recovery of <recordingrecovery> tags
|
||||
std::unique_ptr<RecordingRecoveryHandler> mRecordingRecoveryHandler;
|
||||
|
||||
std::unique_ptr<ImportXMLTagHandler> mImportXMLTagHandler;
|
||||
|
||||
// Dependencies have been imported and a warning should be shown on save
|
||||
bool mImportedDependencies{ false };
|
||||
|
||||
// Are we currently closing as the result of a menu command?
|
||||
bool mMenuClose{ false };
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,219 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ProjectHistory.cpp
|
||||
|
||||
Paul Licameli split from ProjectManager.cpp
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "ProjectHistory.h"
|
||||
|
||||
#include "DirManager.h"
|
||||
#include "Menus.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectFileIO.h"
|
||||
#include "ProjectSettings.h"
|
||||
#include "ProjectWindow.h"
|
||||
#include "Tags.h"
|
||||
#include "Track.h"
|
||||
#include "TrackPanel.h"
|
||||
#include "UndoManager.h"
|
||||
#include "ViewInfo.h"
|
||||
#include "ondemand/ODComputeSummaryTask.h"
|
||||
#include "ondemand/ODManager.h"
|
||||
|
||||
static AudacityProject::AttachedObjects::RegisteredFactory sProjectHistoryKey {
|
||||
[]( AudacityProject &project ) {
|
||||
return std::make_shared< ProjectHistory >( project );
|
||||
}
|
||||
};
|
||||
|
||||
ProjectHistory &ProjectHistory::Get( AudacityProject &project )
|
||||
{
|
||||
return project.AttachedObjects::Get< ProjectHistory >( sProjectHistoryKey );
|
||||
}
|
||||
|
||||
const ProjectHistory &ProjectHistory::Get( const AudacityProject &project )
|
||||
{
|
||||
return Get( const_cast< AudacityProject & >( project ) );
|
||||
}
|
||||
|
||||
ProjectHistory::~ProjectHistory() = default;
|
||||
|
||||
//
|
||||
// Undo/History methods
|
||||
//
|
||||
|
||||
void ProjectHistory::InitialState()
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &tracks = TrackList::Get( project );
|
||||
auto &viewInfo = ViewInfo::Get( project );
|
||||
auto &undoManager = UndoManager::Get( project );
|
||||
auto &tags = Tags::Get( project );
|
||||
|
||||
undoManager.ClearStates();
|
||||
|
||||
undoManager.PushState(
|
||||
&tracks, viewInfo.selectedRegion, tags.shared_from_this(),
|
||||
_("Created new project"), wxT(""));
|
||||
|
||||
undoManager.StateSaved();
|
||||
|
||||
auto &menuManager = MenuManager::Get( project );
|
||||
menuManager.ModifyUndoMenuItems( project );
|
||||
menuManager.UpdateMenus( project );
|
||||
}
|
||||
|
||||
bool ProjectHistory::UndoAvailable()
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &tracks = TrackList::Get( project );
|
||||
auto &undoManager = UndoManager::Get( project );
|
||||
return undoManager.UndoAvailable() &&
|
||||
!tracks.HasPendingTracks();
|
||||
}
|
||||
|
||||
bool ProjectHistory::RedoAvailable()
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &tracks = TrackList::Get( project );
|
||||
auto &undoManager = UndoManager::Get( project );
|
||||
return undoManager.RedoAvailable() &&
|
||||
!tracks.HasPendingTracks();
|
||||
}
|
||||
|
||||
void ProjectHistory::PushState(const wxString &desc, const wxString &shortDesc)
|
||||
{
|
||||
PushState(desc, shortDesc, UndoPush::AUTOSAVE);
|
||||
}
|
||||
|
||||
void ProjectHistory::PushState(const wxString &desc,
|
||||
const wxString &shortDesc,
|
||||
UndoPush flags )
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &projectFileIO = ProjectFileIO::Get( project );
|
||||
const auto &settings = ProjectSettings::Get( project );
|
||||
auto &tracks = TrackList::Get( project );
|
||||
auto &viewInfo = ViewInfo::Get( project );
|
||||
auto &undoManager = UndoManager::Get( project );
|
||||
auto &tags = Tags::Get( project );
|
||||
undoManager.PushState(
|
||||
&tracks, viewInfo.selectedRegion, tags.shared_from_this(),
|
||||
desc, shortDesc, flags);
|
||||
|
||||
mDirty = true;
|
||||
|
||||
auto &menuManager = MenuManager::Get( project );
|
||||
menuManager.ModifyUndoMenuItems( project );
|
||||
menuManager.UpdateMenus( project );
|
||||
|
||||
if (settings.GetTracksFitVerticallyZoomed())
|
||||
ViewActions::DoZoomFitV( project );
|
||||
if((flags & UndoPush::AUTOSAVE) != UndoPush::MINIMAL)
|
||||
projectFileIO.AutoSave();
|
||||
|
||||
TrackPanel::Get( project ).HandleCursorForPresentMouseState();
|
||||
}
|
||||
|
||||
void ProjectHistory::RollbackState()
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &undoManager = UndoManager::Get( project );
|
||||
SetStateTo( undoManager.GetCurrentState() );
|
||||
}
|
||||
|
||||
void ProjectHistory::ModifyState(bool bWantsAutoSave)
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &projectFileIO = ProjectFileIO::Get( project );
|
||||
auto &tracks = TrackList::Get( project );
|
||||
auto &viewInfo = ViewInfo::Get( project );
|
||||
auto &undoManager = UndoManager::Get( project );
|
||||
auto &tags = Tags::Get( project );
|
||||
undoManager.ModifyState(
|
||||
&tracks, viewInfo.selectedRegion, tags.shared_from_this());
|
||||
if (bWantsAutoSave)
|
||||
projectFileIO.AutoSave();
|
||||
TrackPanel::Get( project ).HandleCursorForPresentMouseState();
|
||||
}
|
||||
|
||||
// LL: Is there a memory leak here as "l" and "t" are not deleted???
|
||||
// Vaughan, 2010-08-29: No, as "l" is a TrackList* of an Undo stack state.
|
||||
// Need to keep it and its tracks "t" available for Undo/Redo/SetStateTo.
|
||||
void ProjectHistory::PopState(const UndoState &state)
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &projectFileIO = ProjectFileIO::Get( project );
|
||||
auto &dstTracks = TrackList::Get( project );
|
||||
auto &viewInfo = ViewInfo::Get( project );
|
||||
auto &window = ProjectWindow::Get( project );
|
||||
|
||||
viewInfo.selectedRegion = state.selectedRegion;
|
||||
|
||||
// Restore tags
|
||||
Tags::Set( project, state.tags );
|
||||
|
||||
TrackList *const tracks = state.tracks.get();
|
||||
|
||||
dstTracks.Clear();
|
||||
bool odUsed = false;
|
||||
std::unique_ptr<ODComputeSummaryTask> computeTask;
|
||||
|
||||
for (auto t : tracks->Any())
|
||||
{
|
||||
auto copyTrack = dstTracks.Add(t->Duplicate());
|
||||
|
||||
//add the track to OD if the manager exists. later we might do a more rigorous check...
|
||||
copyTrack->TypeSwitch( [&](WaveTrack *wt) {
|
||||
//if the ODManager hasn't been initialized, there's no chance this track has OD blocks since this
|
||||
//is a "Redo" operation.
|
||||
//TODO: update this to look like the update loop in OpenFile that handles general purpose ODTasks.
|
||||
//BUT, it is too slow to go thru every blockfile and check the odtype, so maybe put a flag in wavetrack
|
||||
//that gets unset on OD Completion, (and we could also update the drawing there too.) The hard part is that
|
||||
//we would need to watch every possible way a OD Blockfile could get inserted into a wavetrack and change the
|
||||
//flag there.
|
||||
if(ODManager::IsInstanceCreated())
|
||||
{
|
||||
if(!odUsed)
|
||||
{
|
||||
computeTask = std::make_unique<ODComputeSummaryTask>();
|
||||
odUsed=true;
|
||||
}
|
||||
// PRL: Is it correct to add all tracks to one task, even if they
|
||||
// are not partnered channels? Rather than
|
||||
// make one task for each?
|
||||
computeTask->AddWaveTrack(wt);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//add the task.
|
||||
if(odUsed)
|
||||
ODManager::Instance()->AddNewTask(std::move(computeTask));
|
||||
|
||||
window.HandleResize();
|
||||
|
||||
MenuManager::Get( project ).UpdateMenus( project );
|
||||
|
||||
projectFileIO.AutoSave();
|
||||
}
|
||||
|
||||
void ProjectHistory::SetStateTo(unsigned int n)
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &trackPanel = TrackPanel::Get( project );
|
||||
auto &undoManager = UndoManager::Get( project );
|
||||
auto &window = ProjectWindow::Get( project );
|
||||
|
||||
undoManager.SetStateTo(n,
|
||||
[this]( const UndoState &state ){ PopState(state); } );
|
||||
|
||||
window.HandleResize();
|
||||
trackPanel.SetFocusedTrack(NULL);
|
||||
trackPanel.Refresh(false);
|
||||
MenuManager::Get( project ).ModifyUndoMenuItems( project );
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ProjectHistory.h
|
||||
|
||||
Paul Licameli split from ProjectManager.h
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_PROJECT_HISTORY__
|
||||
#define __AUDACITY_PROJECT_HISTORY__
|
||||
|
||||
#include "ClientData.h"
|
||||
|
||||
class AudacityProject;
|
||||
class UndoState;
|
||||
enum class UndoPush : unsigned char;
|
||||
|
||||
class ProjectHistory final
|
||||
: public ClientData::Base
|
||||
{
|
||||
public:
|
||||
static ProjectHistory &Get( AudacityProject &project );
|
||||
static const ProjectHistory &Get( const AudacityProject &project );
|
||||
|
||||
explicit ProjectHistory( AudacityProject &project )
|
||||
: mProject{ project }
|
||||
{}
|
||||
~ProjectHistory() override;
|
||||
|
||||
void InitialState();
|
||||
void SetStateTo(unsigned int n);
|
||||
bool UndoAvailable();
|
||||
bool RedoAvailable();
|
||||
void PushState(const wxString &desc, const wxString &shortDesc); // use UndoPush::AUTOSAVE
|
||||
void PushState(const wxString &desc, const wxString &shortDesc, UndoPush flags);
|
||||
void RollbackState();
|
||||
void ModifyState(bool bWantsAutoSave); // if true, writes auto-save file.
|
||||
// Should set only if you really want the state change restored after
|
||||
// a crash, as it can take many seconds for large (eg. 10 track-hours)
|
||||
// projects
|
||||
void PopState(const UndoState &state);
|
||||
|
||||
bool GetDirty() const { return mDirty; }
|
||||
void SetDirty( bool value ) { mDirty = value; }
|
||||
|
||||
private:
|
||||
AudacityProject &mProject;
|
||||
|
||||
bool mDirty{ false };
|
||||
};
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
|
@ -12,30 +12,15 @@ Paul Licameli split from AudacityProject.h
|
|||
#define __AUDACITY_PROJECT_MANAGER__
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <wx/event.h> // to inherit
|
||||
#include "ClientData.h" // to inherit
|
||||
#include "AudioIOListener.h" // to inherit
|
||||
#include "toolbars/SelectionBarListener.h" // to inherit
|
||||
#include "toolbars/SpectralSelectionBarListener.h" // to inherit
|
||||
#include "import/ImportRaw.h" // defines TrackHolders
|
||||
|
||||
class wxTimer;
|
||||
class wxTimerEvent;
|
||||
|
||||
class AudacityProject;
|
||||
struct AudioIOStartStreamOptions;
|
||||
class ImportXMLTagHandler;
|
||||
class RecordingRecoveryHandler;
|
||||
class Track;
|
||||
class UndoState;
|
||||
enum class UndoPush : unsigned char;
|
||||
class WaveTrack;
|
||||
class XMLTagHandler;
|
||||
namespace ProjectFileIORegistry{ struct Entry; }
|
||||
|
||||
using WaveTrackArray = std::vector < std::shared_ptr < WaveTrack > >;
|
||||
|
||||
///\brief Object associated with a project for high-level management of the
|
||||
/// project's lifetime, including creation, destruction, opening from file,
|
||||
|
@ -43,9 +28,6 @@ using WaveTrackArray = std::vector < std::shared_ptr < WaveTrack > >;
|
|||
class ProjectManager final
|
||||
: public wxEvtHandler
|
||||
, public ClientData::Base
|
||||
, public AudioIOListener
|
||||
, private SelectionBarListener
|
||||
, private SpectralSelectionBarListener
|
||||
{
|
||||
public:
|
||||
static ProjectManager &Get( AudacityProject &project );
|
||||
|
@ -57,45 +39,9 @@ public:
|
|||
// This is the factory for projects:
|
||||
static AudacityProject *New();
|
||||
|
||||
// File I/O
|
||||
|
||||
/** @brief Show an open dialogue for opening audio files, and possibly other
|
||||
* sorts of files.
|
||||
*
|
||||
* The file type filter will automatically contain:
|
||||
* - "All files" with any extension or none,
|
||||
* - "All supported files" based on the file formats supported in this
|
||||
* build of Audacity,
|
||||
* - All of the individual formats specified by the importer plug-ins which
|
||||
* are built into this build of Audacity, each with the relevant file
|
||||
* extensions for that format.
|
||||
* The dialogue will start in the DefaultOpenPath directory read from the
|
||||
* preferences, failing that the working directory. The file format filter
|
||||
* will be set to the DefaultOpenType from the preferences, failing that
|
||||
* the first format specified in the dialogue. These two parameters will
|
||||
* be saved to the preferences once the user has chosen a file to open.
|
||||
* @param extraformat Specify the name of an additional format to allow
|
||||
* opening in this dialogue. This string is free-form, but should be short
|
||||
* enough to fit in the file dialogue filter drop-down. It should be
|
||||
* translated.
|
||||
* @param extrafilter Specify the file extension(s) for the additional format
|
||||
* specified by extraformat. The patterns must include the wildcard (e.g.
|
||||
* "*.aup" not "aup" or ".aup"), separate multiple patters with a semicolon,
|
||||
* e.g. "*.aup;*.AUP" because patterns are case-sensitive. Do not add a
|
||||
* trailing semicolon to the string. This string should not be translated
|
||||
* @return Array of file paths which the user selected to open (multiple
|
||||
* selections allowed).
|
||||
*/
|
||||
static wxArrayString ShowOpenDialog(const wxString &extraformat = {},
|
||||
const wxString &extrafilter = {});
|
||||
|
||||
static bool IsAlreadyOpen(const FilePath &projPathName);
|
||||
|
||||
// The functions that open and import files can act as factories too, and
|
||||
// they set projects to initial state.
|
||||
// The function that imports files can act as a factory too, and for that
|
||||
// reason remains in this class, not in ProjectFileManager
|
||||
static void OpenFiles(AudacityProject *proj);
|
||||
|
||||
void OpenFile(const FilePath &fileName, bool addtohistory = true);
|
||||
|
||||
// Return the given project if that is not NULL, else create a project.
|
||||
// Then open the given project path.
|
||||
|
@ -104,16 +50,6 @@ public:
|
|||
AudacityProject *pProject,
|
||||
const FilePath &fileNameArg, bool addtohistory = true);
|
||||
|
||||
// If pNewTrackList is passed in non-NULL, it gets filled with the pointers to NEW tracks.
|
||||
bool Import(const FilePath &fileName, WaveTrackArray *pTrackArray = NULL);
|
||||
|
||||
// Takes array of unique pointers; returns array of shared
|
||||
std::vector< std::shared_ptr<Track> >
|
||||
AddImportedTracks(const FilePath &fileName,
|
||||
TrackHolders &&newTracks);
|
||||
|
||||
bool GetDirty() { return mDirty; }
|
||||
|
||||
void ResetProjectToEmpty();
|
||||
|
||||
static void SaveWindowSize();
|
||||
|
@ -123,95 +59,25 @@ public:
|
|||
// Converts number of minutes to human readable format
|
||||
wxString GetHoursMinsString(int iMinutes);
|
||||
|
||||
void SetStateTo(unsigned int n);
|
||||
bool UndoAvailable();
|
||||
bool RedoAvailable();
|
||||
void PushState(const wxString &desc, const wxString &shortDesc); // use UndoPush::AUTOSAVE
|
||||
void PushState(const wxString &desc, const wxString &shortDesc, UndoPush flags);
|
||||
void RollbackState();
|
||||
void ModifyState(bool bWantsAutoSave); // if true, writes auto-save file.
|
||||
// Should set only if you really want the state change restored after
|
||||
// a crash, as it can take many seconds for large (eg. 10 track-hours)
|
||||
// projects
|
||||
void PopState(const UndoState &state);
|
||||
|
||||
bool IsTimerRecordCancelled() { return mTimerRecordCanceled; }
|
||||
void SetTimerRecordCancelled() { mTimerRecordCanceled = true; }
|
||||
void ResetTimerRecordCancelled() { mTimerRecordCanceled = false; }
|
||||
|
||||
void SetMenuClose(bool value) { mMenuClose = value; }
|
||||
|
||||
// SelectionBarListener callback methods
|
||||
double AS_GetRate() override;
|
||||
void AS_SetRate(double rate) override;
|
||||
int AS_GetSnapTo() override;
|
||||
void AS_SetSnapTo(int snap) override;
|
||||
const NumericFormatSymbol & AS_GetSelectionFormat() override;
|
||||
void AS_SetSelectionFormat(const NumericFormatSymbol & format) override;
|
||||
void AS_ModifySelection(double &start, double &end, bool done) override;
|
||||
|
||||
// SpectralSelectionBarListener callback methods
|
||||
double SSBL_GetRate() const override;
|
||||
const NumericFormatSymbol & SSBL_GetFrequencySelectionFormatName() override;
|
||||
void SSBL_SetFrequencySelectionFormatName(
|
||||
const NumericFormatSymbol & formatName) override;
|
||||
const NumericFormatSymbol & SSBL_GetBandwidthSelectionFormatName() override;
|
||||
void SSBL_SetBandwidthSelectionFormatName(
|
||||
const NumericFormatSymbol & formatName) override;
|
||||
void SSBL_ModifySpectralSelection(
|
||||
double &bottom, double &top, bool done) override;
|
||||
|
||||
private:
|
||||
void OnCloseWindow(wxCloseEvent & event);
|
||||
void OnTimer(wxTimerEvent & event);
|
||||
void OnOpenAudioFile(wxCommandEvent & event);
|
||||
void OnStatusChange( wxCommandEvent& );
|
||||
|
||||
bool SnapSelection();
|
||||
|
||||
// Audio IO callback methods
|
||||
void OnAudioIORate(int rate) override;
|
||||
void OnAudioIOStartRecording() override;
|
||||
void OnAudioIOStopRecording() override;
|
||||
void OnAudioIONewBlockFiles(const AutoSaveFile & blockFileLog) override;
|
||||
|
||||
void InitialState();
|
||||
|
||||
void RestartTimer();
|
||||
|
||||
// Declared in this class so that they can have access to private members
|
||||
static XMLTagHandler *RecordingRecoveryFactory( AudacityProject &project );
|
||||
static ProjectFileIORegistry::Entry sRecoveryFactory;
|
||||
static XMLTagHandler *ImportHandlerFactory( AudacityProject &project );
|
||||
static ProjectFileIORegistry::Entry sImportHandlerFactory;
|
||||
|
||||
// non-static data members
|
||||
AudacityProject &mProject;
|
||||
|
||||
// The handler that handles recovery of <recordingrecovery> tags
|
||||
std::unique_ptr<RecordingRecoveryHandler> mRecordingRecoveryHandler;
|
||||
|
||||
std::unique_ptr<ImportXMLTagHandler> mImportXMLTagHandler;
|
||||
|
||||
std::unique_ptr<wxTimer> mTimer;
|
||||
|
||||
bool mDirty{ false };
|
||||
|
||||
// See explanation in OnCloseWindow
|
||||
bool mIsBeingDeleted{ false };
|
||||
|
||||
// Are we currently closing as the result of a menu command?
|
||||
bool mMenuClose{ false };
|
||||
|
||||
//flag for cancellation of timer record.
|
||||
bool mTimerRecordCanceled{ false };
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
static bool sbWindowRectAlreadySaved;
|
||||
};
|
||||
|
||||
AudioIOStartStreamOptions DefaultPlayOptions( AudacityProject &project );
|
||||
AudioIOStartStreamOptions DefaultSpeedPlayOptions( AudacityProject &project );
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,249 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ProjectSelectionManager.cpp
|
||||
|
||||
Paul Licameli split from ProjectManager.cpp
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "ProjectSelectionManager.h"
|
||||
|
||||
#include "Experimental.h"
|
||||
|
||||
#include "Project.h"
|
||||
#include "ProjectHistory.h"
|
||||
#include "ProjectSettings.h"
|
||||
#include "ProjectWindow.h"
|
||||
#include "Snap.h"
|
||||
#include "TrackPanel.h"
|
||||
#include "ViewInfo.h"
|
||||
#include "WaveTrack.h"
|
||||
#include "toolbars/SelectionBar.h"
|
||||
#include "toolbars/SpectralSelectionBar.h"
|
||||
|
||||
static AudacityProject::AttachedObjects::RegisteredFactory
|
||||
sProjectSelectionManagerKey {
|
||||
[]( AudacityProject &project ) {
|
||||
return std::make_shared< ProjectSelectionManager >( project );
|
||||
}
|
||||
};
|
||||
|
||||
ProjectSelectionManager &ProjectSelectionManager::Get(
|
||||
AudacityProject &project )
|
||||
{
|
||||
return project.AttachedObjects::Get< ProjectSelectionManager >(
|
||||
sProjectSelectionManagerKey );
|
||||
}
|
||||
|
||||
const ProjectSelectionManager &ProjectSelectionManager::Get(
|
||||
const AudacityProject &project )
|
||||
{
|
||||
return Get( const_cast< AudacityProject & >( project ) );
|
||||
}
|
||||
|
||||
ProjectSelectionManager::ProjectSelectionManager( AudacityProject &project )
|
||||
: mProject{ project }
|
||||
{
|
||||
}
|
||||
|
||||
ProjectSelectionManager::~ProjectSelectionManager() = default;
|
||||
|
||||
bool ProjectSelectionManager::SnapSelection()
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &settings = ProjectSettings::Get( project );
|
||||
auto &window = ProjectWindow::Get( project );
|
||||
auto snapTo = settings.GetSnapTo();
|
||||
if (snapTo != SNAP_OFF) {
|
||||
auto &viewInfo = ViewInfo::Get( project );
|
||||
SelectedRegion &selectedRegion = viewInfo.selectedRegion;
|
||||
NumericConverter nc(NumericConverter::TIME,
|
||||
settings.GetSelectionFormat(), 0, settings.GetRate());
|
||||
const bool nearest = (snapTo == SNAP_NEAREST);
|
||||
|
||||
const double oldt0 = selectedRegion.t0();
|
||||
const double oldt1 = selectedRegion.t1();
|
||||
|
||||
nc.ValueToControls(oldt0, nearest);
|
||||
nc.ControlsToValue();
|
||||
const double t0 = nc.GetValue();
|
||||
|
||||
nc.ValueToControls(oldt1, nearest);
|
||||
nc.ControlsToValue();
|
||||
const double t1 = nc.GetValue();
|
||||
|
||||
if (t0 != oldt0 || t1 != oldt1) {
|
||||
selectedRegion.setTimes(t0, t1);
|
||||
window.TP_DisplaySelection();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
double ProjectSelectionManager::AS_GetRate()
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &settings = ProjectSettings::Get( project );
|
||||
return settings.GetRate();
|
||||
}
|
||||
|
||||
// Typically this came from the SelectionToolbar and does not need to
|
||||
// be communicated back to it.
|
||||
void ProjectSelectionManager::AS_SetRate(double rate)
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &settings = ProjectSettings::Get( project );
|
||||
settings.SetRate( rate );
|
||||
}
|
||||
|
||||
int ProjectSelectionManager::AS_GetSnapTo()
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &settings = ProjectSettings::Get( project );
|
||||
return settings.GetSnapTo();
|
||||
}
|
||||
|
||||
void ProjectSelectionManager::AS_SetSnapTo(int snap)
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &settings = ProjectSettings::Get( project );
|
||||
auto &window = ProjectWindow::Get( project );
|
||||
|
||||
settings.SetSnapTo( snap );
|
||||
|
||||
// LLL: TODO - what should this be changed to???
|
||||
// GetCommandManager()->Check(wxT("Snap"), mSnapTo);
|
||||
gPrefs->Write(wxT("/SnapTo"), snap);
|
||||
gPrefs->Flush();
|
||||
|
||||
SnapSelection();
|
||||
|
||||
window.RedrawProject();
|
||||
|
||||
SelectionBar::Get( project ).SetSnapTo(snap);
|
||||
}
|
||||
|
||||
const NumericFormatSymbol & ProjectSelectionManager::AS_GetSelectionFormat()
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &settings = ProjectSettings::Get( project );
|
||||
return settings.GetSelectionFormat();
|
||||
}
|
||||
|
||||
void ProjectSelectionManager::AS_SetSelectionFormat(
|
||||
const NumericFormatSymbol & format)
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &settings = ProjectSettings::Get( project );
|
||||
settings.SetSelectionFormat( format );
|
||||
|
||||
gPrefs->Write(wxT("/SelectionFormat"), format.Internal());
|
||||
gPrefs->Flush();
|
||||
|
||||
if (SnapSelection())
|
||||
TrackPanel::Get( project ).Refresh(false);
|
||||
|
||||
SelectionBar::Get( project ).SetSelectionFormat(format);
|
||||
}
|
||||
|
||||
void ProjectSelectionManager::AS_ModifySelection(
|
||||
double &start, double &end, bool done)
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &history = ProjectHistory::Get( project );
|
||||
auto &trackPanel = TrackPanel::Get( project );
|
||||
auto &viewInfo = ViewInfo::Get( project );
|
||||
viewInfo.selectedRegion.setTimes(start, end);
|
||||
trackPanel.Refresh(false);
|
||||
if (done) {
|
||||
history.ModifyState(false);
|
||||
}
|
||||
}
|
||||
|
||||
double ProjectSelectionManager::SSBL_GetRate() const
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &settings = ProjectSettings::Get( project );
|
||||
auto &tracks = TrackList::Get( project );
|
||||
// Return maximum of project rate and all track rates.
|
||||
return std::max( settings.GetRate(),
|
||||
tracks.Any<const WaveTrack>().max( &WaveTrack::GetRate ) );
|
||||
}
|
||||
|
||||
const NumericFormatSymbol &
|
||||
ProjectSelectionManager::SSBL_GetFrequencySelectionFormatName()
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &settings = ProjectSettings::Get( project );
|
||||
return settings.GetFrequencySelectionFormatName();
|
||||
}
|
||||
|
||||
void ProjectSelectionManager::SSBL_SetFrequencySelectionFormatName(
|
||||
const NumericFormatSymbol & formatName)
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &settings = ProjectSettings::Get( project );
|
||||
|
||||
settings.SetFrequencySelectionFormatName( formatName );
|
||||
|
||||
gPrefs->Write(wxT("/FrequencySelectionFormatName"),
|
||||
formatName.Internal());
|
||||
gPrefs->Flush();
|
||||
|
||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||
SpectralSelectionBar::Get( project ).SetFrequencySelectionFormatName(formatName);
|
||||
#endif
|
||||
}
|
||||
|
||||
const NumericFormatSymbol &
|
||||
ProjectSelectionManager::SSBL_GetBandwidthSelectionFormatName()
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &settings = ProjectSettings::Get( project );
|
||||
return settings.GetBandwidthSelectionFormatName();
|
||||
}
|
||||
|
||||
void ProjectSelectionManager::SSBL_SetBandwidthSelectionFormatName(
|
||||
const NumericFormatSymbol & formatName)
|
||||
{
|
||||
auto &project = mProject;
|
||||
auto &settings = ProjectSettings::Get( project );
|
||||
|
||||
settings.SetBandwidthSelectionFormatName( formatName );
|
||||
|
||||
gPrefs->Write(wxT("/BandwidthSelectionFormatName"),
|
||||
formatName.Internal());
|
||||
gPrefs->Flush();
|
||||
|
||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||
SpectralSelectionBar::Get( project ).SetBandwidthSelectionFormatName(formatName);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ProjectSelectionManager::SSBL_ModifySpectralSelection(
|
||||
double &bottom, double &top, bool done)
|
||||
{
|
||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||
auto &project = mProject;
|
||||
auto &history = ProjectHistory::Get( project );
|
||||
auto &trackPanel = TrackPanel::Get( project );
|
||||
auto &viewInfo = ViewInfo::Get( project );
|
||||
|
||||
double nyq = SSBL_GetRate() / 2.0;
|
||||
if (bottom >= 0.0)
|
||||
bottom = std::min(nyq, bottom);
|
||||
if (top >= 0.0)
|
||||
top = std::min(nyq, top);
|
||||
viewInfo.selectedRegion.setFrequencies(bottom, top);
|
||||
trackPanel.Refresh(false);
|
||||
if (done) {
|
||||
history.ModifyState(false);
|
||||
}
|
||||
#else
|
||||
bottom; top; done;
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ProjectSelectionManager.cpp
|
||||
|
||||
Paul Licameli split from ProjectManager.cpp
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_PROJECT_SELECTION_MANAGER__
|
||||
#define __AUDACITY_PROJECT_SELECTION_MANAGER__
|
||||
|
||||
#include "ClientData.h" // to inherit
|
||||
#include "toolbars/SelectionBarListener.h" // to inherit
|
||||
#include "toolbars/SpectralSelectionBarListener.h" // to inherit
|
||||
|
||||
class AudacityProject;
|
||||
|
||||
class ProjectSelectionManager final
|
||||
: public ClientData::Base
|
||||
, public SelectionBarListener
|
||||
, public SpectralSelectionBarListener
|
||||
{
|
||||
public:
|
||||
static ProjectSelectionManager &Get( AudacityProject &project );
|
||||
static const ProjectSelectionManager &Get( const AudacityProject &project );
|
||||
|
||||
explicit ProjectSelectionManager( AudacityProject &project );
|
||||
~ProjectSelectionManager() override;
|
||||
|
||||
// SelectionBarListener callback methods
|
||||
double AS_GetRate() override;
|
||||
void AS_SetRate(double rate) override;
|
||||
int AS_GetSnapTo() override;
|
||||
void AS_SetSnapTo(int snap) override;
|
||||
const NumericFormatSymbol & AS_GetSelectionFormat() override;
|
||||
void AS_SetSelectionFormat(const NumericFormatSymbol & format) override;
|
||||
void AS_ModifySelection(double &start, double &end, bool done) override;
|
||||
|
||||
// SpectralSelectionBarListener callback methods
|
||||
double SSBL_GetRate() const override;
|
||||
const NumericFormatSymbol & SSBL_GetFrequencySelectionFormatName() override;
|
||||
void SSBL_SetFrequencySelectionFormatName(
|
||||
const NumericFormatSymbol & formatName) override;
|
||||
const NumericFormatSymbol & SSBL_GetBandwidthSelectionFormatName() override;
|
||||
void SSBL_SetBandwidthSelectionFormatName(
|
||||
const NumericFormatSymbol & formatName) override;
|
||||
void SSBL_ModifySpectralSelection(
|
||||
double &bottom, double &top, bool done) override;
|
||||
|
||||
private:
|
||||
bool SnapSelection();
|
||||
|
||||
AudacityProject &mProject;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -47,7 +47,7 @@
|
|||
#include "Menus.h"
|
||||
#include "MissingAliasFileDialog.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectFileIO.h"
|
||||
#include "ProjectFileManager.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "Prefs.h"
|
||||
#include "Track.h"
|
||||
|
@ -622,12 +622,12 @@ int TimerRecordDialog::ExecutePostRecordActions(bool bWasStopped) {
|
|||
// Do Automatic Save?
|
||||
if (m_bAutoSaveEnabled) {
|
||||
|
||||
auto &projectFileIO = ProjectFileIO::Get( *pProject );
|
||||
auto &projectFileManager = ProjectFileManager::Get( *pProject );
|
||||
// MY: If this project has already been saved then simply execute a Save here
|
||||
if (m_bProjectAlreadySaved) {
|
||||
bSaveOK = projectFileIO.Save();
|
||||
bSaveOK = projectFileManager.Save();
|
||||
} else {
|
||||
bSaveOK = projectFileIO.SaveFromTimerRecording(m_fnAutoSaveFile);
|
||||
bSaveOK = projectFileManager.SaveFromTimerRecording(m_fnAutoSaveFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ is time to refresh some aspect of the screen.
|
|||
#include "KeyboardCapture.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectAudioIO.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "ProjectHistory.h"
|
||||
#include "ProjectSettings.h"
|
||||
#include "ProjectWindow.h"
|
||||
#include "TrackPanelMouseEvent.h"
|
||||
|
@ -612,7 +612,7 @@ void TrackPanel::OnPaint(wxPaintEvent & /* event */)
|
|||
|
||||
void TrackPanel::MakeParentModifyState(bool bWantsAutoSave)
|
||||
{
|
||||
ProjectManager::Get( *GetProject() ).ModifyState(bWantsAutoSave);
|
||||
ProjectHistory::Get( *GetProject() ).ModifyState(bWantsAutoSave);
|
||||
}
|
||||
|
||||
void TrackPanel::MakeParentRedrawScrollbars()
|
||||
|
|
|
@ -15,7 +15,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include <wx/translation.h>
|
||||
|
||||
#include "HitTestResult.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "ProjectHistory.h"
|
||||
#include "RefreshCode.h"
|
||||
#include "Track.h"
|
||||
#include "TrackPanelMouseEvent.h"
|
||||
|
@ -219,7 +219,7 @@ UIHandle::Result TrackPanelResizeHandle::Release
|
|||
/// We also modify the undo state (the action doesn't become
|
||||
/// undo-able, but it gets merged with the previous undo-able
|
||||
/// event).
|
||||
ProjectManager::Get( *pProject ).ModifyState(false);
|
||||
ProjectHistory::Get( *pProject ).ModifyState(false);
|
||||
return RefreshCode::FixScrollbars;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "../Audacity.h"
|
||||
#include "ImportExportCommands.h"
|
||||
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectFileManager.h"
|
||||
#include "../ViewInfo.h"
|
||||
#include "../export/Export.h"
|
||||
#include "../Shuttle.h"
|
||||
|
@ -41,7 +41,7 @@ void ImportCommand::PopulateOrExchange(ShuttleGui & S)
|
|||
}
|
||||
|
||||
bool ImportCommand::Apply(const CommandContext & context){
|
||||
return ProjectManager::Get( context.project ).Import(mFileName);
|
||||
return ProjectFileManager::Get( context.project ).Import(mFileName);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "OpenSaveCommands.h"
|
||||
|
||||
#include "../Project.h"
|
||||
#include "../ProjectFileIO.h"
|
||||
#include "../ProjectFileManager.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../export/Export.h"
|
||||
#include "../Shuttle.h"
|
||||
|
@ -54,7 +54,7 @@ bool OpenProjectCommand::Apply(const CommandContext & context){
|
|||
}
|
||||
else
|
||||
{
|
||||
ProjectManager::Get( context.project )
|
||||
ProjectFileManager::Get( context.project )
|
||||
.OpenFile(mFileName, mbAddToHistory);
|
||||
}
|
||||
const auto &newFileName = context.project.GetFileName();
|
||||
|
@ -87,10 +87,10 @@ void SaveProjectCommand::PopulateOrExchange(ShuttleGui & S)
|
|||
|
||||
bool SaveProjectCommand::Apply(const CommandContext &context)
|
||||
{
|
||||
auto &projectFileIO = ProjectFileIO::Get( context.project );
|
||||
auto &projectFileManager = ProjectFileManager::Get( context.project );
|
||||
if ( mFileName.empty() )
|
||||
return projectFileIO.SaveAs(mbCompress);
|
||||
return projectFileManager.SaveAs(mbCompress);
|
||||
else
|
||||
return projectFileIO.SaveAs(
|
||||
return projectFileManager.SaveAs(
|
||||
mFileName, mbCompress, mbAddToHistory);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ explicitly code all three.
|
|||
#include <wx/string.h>
|
||||
#include <float.h>
|
||||
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectSelectionManager.h"
|
||||
#include "../TrackPanel.h"
|
||||
#include "../Shuttle.h"
|
||||
#include "../ShuttleGui.h"
|
||||
|
@ -165,7 +165,7 @@ bool SelectFrequenciesCommand::Apply(const CommandContext & context){
|
|||
if( !bHasBottom )
|
||||
mBottom = 0.0;
|
||||
|
||||
ProjectManager::Get( context.project ).SSBL_ModifySpectralSelection(
|
||||
ProjectSelectionManager::Get( context.project ).SSBL_ModifySpectralSelection(
|
||||
mBottom, mTop, false);// false for not done.
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ greater use in future.
|
|||
#include "../PluginManager.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectAudioManager.h"
|
||||
#include "../ProjectSettings.h"
|
||||
#include "../PluginManager.h"
|
||||
#include "../ShuttleGui.h"
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "../Menus.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectHistory.h"
|
||||
|
||||
#include "../../images/EffectRack/EffectRack.h"
|
||||
|
||||
|
@ -298,7 +298,7 @@ void EffectRack::OnApply(wxCommandEvent & WXUNUSED(evt))
|
|||
auto state = UndoManager::Get( *project ).GetCurrentState();
|
||||
auto cleanup = finally( [&] {
|
||||
if(!success)
|
||||
ProjectManager::Get( *project ).SetStateTo( state );
|
||||
ProjectHistory::Get( *project ).SetStateTo( state );
|
||||
} );
|
||||
|
||||
for (size_t i = 0, cnt = mEffects.size(); i < cnt; i++)
|
||||
|
|
|
@ -38,6 +38,8 @@ and ImportLOF.cpp.
|
|||
#include "../Audacity.h" // for USE_* macros
|
||||
#include "Import.h"
|
||||
|
||||
#include "ImportPlugin.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <wx/textctrl.h>
|
||||
|
@ -51,14 +53,6 @@ and ImportLOF.cpp.
|
|||
#include "../Project.h"
|
||||
#include "../WaveTrack.h"
|
||||
|
||||
#include "ImportPCM.h"
|
||||
#include "ImportMP3.h"
|
||||
#include "ImportOGG.h"
|
||||
#include "ImportQT.h"
|
||||
#include "ImportLOF.h"
|
||||
#include "ImportFLAC.h"
|
||||
#include "ImportFFmpeg.h"
|
||||
#include "ImportGStreamer.h"
|
||||
#include "../Prefs.h"
|
||||
|
||||
#include "../widgets/ProgressDialog.h"
|
||||
|
@ -83,30 +77,52 @@ Importer::~Importer()
|
|||
{
|
||||
}
|
||||
|
||||
ImportPluginList &Importer::sImportPluginList()
|
||||
{
|
||||
static ImportPluginList theList;
|
||||
return theList;
|
||||
}
|
||||
|
||||
Importer::RegisteredImportPlugin::RegisteredImportPlugin(
|
||||
std::unique_ptr<ImportPlugin> pPlugin )
|
||||
{
|
||||
if ( pPlugin )
|
||||
sImportPluginList().emplace_back( std::move( pPlugin ) );
|
||||
}
|
||||
|
||||
UnusableImportPluginList &Importer::sUnusableImportPluginList()
|
||||
{
|
||||
static UnusableImportPluginList theList;
|
||||
return theList;
|
||||
}
|
||||
|
||||
Importer::RegisteredUnusableImportPlugin::RegisteredUnusableImportPlugin(
|
||||
std::unique_ptr<UnusableImportPlugin> pPlugin )
|
||||
{
|
||||
if ( pPlugin )
|
||||
sUnusableImportPluginList().emplace_back( std::move( pPlugin ) );
|
||||
}
|
||||
|
||||
bool Importer::Initialize()
|
||||
{
|
||||
ImportPluginList{}.swap(mImportPluginList);
|
||||
UnusableImportPluginList{}.swap(mUnusableImportPluginList);
|
||||
ExtImportItems{}.swap(mExtImportItems);
|
||||
|
||||
// build the list of import plugin and/or unusableImporters.
|
||||
// order is significant. If none match, they will all be tried
|
||||
// in the order defined here.
|
||||
GetPCMImportPlugin(mImportPluginList, mUnusableImportPluginList);
|
||||
GetOGGImportPlugin(mImportPluginList, mUnusableImportPluginList);
|
||||
GetFLACImportPlugin(mImportPluginList, mUnusableImportPluginList);
|
||||
GetMP3ImportPlugin(mImportPluginList, mUnusableImportPluginList);
|
||||
GetLOFImportPlugin(mImportPluginList, mUnusableImportPluginList);
|
||||
|
||||
#if defined(USE_FFMPEG)
|
||||
GetFFmpegImportPlugin(mImportPluginList, mUnusableImportPluginList);
|
||||
#endif
|
||||
#ifdef USE_QUICKTIME
|
||||
GetQTImportPlugin(mImportPluginList, mUnusableImportPluginList);
|
||||
#endif
|
||||
#if defined(USE_GSTREAMER)
|
||||
GetGStreamerImportPlugin(mImportPluginList, mUnusableImportPluginList);
|
||||
#endif
|
||||
// They were pushed on the array at static initialization time in an
|
||||
// unspecified sequence. Sort according to the sequence numbers they
|
||||
// report to make the order determinate.
|
||||
auto &list = sImportPluginList();
|
||||
std::sort( list.begin(), list.end(),
|
||||
[]( const ImportPluginList::value_type &a,
|
||||
const ImportPluginList::value_type &b ){
|
||||
return a->SequenceNumber() < b->SequenceNumber();
|
||||
}
|
||||
);
|
||||
|
||||
// Ordering of the unusable plugin list is not important.
|
||||
|
||||
ExtImportItems{}.swap(mExtImportItems);
|
||||
|
||||
ReadImportItems();
|
||||
|
||||
|
@ -116,15 +132,13 @@ bool Importer::Initialize()
|
|||
bool Importer::Terminate()
|
||||
{
|
||||
WriteImportItems();
|
||||
ImportPluginList{}.swap( mImportPluginList );
|
||||
UnusableImportPluginList{}.swap( mUnusableImportPluginList );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Importer::GetSupportedImportFormats(FormatList *formatList)
|
||||
{
|
||||
for(const auto &importPlugin : mImportPluginList)
|
||||
for(const auto &importPlugin : sImportPluginList())
|
||||
{
|
||||
formatList->emplace_back(importPlugin->GetPluginFormatDescription(),
|
||||
importPlugin->GetSupportedExtensions());
|
||||
|
@ -206,7 +220,7 @@ void Importer::ReadImportItems()
|
|||
for (size_t i = 0; i < new_item->filters.size(); i++)
|
||||
{
|
||||
bool found = false;
|
||||
for (const auto &importPlugin : mImportPluginList)
|
||||
for (const auto &importPlugin : sImportPluginList())
|
||||
{
|
||||
if (importPlugin->GetPluginStringID() == new_item->filters[i])
|
||||
{
|
||||
|
@ -220,7 +234,7 @@ void Importer::ReadImportItems()
|
|||
new_item->filter_objects.push_back(nullptr);
|
||||
}
|
||||
/* Find all filter objects that are not present in the filter list */
|
||||
for (const auto &importPlugin : mImportPluginList)
|
||||
for (const auto &importPlugin : sImportPluginList())
|
||||
{
|
||||
bool found = false;
|
||||
for (size_t i = 0; i < new_item->filter_objects.size(); i++)
|
||||
|
@ -317,7 +331,7 @@ std::unique_ptr<ExtImportItem> Importer::CreateDefaultImportItem()
|
|||
new_item->extensions.push_back(wxT("*"));
|
||||
new_item->mime_types.push_back(wxT("*"));
|
||||
|
||||
for (const auto &importPlugin : mImportPluginList)
|
||||
for (const auto &importPlugin : sImportPluginList())
|
||||
{
|
||||
new_item->filters.push_back(importPlugin->GetPluginStringID());
|
||||
new_item->filter_objects.push_back(importPlugin.get());
|
||||
|
@ -371,7 +385,7 @@ bool Importer::Import(const FilePath &fName,
|
|||
|
||||
if (usersSelectionOverrides)
|
||||
{
|
||||
for (const auto &plugin : mImportPluginList)
|
||||
for (const auto &plugin : sImportPluginList())
|
||||
{
|
||||
if (plugin->GetPluginFormatDescription().CompareTo(type) == 0)
|
||||
{
|
||||
|
@ -441,16 +455,16 @@ bool Importer::Import(const FilePath &fName,
|
|||
|
||||
// Add all plugins that support the extension
|
||||
|
||||
// Here we rely on the fact that the first plugin in mImportPluginList is libsndfile.
|
||||
// Here we rely on the fact that the first plugin in sImportPluginList() is libsndfile.
|
||||
// We want to save this for later insertion ahead of libmad, if libmad supports the extension.
|
||||
// The order of plugins in mImportPluginList is determined by the Importer constructor alone and
|
||||
// The order of plugins in sImportPluginList() is determined by the Importer constructor alone and
|
||||
// is not changed by user selection overrides or any other mechanism, but we include an assert
|
||||
// in case subsequent code revisions to the constructor should break this assumption that
|
||||
// libsndfile is first.
|
||||
ImportPlugin *libsndfilePlugin = mImportPluginList.begin()->get();
|
||||
ImportPlugin *libsndfilePlugin = sImportPluginList().begin()->get();
|
||||
wxASSERT(libsndfilePlugin->GetPluginStringID() == wxT("libsndfile"));
|
||||
|
||||
for (const auto &plugin : mImportPluginList)
|
||||
for (const auto &plugin : sImportPluginList())
|
||||
{
|
||||
// Make sure its not already in the list
|
||||
if (importPlugins.end() ==
|
||||
|
@ -486,7 +500,7 @@ bool Importer::Import(const FilePath &fName,
|
|||
// Otherwise, if FFmpeg (libav) has not been installed, libmad will still be there near the
|
||||
// end of the preference list importPlugins, where it will claim success importing FFmpeg file
|
||||
// formats unsuitable for it, and produce distorted results.
|
||||
for (const auto &plugin : mImportPluginList)
|
||||
for (const auto &plugin : sImportPluginList())
|
||||
{
|
||||
if (!(plugin->GetPluginStringID() == wxT("libmad")))
|
||||
{
|
||||
|
@ -565,7 +579,7 @@ bool Importer::Import(const FilePath &fName,
|
|||
// None of our plugins can handle this file. It might be that
|
||||
// Audacity supports this format, but support was not compiled in.
|
||||
// If so, notify the user of this fact
|
||||
for (const auto &unusableImportPlugin : mUnusableImportPluginList)
|
||||
for (const auto &unusableImportPlugin : sUnusableImportPluginList())
|
||||
{
|
||||
if( unusableImportPlugin->SupportsExtension(extension) )
|
||||
{
|
||||
|
|
|
@ -88,6 +88,19 @@ class ExtImportItem
|
|||
|
||||
class Importer {
|
||||
public:
|
||||
|
||||
// Objects of this type are statically constructed in files implementing
|
||||
// subclasses of ImportPlugin
|
||||
struct RegisteredImportPlugin{
|
||||
RegisteredImportPlugin( std::unique_ptr<ImportPlugin> );
|
||||
};
|
||||
|
||||
// Objects of this type are statically constructed in files, to identify
|
||||
// unsupported import formats; typically in a conditional compilation
|
||||
struct RegisteredUnusableImportPlugin{
|
||||
RegisteredUnusableImportPlugin( std::unique_ptr<UnusableImportPlugin> );
|
||||
};
|
||||
|
||||
Importer();
|
||||
~Importer();
|
||||
|
||||
|
@ -148,8 +161,8 @@ private:
|
|||
static Importer mInstance;
|
||||
|
||||
ExtImportItems mExtImportItems;
|
||||
ImportPluginList mImportPluginList;
|
||||
UnusableImportPluginList mUnusableImportPluginList;
|
||||
static ImportPluginList &sImportPluginList();
|
||||
static UnusableImportPluginList &sUnusableImportPluginList();
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
|
@ -21,7 +21,6 @@ Licensed under the GNU General Public License v2 or later
|
|||
*//*******************************************************************/
|
||||
|
||||
#include "../Audacity.h" // needed before FFmpeg.h // for USE_* macros
|
||||
#include "ImportFFmpeg.h"
|
||||
|
||||
#include "../Experimental.h"
|
||||
|
||||
|
@ -152,6 +151,7 @@ static const auto exts = {
|
|||
};
|
||||
|
||||
// all the includes live here by default
|
||||
#include "Import.h"
|
||||
#include "../Tags.h"
|
||||
#include "../WaveTrack.h"
|
||||
#include "ImportPlugin.h"
|
||||
|
@ -182,6 +182,8 @@ public:
|
|||
|
||||
///! Probes the file and opens it if appropriate
|
||||
std::unique_ptr<ImportFileHandle> Open(const FilePath &Filename) override;
|
||||
|
||||
unsigned SequenceNumber() const override;
|
||||
};
|
||||
|
||||
///! Does acual import, returned by FFmpegImportPlugin::Open
|
||||
|
@ -282,13 +284,6 @@ private:
|
|||
};
|
||||
|
||||
|
||||
void GetFFmpegImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &WXUNUSED(unusableImportPluginList))
|
||||
{
|
||||
importPluginList.push_back( std::make_unique<FFmpegImportPlugin>() );
|
||||
}
|
||||
|
||||
|
||||
wxString FFmpegImportPlugin::GetPluginFormatDescription()
|
||||
{
|
||||
return DESC;
|
||||
|
@ -336,6 +331,15 @@ std::unique_ptr<ImportFileHandle> FFmpegImportPlugin::Open(const FilePath &filen
|
|||
return std::move(handle);
|
||||
}
|
||||
|
||||
unsigned FFmpegImportPlugin::SequenceNumber() const
|
||||
{
|
||||
return 60;
|
||||
}
|
||||
|
||||
static Importer::RegisteredImportPlugin registered{
|
||||
std::make_unique< FFmpegImportPlugin >()
|
||||
};
|
||||
|
||||
|
||||
FFmpegImportFileHandle::FFmpegImportFileHandle(const FilePath & name)
|
||||
: ImportFileHandle(name)
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ImportFFmpeg.h
|
||||
|
||||
LRN
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_IMPORT_FFMPEG__
|
||||
#define __AUDACITY_IMPORT_FFMPEG__
|
||||
|
||||
#include "ImportForwards.h"
|
||||
|
||||
void GetFFmpegImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList);
|
||||
|
||||
#endif
|
|
@ -23,7 +23,6 @@
|
|||
*//*******************************************************************/
|
||||
|
||||
#include "../Audacity.h" // for USE_* macros
|
||||
#include "ImportFLAC.h"
|
||||
|
||||
#include "../Experimental.h"
|
||||
|
||||
|
@ -39,6 +38,7 @@
|
|||
#include <wx/intl.h> // needed for _("translated stings") even if we
|
||||
// don't have libflac available
|
||||
|
||||
#include "Import.h"
|
||||
#include "ImportPlugin.h"
|
||||
|
||||
#include "../Tags.h"
|
||||
|
@ -56,14 +56,10 @@ static const auto exts = {
|
|||
|
||||
#ifndef USE_LIBFLAC
|
||||
|
||||
void GetFLACImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList)
|
||||
{
|
||||
unusableImportPluginList.push_back(
|
||||
static Importer::RegisteredUnusableImportPlugin registered{
|
||||
std::make_unique<UnusableImportPlugin>
|
||||
(DESC, FileExtensions( exts.begin(), exts.end() ) )
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
#else /* USE_LIBFLAC */
|
||||
|
||||
|
@ -138,6 +134,8 @@ class FLACImportPlugin final : public ImportPlugin
|
|||
wxString GetPluginStringID() override { return wxT("libflac"); }
|
||||
wxString GetPluginFormatDescription() override;
|
||||
std::unique_ptr<ImportFileHandle> Open(const FilePath &Filename) override;
|
||||
|
||||
unsigned SequenceNumber() const override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -285,14 +283,6 @@ FLAC__StreamDecoderWriteStatus MyFLACFile::write_callback(const FLAC__Frame *fra
|
|||
}, MakeSimpleGuard(FLAC__STREAM_DECODER_WRITE_STATUS_ABORT) );
|
||||
}
|
||||
|
||||
|
||||
void GetFLACImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &WXUNUSED(unusableImportPluginList))
|
||||
{
|
||||
importPluginList.push_back( std::make_unique<FLACImportPlugin>() );
|
||||
}
|
||||
|
||||
|
||||
wxString FLACImportPlugin::GetPluginFormatDescription()
|
||||
{
|
||||
return DESC;
|
||||
|
@ -340,6 +330,14 @@ std::unique_ptr<ImportFileHandle> FLACImportPlugin::Open(const FilePath &filenam
|
|||
return std::move(handle);
|
||||
}
|
||||
|
||||
unsigned FLACImportPlugin::SequenceNumber() const
|
||||
{
|
||||
return 30;
|
||||
}
|
||||
|
||||
static Importer::RegisteredImportPlugin registered{
|
||||
std::make_unique< FLACImportPlugin >()
|
||||
};
|
||||
|
||||
FLACImportFileHandle::FLACImportFileHandle(const FilePath & name)
|
||||
: ImportFileHandle(name),
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ImportFLAC.h
|
||||
|
||||
Sami Liedes
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_IMPORT_FLAC__
|
||||
#define __AUDACITY_IMPORT_FLAC__
|
||||
|
||||
#include "ImportForwards.h"
|
||||
|
||||
void GetFLACImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList);
|
||||
|
||||
|
||||
#endif
|
|
@ -248,6 +248,8 @@ public:
|
|||
|
||||
///! Probes the file and opens it if appropriate
|
||||
std::unique_ptr<ImportFileHandle> Open(const wxString &Filename) override;
|
||||
|
||||
unsigned SequenceNumber() const override;
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
|
@ -256,10 +258,9 @@ public:
|
|||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Instantiate GStreamerImportPlugin and add to the list of known importers
|
||||
void
|
||||
GetGStreamerImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList & WXUNUSED(unusableImportPluginList))
|
||||
{
|
||||
|
||||
static
|
||||
Importer::RegisteredImportPlugin{ []() -> std::unique_ptr< ImportPlugin > {
|
||||
wxLogMessage(_TS("Audacity is built against GStreamer version %d.%d.%d-%d"),
|
||||
GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
|
@ -281,7 +282,7 @@ GetGStreamerImportPlugin(ImportPluginList &importPluginList,
|
|||
wxLogMessage(wxT("Failed to initialize GStreamer. Error %d: %s"),
|
||||
error.get()->code,
|
||||
wxString::FromUTF8(error.get()->message));
|
||||
return;
|
||||
return {};
|
||||
}
|
||||
|
||||
guint major, minor, micro, nano;
|
||||
|
@ -297,11 +298,11 @@ GetGStreamerImportPlugin(ImportPluginList &importPluginList,
|
|||
|
||||
// No supported extensions...no gstreamer plugins installed
|
||||
if (plug->GetSupportedExtensions().size() == 0)
|
||||
return;
|
||||
return {};
|
||||
|
||||
// Add to list of importers
|
||||
importPluginList.push_back( std::move(plug) );
|
||||
}
|
||||
return std::move(plug);
|
||||
}() } registered;
|
||||
|
||||
// ============================================================================
|
||||
// GStreamerImportPlugin Class
|
||||
|
@ -1145,6 +1146,11 @@ GStreamerImportFileHandle::Import(TrackFactory *trackFactory,
|
|||
return updateResult;
|
||||
}
|
||||
|
||||
unsigned GStreamerImportPlugin::SequenceNumber() const
|
||||
{
|
||||
return 80;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Message handlers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ImportGStreamer.h
|
||||
|
||||
LRN
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_IMPORT_GSTREAMER__
|
||||
#define __AUDACITY_IMPORT_GSTREAMER__
|
||||
|
||||
#include "ImportPlugin.h"
|
||||
|
||||
void GetGStreamerImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList);
|
||||
|
||||
#endif
|
|
@ -70,7 +70,6 @@
|
|||
*//*******************************************************************/
|
||||
|
||||
#include "../Audacity.h" // for USE_* macros
|
||||
#include "ImportLOF.h"
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/utils.h>
|
||||
|
@ -84,9 +83,11 @@
|
|||
#include "../FileNames.h"
|
||||
#include "../WaveTrack.h"
|
||||
#include "ImportPlugin.h"
|
||||
#include "Import.h"
|
||||
#include "../Menus.h"
|
||||
#include "../NoteTrack.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectHistory.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectWindow.h"
|
||||
#include "../FileFormats.h"
|
||||
|
@ -115,6 +116,8 @@ public:
|
|||
wxString GetPluginStringID() override { return wxT("lof"); }
|
||||
wxString GetPluginFormatDescription() override;
|
||||
std::unique_ptr<ImportFileHandle> Open(const FilePath &Filename) override;
|
||||
|
||||
unsigned SequenceNumber() const override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -170,12 +173,6 @@ LOFImportFileHandle::LOFImportFileHandle
|
|||
{
|
||||
}
|
||||
|
||||
void GetLOFImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList & WXUNUSED(unusableImportPluginList))
|
||||
{
|
||||
importPluginList.push_back( std::make_unique<LOFImportPlugin>() );
|
||||
}
|
||||
|
||||
wxString LOFImportPlugin::GetPluginFormatDescription()
|
||||
{
|
||||
return DESC;
|
||||
|
@ -271,6 +268,15 @@ ProgressResult LOFImportFileHandle::Import(
|
|||
return ProgressResult::Success;
|
||||
}
|
||||
|
||||
unsigned LOFImportPlugin::SequenceNumber() const
|
||||
{
|
||||
return 50;
|
||||
}
|
||||
|
||||
static Importer::RegisteredImportPlugin registered{
|
||||
std::make_unique< LOFImportPlugin >()
|
||||
};
|
||||
|
||||
/** @brief Processes a single line from a LOF text file, doing whatever is
|
||||
* indicated on the line.
|
||||
*
|
||||
|
@ -442,7 +448,7 @@ void LOFImportFileHandle::lofOpenFiles(wxString* ln)
|
|||
}
|
||||
|
||||
// Amend the undo transaction made by import
|
||||
ProjectManager::Get( *mProject ).ModifyState(false);
|
||||
ProjectHistory::Get( *mProject ).ModifyState(false);
|
||||
} // end of converting "offset" argument
|
||||
else
|
||||
{
|
||||
|
@ -486,7 +492,7 @@ void LOFImportFileHandle::doDurationAndScrollOffset()
|
|||
|
||||
if (doSomething)
|
||||
// Amend last undo state
|
||||
ProjectManager::Get( *mProject ).ModifyState(false);
|
||||
ProjectHistory::Get( *mProject ).ModifyState(false);
|
||||
}
|
||||
|
||||
LOFImportFileHandle::~LOFImportFileHandle()
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ImportLOF.h
|
||||
|
||||
David I. Murray
|
||||
|
||||
Supports the opening of ".lof" files which are text files that contain
|
||||
a list of individual files to open in audacity in specific formats.
|
||||
|
||||
(In BNF) The syntax for an LOF file, denoted by <lof>:
|
||||
|
||||
<lof> ::= [<window> | <file> | <#>]*
|
||||
<window> ::= window [<window-parameter>]* <newline>
|
||||
<window-parameter> ::= offset <time> | duration <time>
|
||||
<time> ::= [<digit>]+ [ . [<digit>]* ]
|
||||
<file> ::= file [<file-parameter>]* <newline>
|
||||
<file-parameter> ::= offset <time>
|
||||
<#> ::= <comment> <newline>
|
||||
|
||||
EXAMPLE LOF file:
|
||||
|
||||
# everything following the hash character is ignored
|
||||
window # an initial window command is implicit and optional
|
||||
file "C:\folder1\sample1.wav" # sample1.wav is displayed
|
||||
file "C:\sample2.wav" offset 5 # sample2 is displayed with a 5s offset
|
||||
File "C:\sample3.wav" # sample3 is displayed with no offset
|
||||
window offset 5 duration 10 # open a NEW window, zoom to display
|
||||
# 10 seconds total starting at 5 (ending at 15) seconds
|
||||
file "C:\sample3.wav" offset 2.5
|
||||
|
||||
SEMANTICS:
|
||||
|
||||
There are two commands: "window" creates a NEW window, and "file"
|
||||
appends a track to the current window and displays the file there. The
|
||||
first file is always placed in a NEW window, whether or not an initial
|
||||
"window" command is given.
|
||||
|
||||
Commands have optional keyword parameters that may be listed in any
|
||||
order. A parameter should only occur once per command. The "offset"
|
||||
parameter specifies a time offset. For windows, this is the leftmost
|
||||
time displayed in the window. For files, the offset is an amount by
|
||||
which the file is shifted in time before display (only enabled for audio;
|
||||
not midi). The offset is specified as an integer or decimal number of
|
||||
seconds, and the default value is zero.
|
||||
|
||||
Windows may also have a "duration" parameter, which specifies how much
|
||||
time should be displayed in the window. The default duration is equal
|
||||
to the duration of the longest track currently displayed.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_IMPORT_LOF__
|
||||
#define __AUDACITY_IMPORT_LOF__
|
||||
|
||||
#include "ImportForwards.h"
|
||||
|
||||
void GetLOFImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList);
|
||||
|
||||
#endif
|
|
@ -27,7 +27,6 @@
|
|||
*//*******************************************************************/
|
||||
|
||||
#include "../Audacity.h" // for USE_* macros
|
||||
#include "ImportMP3.h"
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include <wx/wxprec.h>
|
||||
|
@ -40,6 +39,7 @@
|
|||
#include <wx/intl.h>
|
||||
|
||||
#include "../Prefs.h"
|
||||
#include "Import.h"
|
||||
#include "ImportPlugin.h"
|
||||
#include "../Tags.h"
|
||||
#include "../prefs/QualityPrefs.h"
|
||||
|
@ -55,14 +55,10 @@ static const auto exts = {
|
|||
|
||||
#ifndef USE_LIBMAD
|
||||
|
||||
void GetMP3ImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList)
|
||||
{
|
||||
unusableImportPluginList.push_back(
|
||||
static Importer::RegisteredUnusableImportPlugin registered{
|
||||
std::make_unique<UnusableImportPlugin>
|
||||
(DESC, FileExtensions( exts.begin(), exts.end() ) )
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
#else /* USE_LIBMAD */
|
||||
|
||||
|
@ -120,6 +116,8 @@ public:
|
|||
wxString GetPluginStringID() override { return wxT("libmad"); }
|
||||
wxString GetPluginFormatDescription() override;
|
||||
std::unique_ptr<ImportFileHandle> Open(const FilePath &Filename) override;
|
||||
|
||||
unsigned SequenceNumber() const override;
|
||||
};
|
||||
|
||||
class MP3ImportFileHandle final : public ImportFileHandle
|
||||
|
@ -157,12 +155,6 @@ private:
|
|||
mad_decoder mDecoder;
|
||||
};
|
||||
|
||||
void GetMP3ImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList & WXUNUSED(unusableImportPluginList))
|
||||
{
|
||||
importPluginList.push_back( std::make_unique<MP3ImportPlugin>() );
|
||||
}
|
||||
|
||||
/* The MAD callbacks */
|
||||
enum mad_flow input_cb(void *_data, struct mad_stream *stream);
|
||||
enum mad_flow output_cb(void *_data,
|
||||
|
@ -263,6 +255,15 @@ ProgressResult MP3ImportFileHandle::Import(
|
|||
return privateData.updateResult;
|
||||
}
|
||||
|
||||
unsigned MP3ImportPlugin::SequenceNumber() const
|
||||
{
|
||||
return 40;
|
||||
}
|
||||
|
||||
static Importer::RegisteredImportPlugin registered{
|
||||
std::make_unique< MP3ImportPlugin >()
|
||||
};
|
||||
|
||||
MP3ImportFileHandle::~MP3ImportFileHandle()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ImportMP3.h
|
||||
|
||||
Dominic Mazzoni
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_IMPORT_MP3__
|
||||
#define __AUDACITY_IMPORT_MP3__
|
||||
|
||||
#include "ImportForwards.h"
|
||||
|
||||
void GetMP3ImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList);
|
||||
|
||||
#endif
|
|
@ -29,7 +29,6 @@
|
|||
*//*******************************************************************/
|
||||
|
||||
#include "../Audacity.h" // for USE_* macros
|
||||
#include "ImportOGG.h"
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include <wx/wxprec.h>
|
||||
|
@ -39,6 +38,7 @@
|
|||
#endif
|
||||
|
||||
#include <wx/intl.h>
|
||||
#include "Import.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Tags.h"
|
||||
#include "../prefs/QualityPrefs.h"
|
||||
|
@ -55,14 +55,10 @@ static const auto exts = {
|
|||
/* BPF There is no real reason to compile without LIBVORBIS, but if you do, you will needs this header */
|
||||
#include "ImportPlugin.h"
|
||||
|
||||
void GetOGGImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList)
|
||||
{
|
||||
unusableImportPluginList.push_back(
|
||||
static Importer::RegisteredUnusableImportPlugin registered{
|
||||
std::make_unique<UnusableImportPlugin>
|
||||
(DESC, FileExtensions( exts.begin(), exts.end() ) )
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
#else /* USE_LIBVORBIS */
|
||||
|
||||
|
@ -94,6 +90,8 @@ public:
|
|||
wxString GetPluginStringID() override { return wxT("liboggvorbis"); }
|
||||
wxString GetPluginFormatDescription() override;
|
||||
std::unique_ptr<ImportFileHandle> Open(const FilePath &Filename) override;
|
||||
|
||||
unsigned SequenceNumber() const override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -159,11 +157,6 @@ private:
|
|||
sampleFormat mFormat;
|
||||
};
|
||||
|
||||
void GetOGGImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList & WXUNUSED(unusableImportPluginList))
|
||||
{
|
||||
importPluginList.push_back( std::make_unique<OggImportPlugin>() );
|
||||
}
|
||||
|
||||
wxString OggImportPlugin::GetPluginFormatDescription()
|
||||
{
|
||||
|
@ -216,6 +209,15 @@ std::unique_ptr<ImportFileHandle> OggImportPlugin::Open(const FilePath &filename
|
|||
return std::make_unique<OggImportFileHandle>(filename, std::move(file), std::move(vorbisFile));
|
||||
}
|
||||
|
||||
unsigned OggImportPlugin::SequenceNumber() const
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
||||
static Importer::RegisteredImportPlugin registered{
|
||||
std::make_unique< OggImportPlugin >()
|
||||
};
|
||||
|
||||
wxString OggImportFileHandle::GetFileDescription()
|
||||
{
|
||||
return DESC;
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ImportOGG.h
|
||||
|
||||
Joshua Haberman
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_IMPORT_OGG__
|
||||
#define __AUDACITY_IMPORT_OGG__
|
||||
|
||||
#include "ImportForwards.h"
|
||||
|
||||
void GetOGGImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList);
|
||||
|
||||
#endif
|
|
@ -20,8 +20,8 @@
|
|||
*//*******************************************************************/
|
||||
|
||||
#include "../Audacity.h" // for USE_* macros
|
||||
#include "ImportPCM.h"
|
||||
|
||||
#include "Import.h"
|
||||
#include "../Tags.h"
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
@ -84,6 +84,8 @@ public:
|
|||
wxString GetPluginStringID() override { return wxT("libsndfile"); }
|
||||
wxString GetPluginFormatDescription() override;
|
||||
std::unique_ptr<ImportFileHandle> Open(const FilePath &Filename) override;
|
||||
|
||||
unsigned SequenceNumber() const override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -115,12 +117,6 @@ private:
|
|||
sampleFormat mFormat;
|
||||
};
|
||||
|
||||
void GetPCMImportPlugin(ImportPluginList & importPluginList,
|
||||
UnusableImportPluginList & WXUNUSED(unusableImportPluginList))
|
||||
{
|
||||
importPluginList.push_back( std::make_unique<PCMImportPlugin>() );
|
||||
}
|
||||
|
||||
wxString PCMImportPlugin::GetPluginFormatDescription()
|
||||
{
|
||||
return DESC;
|
||||
|
@ -190,6 +186,15 @@ std::unique_ptr<ImportFileHandle> PCMImportPlugin::Open(const FilePath &filename
|
|||
return std::make_unique<PCMImportFileHandle>(filename, std::move(file), info);
|
||||
}
|
||||
|
||||
unsigned PCMImportPlugin::SequenceNumber() const
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
static Importer::RegisteredImportPlugin registered{
|
||||
std::make_unique< PCMImportPlugin >()
|
||||
};
|
||||
|
||||
PCMImportFileHandle::PCMImportFileHandle(const FilePath &name,
|
||||
SFFile &&file, SF_INFO info)
|
||||
: ImportFileHandle(name),
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ImportPCM.h
|
||||
|
||||
Dominic Mazzoni
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_IMPORT_PCM__
|
||||
#define __AUDACITY_IMPORT_PCM__
|
||||
|
||||
#include "ImportForwards.h"
|
||||
|
||||
void GetPCMImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList);
|
||||
|
||||
|
||||
#endif
|
|
@ -40,16 +40,6 @@ been compiled or are not available in this version of Audacity. Has
|
|||
enough information to identify the file extensions that would be used,
|
||||
but little else.
|
||||
|
||||
*//****************************************************************//**
|
||||
|
||||
\class ImportPluginList
|
||||
\brief An ImportPlugin list.
|
||||
|
||||
*//****************************************************************//**
|
||||
|
||||
\class UnusableImportPluginList
|
||||
\brief An UnusableImportPlugin list.
|
||||
|
||||
*//*******************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_IMPORTER__
|
||||
|
@ -104,6 +94,8 @@ public:
|
|||
// state.
|
||||
virtual std::unique_ptr<ImportFileHandle> Open(const FilePath &Filename) = 0;
|
||||
|
||||
virtual unsigned SequenceNumber() const = 0;
|
||||
|
||||
virtual ~ImportPlugin() { }
|
||||
|
||||
protected:
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
**********************************************************************/
|
||||
|
||||
#include "../Audacity.h" // for USE_* macros
|
||||
#include "ImportQT.h"
|
||||
|
||||
#include "Import.h"
|
||||
#include "ImportPlugin.h"
|
||||
#include "../widgets/AudacityMessageBox.h"
|
||||
#include "../widgets/ProgressDialog.h"
|
||||
|
@ -38,19 +38,17 @@ static const auto exts = {
|
|||
|
||||
#ifndef USE_QUICKTIME
|
||||
|
||||
void GetQTImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList)
|
||||
{
|
||||
// Bug 2068: misleading error message about QuickTime
|
||||
// Bug 2068: misleading error message about QuickTime
|
||||
// In 64 bit versions we cannot compile in (obsolete) QuickTime
|
||||
// So don't register the QuickTime extensions, so ensuring we never report
|
||||
// "This version of Audacity was not compiled with QuickTime files support"
|
||||
// When attempting to import MP4 files.
|
||||
// unusableImportPluginList.push_back(
|
||||
// std::make_unique<UnusableImportPlugin>(DESC,
|
||||
// FileExtensions( exts.begin(), exts.end() ) )
|
||||
// );
|
||||
}
|
||||
/*
|
||||
static Importer::RegisteredUnusableImportPlugin registered{
|
||||
std::make_unique<UnusableImportPlugin>(DESC,
|
||||
FileExtensions( exts.begin(), exts.end() ) )
|
||||
};
|
||||
*/
|
||||
|
||||
#else /* USE_QUICKTIME */
|
||||
|
||||
|
@ -126,6 +124,8 @@ class QTImportPlugin final : public ImportPlugin
|
|||
wxString GetPluginFormatDescription();
|
||||
std::unique_ptr<ImportFileHandle> Open(const wxString & Filename) override;
|
||||
|
||||
unsigned SequenceNumber() const override;
|
||||
|
||||
private:
|
||||
bool mInitialized;
|
||||
};
|
||||
|
@ -175,12 +175,6 @@ class QTImportFileHandle final : public ImportFileHandle
|
|||
Movie mMovie;
|
||||
};
|
||||
|
||||
void GetQTImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList)
|
||||
{
|
||||
importPluginList.push_back( std::make_unique<QTImportPlugin>() );
|
||||
}
|
||||
|
||||
wxString QTImportPlugin::GetPluginFormatDescription()
|
||||
{
|
||||
return DESC;
|
||||
|
@ -226,6 +220,15 @@ std::unique_ptr<ImportFileHandle> QTImportPlugin::Open(const wxString & Filename
|
|||
return std::make_unique<QTImportFileHandle>(Filename, theMovie);
|
||||
}
|
||||
|
||||
unsigned QTImportPlugin::SequenceNumber() const
|
||||
{
|
||||
return 70;
|
||||
}
|
||||
|
||||
static Importer::RegisteredImportPlugin registered{
|
||||
std::make_unique< QTImportPlugin >()
|
||||
};
|
||||
|
||||
|
||||
wxString QTImportFileHandle::GetFileDescription()
|
||||
{
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ImportQT.h
|
||||
|
||||
Joshua Haberman
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_IMPORT_QT__
|
||||
#define __AUDACITY_IMPORT_QT__
|
||||
|
||||
#include "ImportForwards.h"
|
||||
|
||||
void GetQTImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList);
|
||||
|
||||
#endif
|
|
@ -1,4 +1,4 @@
|
|||
#include "../ProjectManager.h"
|
||||
#include "../ProjectHistory.h"
|
||||
#include "../ProjectSettings.h"
|
||||
#include "../TrackPanel.h"
|
||||
#include "../UndoManager.h"
|
||||
|
@ -389,7 +389,7 @@ void DoSelectClipBoundary(AudacityProject &project, bool next)
|
|||
else
|
||||
selectedRegion.setT0(results[0].time);
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
trackPanel.Refresh(false);
|
||||
|
||||
wxString message = ClipBoundaryMessage(results);
|
||||
|
@ -572,7 +572,7 @@ void DoSelectClip(AudacityProject &project, bool next)
|
|||
double t0 = results[0].startTime;
|
||||
double t1 = results[0].endTime;
|
||||
selectedRegion.setTimes(t0, t1);
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
trackPanel.ScrollIntoView(selectedRegion.t0());
|
||||
trackPanel.Refresh(false);
|
||||
|
||||
|
@ -618,7 +618,7 @@ void DoCursorClipBoundary
|
|||
// value.
|
||||
double time = results[0].time;
|
||||
selectedRegion.setTimes(time, time);
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
trackPanel.ScrollIntoView(selectedRegion.t0());
|
||||
trackPanel.Refresh(false);
|
||||
|
||||
|
@ -720,7 +720,7 @@ void DoClipLeftOrRight
|
|||
// keypress (keydown, then keyup), and holding down a key
|
||||
// (multiple keydowns followed by a keyup) result in a single
|
||||
// entry in Audacity's history dialog.
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(message, _("Time-Shift"), UndoPush::CONSOLIDATE);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "../NoteTrack.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectHistory.h"
|
||||
#include "../ProjectSettings.h"
|
||||
#include "../ProjectWindow.h"
|
||||
#include "../Tags.h"
|
||||
|
@ -51,7 +51,7 @@ bool DoPasteText(AudacityProject &project)
|
|||
if (pLabelTrack->PasteSelectedText(selectedRegion.t0(),
|
||||
selectedRegion.t1()))
|
||||
{
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Pasted text from the clipboard"), _("Paste"));
|
||||
|
||||
// Make sure caret is in view
|
||||
|
@ -151,7 +151,7 @@ bool DoPasteNothingSelected(AudacityProject &project)
|
|||
// half a sample earlier
|
||||
quantT1 - quantT0);
|
||||
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Pasted from the clipboard"), _("Paste"));
|
||||
|
||||
window.RedrawProject();
|
||||
|
@ -220,7 +220,7 @@ bool DoEditMetadata
|
|||
if (tags != *newTags) {
|
||||
// Commit the change to project state only now.
|
||||
Tags::Set( project, newTags );
|
||||
ProjectManager::Get( project ).PushState(title, shortUndoDescription);
|
||||
ProjectHistory::Get( project ).PushState(title, shortUndoDescription);
|
||||
}
|
||||
bool bShowInFuture;
|
||||
gPrefs->Read(wxT("/AudioFiles/ShowId3Dialog"), &bShowInFuture, true);
|
||||
|
@ -237,7 +237,7 @@ void DoUndo(AudacityProject &project)
|
|||
auto &undoManager = UndoManager::Get( project );
|
||||
auto &window = ProjectWindow::Get( project );
|
||||
|
||||
if (!ProjectManager::Get( project ).UndoAvailable()) {
|
||||
if (!ProjectHistory::Get( project ).UndoAvailable()) {
|
||||
AudacityMessageBox(_("Nothing to undo"));
|
||||
return;
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ void DoUndo(AudacityProject &project)
|
|||
|
||||
undoManager.Undo(
|
||||
[&]( const UndoState &state ){
|
||||
ProjectManager::Get( project ).PopState( state ); } );
|
||||
ProjectHistory::Get( project ).PopState( state ); } );
|
||||
|
||||
trackPanel.EnsureVisible(trackPanel.GetFirstSelectedTrack());
|
||||
|
||||
|
@ -274,7 +274,7 @@ void OnRedo(const CommandContext &context)
|
|||
auto &undoManager = UndoManager::Get( project );
|
||||
auto &window = ProjectWindow::Get( project );
|
||||
|
||||
if (!ProjectManager::Get( project ).RedoAvailable()) {
|
||||
if (!ProjectHistory::Get( project ).RedoAvailable()) {
|
||||
AudacityMessageBox(_("Nothing to redo"));
|
||||
return;
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ void OnRedo(const CommandContext &context)
|
|||
|
||||
undoManager.Redo(
|
||||
[&]( const UndoState &state ){
|
||||
ProjectManager::Get( project ).PopState( state ); } );
|
||||
ProjectHistory::Get( project ).PopState( state ); } );
|
||||
|
||||
trackPanel.EnsureVisible(trackPanel.GetFirstSelectedTrack());
|
||||
|
||||
|
@ -372,7 +372,7 @@ void OnCut(const CommandContext &context)
|
|||
|
||||
selectedRegion.collapseToT0();
|
||||
|
||||
ProjectManager::Get( project ).PushState(_("Cut to the clipboard"), _("Cut"));
|
||||
ProjectHistory::Get( project ).PushState(_("Cut to the clipboard"), _("Cut"));
|
||||
|
||||
// Bug 1663
|
||||
//mRuler->ClearPlayRegion();
|
||||
|
@ -398,7 +398,7 @@ void OnDelete(const CommandContext &context)
|
|||
|
||||
selectedRegion.collapseToT0();
|
||||
|
||||
ProjectManager::Get( project ).PushState(wxString::Format(_("Deleted %.2f seconds at t=%.2f"),
|
||||
ProjectHistory::Get( project ).PushState(wxString::Format(_("Deleted %.2f seconds at t=%.2f"),
|
||||
seconds,
|
||||
selectedRegion.t0()),
|
||||
_("Delete"));
|
||||
|
@ -698,7 +698,7 @@ void OnPaste(const CommandContext &context)
|
|||
{
|
||||
selectedRegion.setT1( t0 + clipboard.Duration() );
|
||||
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Pasted from the clipboard"), _("Paste"));
|
||||
|
||||
window.RedrawProject();
|
||||
|
@ -731,7 +731,7 @@ void OnDuplicate(const CommandContext &context)
|
|||
break;
|
||||
}
|
||||
|
||||
ProjectManager::Get( project ).PushState(_("Duplicated"), _("Duplicate"));
|
||||
ProjectHistory::Get( project ).PushState(_("Duplicated"), _("Duplicate"));
|
||||
|
||||
window.RedrawProject();
|
||||
}
|
||||
|
@ -773,7 +773,7 @@ void OnSplitCut(const CommandContext &context)
|
|||
clipboard.Assign( std::move( newClipboard ),
|
||||
selectedRegion.t0(), selectedRegion.t1(), &project );
|
||||
|
||||
ProjectManager::Get( project ).PushState(_("Split-cut to the clipboard"), _("Split Cut"));
|
||||
ProjectHistory::Get( project ).PushState(_("Split-cut to the clipboard"), _("Split Cut"));
|
||||
|
||||
window.RedrawProject();
|
||||
}
|
||||
|
@ -796,7 +796,7 @@ void OnSplitDelete(const CommandContext &context)
|
|||
}
|
||||
);
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
wxString::Format(_("Split-deleted %.2f seconds at t=%.2f"),
|
||||
selectedRegion.duration(),
|
||||
selectedRegion.t0()),
|
||||
|
@ -815,7 +815,7 @@ void OnSilence(const CommandContext &context)
|
|||
for ( auto n : tracks.Selected< AudioTrack >() )
|
||||
n->Silence(selectedRegion.t0(), selectedRegion.t1());
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
wxString::Format(_("Silenced selected tracks for %.2f seconds at %.2f"),
|
||||
selectedRegion.duration(),
|
||||
selectedRegion.t0()),
|
||||
|
@ -848,7 +848,7 @@ void OnTrim(const CommandContext &context)
|
|||
}
|
||||
);
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
wxString::Format(
|
||||
_("Trim selected audio tracks from %.2f seconds to %.2f seconds"),
|
||||
selectedRegion.t0(), selectedRegion.t1()),
|
||||
|
@ -870,7 +870,7 @@ void OnSplit(const CommandContext &context)
|
|||
for (auto wt : tracks.Selected< WaveTrack >())
|
||||
wt->Split( sel0, sel1 );
|
||||
|
||||
ProjectManager::Get( project ).PushState(_("Split"), _("Split"));
|
||||
ProjectHistory::Get( project ).PushState(_("Split"), _("Split"));
|
||||
trackPanel.Refresh(false);
|
||||
#if 0
|
||||
//ANSWER-ME: Do we need to keep this commented out OnSplit() code?
|
||||
|
@ -970,7 +970,7 @@ void OnSplitNew(const CommandContext &context)
|
|||
break;
|
||||
}
|
||||
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Split to new track"), _("Split New"));
|
||||
|
||||
window.RedrawProject();
|
||||
|
@ -987,7 +987,7 @@ void OnJoin(const CommandContext &context)
|
|||
wt->Join(selectedRegion.t0(),
|
||||
selectedRegion.t1());
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
wxString::Format(_("Joined %.2f seconds at t=%.2f"),
|
||||
selectedRegion.duration(),
|
||||
selectedRegion.t0()),
|
||||
|
@ -1007,7 +1007,7 @@ void OnDisjoin(const CommandContext &context)
|
|||
wt->Disjoin(selectedRegion.t0(),
|
||||
selectedRegion.t1());
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
wxString::Format(_("Detached %.2f seconds at t=%.2f"),
|
||||
selectedRegion.duration(),
|
||||
selectedRegion.t0()),
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
#include "../Prefs.h"
|
||||
#include "../Printing.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectFileIO.h"
|
||||
#include "../ProjectFileManager.h"
|
||||
#include "../ProjectHistory.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectWindow.h"
|
||||
#include "../TrackPanel.h"
|
||||
|
@ -131,7 +132,7 @@ AudacityProject *DoImportMIDI(
|
|||
auto pTrack = tracks.Add( newTrack );
|
||||
pTrack->SetSelected(true);
|
||||
|
||||
ProjectManager::Get( *pProject )
|
||||
ProjectHistory::Get( *pProject )
|
||||
.PushState(wxString::Format(_("Imported MIDI from '%s'"),
|
||||
fileName), _("Import MIDI"));
|
||||
|
||||
|
@ -179,37 +180,37 @@ void OnClose(const CommandContext &context )
|
|||
{
|
||||
auto &project = context.project;
|
||||
auto &window = ProjectWindow::Get( project );
|
||||
ProjectManager::Get( project ).SetMenuClose(true);
|
||||
ProjectFileManager::Get( project ).SetMenuClose(true);
|
||||
window.Close();
|
||||
}
|
||||
|
||||
void OnSave(const CommandContext &context )
|
||||
{
|
||||
auto &project = context.project;
|
||||
auto &projectFileIO = ProjectFileIO::Get( project );
|
||||
projectFileIO.Save();
|
||||
auto &projectFileManager = ProjectFileManager::Get( project );
|
||||
projectFileManager.Save();
|
||||
}
|
||||
|
||||
void OnSaveAs(const CommandContext &context )
|
||||
{
|
||||
auto &project = context.project;
|
||||
auto &projectFileIO = ProjectFileIO::Get( project );
|
||||
projectFileIO.SaveAs();
|
||||
auto &projectFileManager = ProjectFileManager::Get( project );
|
||||
projectFileManager.SaveAs();
|
||||
}
|
||||
|
||||
void OnSaveCopy(const CommandContext &context )
|
||||
{
|
||||
auto &project = context.project;
|
||||
auto &projectFileIO = ProjectFileIO::Get( project );
|
||||
projectFileIO.SaveAs(true, true);
|
||||
auto &projectFileManager = ProjectFileManager::Get( project );
|
||||
projectFileManager.SaveAs(true, true);
|
||||
}
|
||||
|
||||
#ifdef USE_LIBVORBIS
|
||||
void OnSaveCompressed(const CommandContext &context)
|
||||
{
|
||||
auto &project = context.project;
|
||||
auto &projectFileIO = ProjectFileIO::Get( project );
|
||||
projectFileIO.SaveAs(true);
|
||||
auto &projectFileManager = ProjectFileManager::Get( project );
|
||||
projectFileManager.SaveAs(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -413,7 +414,7 @@ void OnImport(const CommandContext &context)
|
|||
// this serves to track the file if the users zooms in and such.
|
||||
MissingAliasFilesDialog::SetShouldShow(true);
|
||||
|
||||
wxArrayString selectedFiles = ProjectManager::ShowOpenDialog(wxT(""));
|
||||
wxArrayString selectedFiles = ProjectFileManager::ShowOpenDialog(wxT(""));
|
||||
if (selectedFiles.size() == 0) {
|
||||
gPrefs->Write(wxT("/LastOpenType"),wxT(""));
|
||||
gPrefs->Flush();
|
||||
|
@ -443,7 +444,7 @@ void OnImport(const CommandContext &context)
|
|||
|
||||
FileNames::UpdateDefaultPath(FileNames::Operation::Open, fileName);
|
||||
|
||||
ProjectManager::Get( project ).Import(fileName);
|
||||
ProjectFileManager::Get( project ).Import(fileName);
|
||||
}
|
||||
|
||||
window.ZoomAfterImport(nullptr);
|
||||
|
@ -487,7 +488,7 @@ void OnImportLabels(const CommandContext &context)
|
|||
newTrack->SetSelected(true);
|
||||
tracks.Add( newTrack );
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
wxString::Format(_("Imported labels from '%s'"), fileName),
|
||||
_("Import Labels"));
|
||||
|
||||
|
@ -540,7 +541,8 @@ void OnImportRaw(const CommandContext &context)
|
|||
if (newTracks.size() <= 0)
|
||||
return;
|
||||
|
||||
ProjectManager::Get( project ).AddImportedTracks(fileName, std::move(newTracks));
|
||||
ProjectFileManager::Get( project )
|
||||
.AddImportedTracks(fileName, std::move(newTracks));
|
||||
window.HandleResize(); // Adjust scrollers for NEW track sizes.
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "../Menus.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectSelectionManager.h"
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../SplashDialog.h"
|
||||
#include "../Theme.h"
|
||||
|
@ -253,7 +253,7 @@ void QuickFixDialog::OnFix(wxCommandEvent &event)
|
|||
// preference dialogs.
|
||||
if( Str == "/SnapTo" )
|
||||
{
|
||||
ProjectManager::Get( *pProject ).AS_SetSnapTo( 0 );
|
||||
ProjectSelectionManager::Get( *pProject ).AS_SetSnapTo( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "../Menus.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../ProjectAudioIO.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectHistory.h"
|
||||
#include "../ProjectWindow.h"
|
||||
#include "../TrackPanel.h"
|
||||
#include "../ViewInfo.h"
|
||||
|
@ -72,7 +72,7 @@ int DoAddLabel(
|
|||
|
||||
int index = lt->AddLabel(region, title, focusTrackNumber);
|
||||
|
||||
ProjectManager::Get( project ).PushState(_("Added label"), _("Label"));
|
||||
ProjectHistory::Get( project ).PushState(_("Added label"), _("Label"));
|
||||
|
||||
window.RedrawProject();
|
||||
if (!useDialog) {
|
||||
|
@ -337,7 +337,7 @@ void OnPasteNewLabel(const CommandContext &context)
|
|||
}
|
||||
|
||||
if (bPastedSomething) {
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
_("Pasted from the clipboard"), _("Paste Text to New Label"));
|
||||
|
||||
// Is this necessary? (carried over from former logic in OnPaste())
|
||||
|
@ -377,7 +377,7 @@ void OnCutLabels(const CommandContext &context)
|
|||
|
||||
selectedRegion.collapseToT0();
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
/* i18n-hint: (verb) past tense. Audacity has just cut the labeled audio
|
||||
regions.*/
|
||||
_( "Cut labeled audio regions to clipboard" ),
|
||||
|
@ -401,7 +401,7 @@ void OnDeleteLabels(const CommandContext &context)
|
|||
|
||||
selectedRegion.collapseToT0();
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
/* i18n-hint: (verb) Audacity has just deleted the labeled audio regions*/
|
||||
_( "Deleted labeled audio regions" ),
|
||||
/* i18n-hint: (verb)*/
|
||||
|
@ -423,7 +423,7 @@ void OnSplitCutLabels(const CommandContext &context)
|
|||
EditClipboardByLabel( project,
|
||||
tracks, selectedRegion, &WaveTrack::SplitCut );
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
/* i18n-hint: (verb) Audacity has just split cut the labeled audio
|
||||
regions*/
|
||||
_( "Split Cut labeled audio regions to clipboard" ),
|
||||
|
@ -445,7 +445,7 @@ void OnSplitDeleteLabels(const CommandContext &context)
|
|||
|
||||
EditByLabel( tracks, selectedRegion, &WaveTrack::SplitDelete, false );
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
/* i18n-hint: (verb) Audacity has just done a special kind of DELETE on
|
||||
the labeled audio regions */
|
||||
_( "Split Deleted labeled audio regions" ),
|
||||
|
@ -468,7 +468,7 @@ void OnSilenceLabels(const CommandContext &context)
|
|||
|
||||
EditByLabel( tracks, selectedRegion, &WaveTrack::Silence, false );
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
/* i18n-hint: (verb)*/
|
||||
_( "Silenced labeled audio regions" ),
|
||||
/* i18n-hint: (verb)*/
|
||||
|
@ -490,7 +490,7 @@ void OnCopyLabels(const CommandContext &context)
|
|||
EditClipboardByLabel( project,
|
||||
tracks, selectedRegion, &WaveTrack::CopyNonconst );
|
||||
|
||||
ProjectManager::Get( project ).PushState( _( "Copied labeled audio regions to clipboard" ),
|
||||
ProjectHistory::Get( project ).PushState( _( "Copied labeled audio regions to clipboard" ),
|
||||
/* i18n-hint: (verb)*/
|
||||
_( "Copy Labeled Audio" ) );
|
||||
|
||||
|
@ -506,7 +506,7 @@ void OnSplitLabels(const CommandContext &context)
|
|||
|
||||
EditByLabel( tracks, selectedRegion, &WaveTrack::Split, false );
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
/* i18n-hint: (verb) past tense. Audacity has just split the labeled
|
||||
audio (a point or a region)*/
|
||||
_( "Split labeled audio (points or regions)" ),
|
||||
|
@ -528,7 +528,7 @@ void OnJoinLabels(const CommandContext &context)
|
|||
|
||||
EditByLabel( tracks, selectedRegion, &WaveTrack::Join, false );
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
/* i18n-hint: (verb) Audacity has just joined the labeled audio (points or
|
||||
regions) */
|
||||
_( "Joined labeled audio (points or regions)" ),
|
||||
|
@ -550,7 +550,7 @@ void OnDisjoinLabels(const CommandContext &context)
|
|||
|
||||
EditByLabel( tracks, selectedRegion, &WaveTrack::Disjoin, false );
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
/* i18n-hint: (verb) Audacity has just detached the labeled audio regions.
|
||||
This message appears in history and tells you about something
|
||||
Audacity has done.*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "../Menus.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectHistory.h"
|
||||
#include "../ProjectWindow.h"
|
||||
#include "../Track.h"
|
||||
#include "../SelectionState.h"
|
||||
|
@ -86,7 +86,7 @@ void NextOrPrevFrame(AudacityProject &project, bool forward)
|
|||
void DoPrevTrack(
|
||||
AudacityProject &project, bool shift, bool circularTrackNavigation )
|
||||
{
|
||||
auto &projectManager = ProjectManager::Get( project );
|
||||
auto &projectHistory = ProjectHistory::Get( project );
|
||||
auto &trackPanel = TrackPanel::Get( project );
|
||||
auto &tracks = TrackList::Get( project );
|
||||
auto &selectionState = SelectionState::Get( project );
|
||||
|
@ -97,7 +97,7 @@ void DoPrevTrack(
|
|||
t = *tracks.Any().rbegin();
|
||||
trackPanel.SetFocusedTrack( t );
|
||||
trackPanel.EnsureVisible( t );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ void DoPrevTrack(
|
|||
( *t, false, false );
|
||||
trackPanel.SetFocusedTrack( p ); // move focus to next track up
|
||||
trackPanel.EnsureVisible( p );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
if( tSelected && !pSelected )
|
||||
|
@ -138,7 +138,7 @@ void DoPrevTrack(
|
|||
( *p, true, false );
|
||||
trackPanel.SetFocusedTrack( p ); // move focus to next track up
|
||||
trackPanel.EnsureVisible( p );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
if( !tSelected && pSelected )
|
||||
|
@ -147,7 +147,7 @@ void DoPrevTrack(
|
|||
( *p, false, false );
|
||||
trackPanel.SetFocusedTrack( p ); // move focus to next track up
|
||||
trackPanel.EnsureVisible( p );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
if( !tSelected && !pSelected )
|
||||
|
@ -156,7 +156,7 @@ void DoPrevTrack(
|
|||
( *t, true, false );
|
||||
trackPanel.SetFocusedTrack( p ); // move focus to next track up
|
||||
trackPanel.EnsureVisible( p );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ void DoPrevTrack(
|
|||
p = * range.rbegin(); // null if range is empty
|
||||
trackPanel.SetFocusedTrack( p ); // Wrap to the last track
|
||||
trackPanel.EnsureVisible( p );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -185,7 +185,7 @@ void DoPrevTrack(
|
|||
{
|
||||
trackPanel.SetFocusedTrack( p ); // move focus to next track up
|
||||
trackPanel.EnsureVisible( p );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ void DoPrevTrack(
|
|||
void DoNextTrack(
|
||||
AudacityProject &project, bool shift, bool circularTrackNavigation )
|
||||
{
|
||||
auto &projectManager = ProjectManager::Get( project );
|
||||
auto &projectHistory = ProjectHistory::Get( project );
|
||||
auto &trackPanel = TrackPanel::Get( project );
|
||||
auto &tracks = TrackList::Get( project );
|
||||
auto &selectionState = SelectionState::Get( project );
|
||||
|
@ -208,7 +208,7 @@ void DoNextTrack(
|
|||
t = *tracks.Any().begin();
|
||||
trackPanel.SetFocusedTrack( t );
|
||||
trackPanel.EnsureVisible( t );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ void DoNextTrack(
|
|||
( *t, false, false );
|
||||
trackPanel.SetFocusedTrack( n ); // move focus to next track down
|
||||
trackPanel.EnsureVisible( n );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
if( tSelected && !nSelected )
|
||||
|
@ -243,7 +243,7 @@ void DoNextTrack(
|
|||
( *n, true, false );
|
||||
trackPanel.SetFocusedTrack( n ); // move focus to next track down
|
||||
trackPanel.EnsureVisible( n );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
if( !tSelected && nSelected )
|
||||
|
@ -252,7 +252,7 @@ void DoNextTrack(
|
|||
( *n, false, false );
|
||||
trackPanel.SetFocusedTrack( n ); // move focus to next track down
|
||||
trackPanel.EnsureVisible( n );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
if( !tSelected && !nSelected )
|
||||
|
@ -261,7 +261,7 @@ void DoNextTrack(
|
|||
( *t, true, false );
|
||||
trackPanel.SetFocusedTrack( n ); // move focus to next track down
|
||||
trackPanel.EnsureVisible( n );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ void DoNextTrack(
|
|||
n = *tracks.Any().begin();
|
||||
trackPanel.SetFocusedTrack( n ); // Wrap to the first track
|
||||
trackPanel.EnsureVisible( n );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -289,7 +289,7 @@ void DoNextTrack(
|
|||
{
|
||||
trackPanel.SetFocusedTrack( n ); // move focus to next track down
|
||||
trackPanel.EnsureVisible( n );
|
||||
projectManager.ModifyState(false);
|
||||
projectHistory.ModifyState(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -474,7 +474,7 @@ void OnFirstTrack(const CommandContext &context)
|
|||
if (t != f)
|
||||
{
|
||||
trackPanel.SetFocusedTrack(f);
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
}
|
||||
trackPanel.EnsureVisible(f);
|
||||
}
|
||||
|
@ -493,7 +493,7 @@ void OnLastTrack(const CommandContext &context)
|
|||
if (t != l)
|
||||
{
|
||||
trackPanel.SetFocusedTrack(l);
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
}
|
||||
trackPanel.EnsureVisible(l);
|
||||
}
|
||||
|
@ -525,7 +525,7 @@ void OnToggle(const CommandContext &context)
|
|||
selectionState.SelectTrack
|
||||
( *t, !t->GetSelected(), true );
|
||||
trackPanel.EnsureVisible( t );
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
|
||||
trackPanel.GetAx().Updated();
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "../PluginManager.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectHistory.h"
|
||||
#include "../ProjectSettings.h"
|
||||
#include "../ProjectWindow.h"
|
||||
#include "../Screenshot.h"
|
||||
|
@ -495,7 +495,7 @@ bool DoEffect(
|
|||
{
|
||||
wxString shortDesc = em.GetCommandName(ID);
|
||||
wxString longDesc = em.GetCommandDescription(ID);
|
||||
ProjectManager::Get( project ).PushState(longDesc, shortDesc);
|
||||
ProjectHistory::Get( project ).PushState(longDesc, shortDesc);
|
||||
}
|
||||
|
||||
if (!(flags & kDontRepeatLast))
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectAudioIO.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectHistory.h"
|
||||
#include "../ProjectSelectionManager.h"
|
||||
#include "../ProjectSettings.h"
|
||||
#include "../ProjectWindow.h"
|
||||
#include "../SelectionState.h"
|
||||
|
@ -40,7 +41,7 @@ void DoSelectTimeAndTracks
|
|||
for (auto t : tracks.Any())
|
||||
t->SetSelected(true);
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +66,7 @@ void DoSelectTimeAndAudioTracks
|
|||
for (auto t : tracks.Any<WaveTrack>())
|
||||
t->SetSelected(true);
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
}
|
||||
|
@ -90,7 +91,7 @@ void DoNextPeakFrequency(AudacityProject &project, bool up)
|
|||
SpectrumAnalyst analyst;
|
||||
SelectHandle::SnapCenterOnce(analyst, viewInfo, pTrack, up);
|
||||
trackPanel.Refresh(false);
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -181,7 +182,7 @@ bool OnlyHandleKeyUp( const CommandContext &context )
|
|||
if( !bKeyUp )
|
||||
return false;
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -422,7 +423,7 @@ void DoCursorMove(
|
|||
MoveWhenAudioInactive(project, seekStep, TIME_UNIT_SECONDS);
|
||||
}
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
}
|
||||
|
||||
void DoBoundaryMove(AudacityProject &project, int step, SeekInfo &info)
|
||||
|
@ -456,7 +457,7 @@ void DoBoundaryMove(AudacityProject &project, int step, SeekInfo &info)
|
|||
else
|
||||
viewInfo.selectedRegion.setT1(indicator);
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
trackPanel.Refresh(false);
|
||||
return;
|
||||
}
|
||||
|
@ -485,7 +486,7 @@ void DoBoundaryMove(AudacityProject &project, int step, SeekInfo &info)
|
|||
trackPanel.ScrollIntoView(newT);
|
||||
trackPanel.Refresh(false);
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -535,7 +536,7 @@ void DoListSelection
|
|||
trackPanel.SetFocusedTrack(t);
|
||||
window.Refresh(false);
|
||||
if (modifyState)
|
||||
ProjectManager::Get( project ).ModifyState(true);
|
||||
ProjectHistory::Get( project ).ModifyState(true);
|
||||
}
|
||||
|
||||
void DoSelectAll(AudacityProject &project)
|
||||
|
@ -585,7 +586,7 @@ void OnSelectNone(const CommandContext &context)
|
|||
|
||||
selectedRegion.collapseToT0();
|
||||
SelectNone( project );
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
}
|
||||
|
||||
void OnSelectAllTracks(const CommandContext &context)
|
||||
|
@ -608,7 +609,7 @@ void OnSelectSyncLockSel(const CommandContext &context)
|
|||
}
|
||||
|
||||
if (selected)
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
|
@ -651,7 +652,7 @@ void OnSetLeftSelection(const CommandContext &context)
|
|||
|
||||
if (bSelChanged)
|
||||
{
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
}
|
||||
|
@ -691,7 +692,7 @@ void OnSetRightSelection(const CommandContext &context)
|
|||
|
||||
if (bSelChanged)
|
||||
{
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
}
|
||||
|
@ -717,7 +718,7 @@ void OnSelectStartCursor(const CommandContext &context)
|
|||
|
||||
selectedRegion.setT0(minOffset);
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
|
@ -743,7 +744,7 @@ void OnSelectCursorEnd(const CommandContext &context)
|
|||
|
||||
selectedRegion.setT1(maxEndOffset);
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
|
@ -763,7 +764,7 @@ void OnSelectTrackStartToEnd(const CommandContext &context)
|
|||
return;
|
||||
|
||||
viewInfo.selectedRegion.setTimes( minOffset, maxEndOffset );
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
|
@ -791,7 +792,7 @@ void OnSelectionRestore(const CommandContext &context)
|
|||
|
||||
selectedRegion = mRegionSave;
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
|
@ -824,7 +825,7 @@ void OnToggleSpectralSelection(const CommandContext &context)
|
|||
selectedRegion.setFrequencies(mLastF0, mLastF1);
|
||||
|
||||
trackPanel.Refresh(false);
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
}
|
||||
|
||||
void OnNextHigherPeakFrequency(const CommandContext &context)
|
||||
|
@ -859,7 +860,7 @@ void OnSelectCursorStoredCursor(const CommandContext &context)
|
|||
std::min(cursorPositionCurrent, mCursorPositionStored),
|
||||
std::max(cursorPositionCurrent, mCursorPositionStored));
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
}
|
||||
|
@ -892,7 +893,7 @@ void OnZeroCrossing(const CommandContext &context)
|
|||
selectedRegion.setTimes(t0, t1);
|
||||
}
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
|
@ -900,19 +901,19 @@ void OnZeroCrossing(const CommandContext &context)
|
|||
void OnSnapToOff(const CommandContext &context)
|
||||
{
|
||||
auto &project = context.project;
|
||||
ProjectManager::Get( project ).AS_SetSnapTo(SNAP_OFF);
|
||||
ProjectSelectionManager::Get( project ).AS_SetSnapTo(SNAP_OFF);
|
||||
}
|
||||
|
||||
void OnSnapToNearest(const CommandContext &context)
|
||||
{
|
||||
auto &project = context.project;
|
||||
ProjectManager::Get( project ).AS_SetSnapTo(SNAP_NEAREST);
|
||||
ProjectSelectionManager::Get( project ).AS_SetSnapTo(SNAP_NEAREST);
|
||||
}
|
||||
|
||||
void OnSnapToPrior(const CommandContext &context)
|
||||
{
|
||||
auto &project = context.project;
|
||||
ProjectManager::Get( project ).AS_SetSnapTo(SNAP_PRIOR);
|
||||
ProjectSelectionManager::Get( project ).AS_SetSnapTo(SNAP_PRIOR);
|
||||
}
|
||||
|
||||
void OnSelToStart(const CommandContext &context)
|
||||
|
@ -920,7 +921,7 @@ void OnSelToStart(const CommandContext &context)
|
|||
auto &project = context.project;
|
||||
auto &window = ProjectWindow::Get( project );
|
||||
window.Rewind(true);
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
}
|
||||
|
||||
void OnSelToEnd(const CommandContext &context)
|
||||
|
@ -928,7 +929,7 @@ void OnSelToEnd(const CommandContext &context)
|
|||
auto &project = context.project;
|
||||
auto &window = ProjectWindow::Get( project );
|
||||
window.SkipEnd(true);
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
}
|
||||
|
||||
// Handler state:
|
||||
|
@ -979,7 +980,7 @@ void OnCursorSelStart(const CommandContext &context)
|
|||
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
|
||||
|
||||
selectedRegion.collapseToT0();
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
trackPanel.ScrollIntoView(selectedRegion.t0());
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
|
@ -991,7 +992,7 @@ void OnCursorSelEnd(const CommandContext &context)
|
|||
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
|
||||
|
||||
selectedRegion.collapseToT1();
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
trackPanel.ScrollIntoView(selectedRegion.t1());
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
|
@ -1018,7 +1019,7 @@ void OnCursorTrackStart(const CommandContext &context)
|
|||
return;
|
||||
|
||||
selectedRegion.setTimes(minOffset, minOffset);
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
trackPanel.ScrollIntoView(selectedRegion.t0());
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
|
@ -1045,7 +1046,7 @@ void OnCursorTrackEnd(const CommandContext &context)
|
|||
return;
|
||||
|
||||
selectedRegion.setTimes(maxEndOffset, maxEndOffset);
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
trackPanel.ScrollIntoView(selectedRegion.t1());
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
|
@ -1057,7 +1058,7 @@ void OnSkipStart(const CommandContext &context)
|
|||
|
||||
auto &controlToolBar = ControlToolBar::Get( project );
|
||||
controlToolBar.OnRewind(evt);
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
}
|
||||
|
||||
void OnSkipEnd(const CommandContext &context)
|
||||
|
@ -1067,7 +1068,7 @@ void OnSkipEnd(const CommandContext &context)
|
|||
|
||||
auto &controlToolBar = ControlToolBar::Get( project );
|
||||
controlToolBar.OnFF(evt);
|
||||
ProjectManager::Get( project ).ModifyState(false);
|
||||
ProjectHistory::Get( project ).ModifyState(false);
|
||||
}
|
||||
|
||||
void OnCursorLeft(const CommandContext &context)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectAudioIO.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectHistory.h"
|
||||
#include "../ProjectSettings.h"
|
||||
#include "../PluginManager.h"
|
||||
#include "../ProjectWindow.h"
|
||||
|
@ -93,7 +93,7 @@ void DoMixAndRender
|
|||
msg.Printf(_("Rendered all audio in track '%s'"), firstName);
|
||||
/* i18n-hint: Convert the audio into a more usable form, so apply
|
||||
* panning and amplification and write to some external file.*/
|
||||
ProjectManager::Get( project ).PushState(msg, _("Render"));
|
||||
ProjectHistory::Get( project ).PushState(msg, _("Render"));
|
||||
}
|
||||
else {
|
||||
wxString msg;
|
||||
|
@ -105,7 +105,7 @@ void DoMixAndRender
|
|||
msg.Printf(
|
||||
_("Mixed and rendered %d tracks into one new mono track"),
|
||||
(int)selectedCount);
|
||||
ProjectManager::Get( project ).PushState(msg, _("Mix and Render"));
|
||||
ProjectHistory::Get( project ).PushState(msg, _("Mix and Render"));
|
||||
}
|
||||
|
||||
trackPanel.SetFocus();
|
||||
|
@ -133,7 +133,7 @@ void DoPanTracks(AudacityProject &project, float PanValue)
|
|||
|
||||
auto flags = UndoPush::AUTOSAVE;
|
||||
/*i18n-hint: One or more audio tracks have been panned*/
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Panned audio track(s)"), _("Pan Track"), flags);
|
||||
flags = flags | UndoPush::CONSOLIDATE;
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ void DoAlign
|
|||
if (moveSel)
|
||||
selectedRegion.move(delta);
|
||||
|
||||
ProjectManager::Get( project ).PushState(action, shortAction);
|
||||
ProjectHistory::Get( project ).PushState(action, shortAction);
|
||||
|
||||
window.RedrawProject();
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ void SetTrackGain(AudacityProject &project, WaveTrack * wt, LWSlider * slider)
|
|||
for (auto channel : TrackList::Channels(wt))
|
||||
channel->SetGain(newValue);
|
||||
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Adjusted gain"), _("Gain"), UndoPush::CONSOLIDATE);
|
||||
|
||||
TrackPanel::Get( project ).RefreshTrack(wt);
|
||||
|
@ -554,7 +554,7 @@ void SetTrackPan(AudacityProject &project, WaveTrack * wt, LWSlider * slider)
|
|||
for (auto channel : TrackList::Channels(wt))
|
||||
channel->SetPan(newValue);
|
||||
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Adjusted Pan"), _("Pan"), UndoPush::CONSOLIDATE);
|
||||
|
||||
TrackPanel::Get( project ).RefreshTrack(wt);
|
||||
|
@ -600,7 +600,7 @@ void DoRemoveTracks( AudacityProject &project )
|
|||
if (f)
|
||||
trackPanel.EnsureVisible(f);
|
||||
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Removed audio track(s)"), _("Remove Track"));
|
||||
|
||||
trackPanel.UpdateViewIfNoTracks();
|
||||
|
@ -651,7 +651,7 @@ void DoTrackMute(AudacityProject &project, Track *t, bool exclusive)
|
|||
track->SetSolo( (nPlaying==1) && (nPlayableTracks > 1 ) && !track->GetMute() );
|
||||
}
|
||||
}
|
||||
ProjectManager::Get( project ).ModifyState(true);
|
||||
ProjectHistory::Get( project ).ModifyState(true);
|
||||
|
||||
trackPanel.UpdateAccessibility();
|
||||
trackPanel.Refresh(false);
|
||||
|
@ -704,7 +704,7 @@ void DoTrackSolo(AudacityProject &project, Track *t, bool exclusive)
|
|||
}
|
||||
}
|
||||
}
|
||||
ProjectManager::Get( project ).ModifyState(true);
|
||||
ProjectHistory::Get( project ).ModifyState(true);
|
||||
|
||||
trackPanel.UpdateAccessibility();
|
||||
trackPanel.Refresh(false);
|
||||
|
@ -740,7 +740,7 @@ void DoRemoveTrack(AudacityProject &project, Track * toRemove)
|
|||
if (toRemoveWasFocused)
|
||||
trackPanel.SetFocusedTrack(newFocus);
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
wxString::Format(_("Removed track '%s.'"),
|
||||
name),
|
||||
_("Track Remove"));
|
||||
|
@ -799,7 +799,7 @@ void DoMoveTrack
|
|||
|
||||
longDesc = longDesc.Format(target->GetName());
|
||||
|
||||
ProjectManager::Get( project ).PushState(longDesc, shortDesc);
|
||||
ProjectHistory::Get( project ).PushState(longDesc, shortDesc);
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
|
||||
|
@ -824,7 +824,7 @@ void OnNewWaveTrack(const CommandContext &context)
|
|||
|
||||
t->SetSelected(true);
|
||||
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Created new audio track"), _("New Track"));
|
||||
|
||||
window.RedrawProject();
|
||||
|
@ -853,7 +853,7 @@ void OnNewStereoTrack(const CommandContext &context)
|
|||
|
||||
tracks.GroupChannels(*left, 2);
|
||||
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Created new stereo audio track"), _("New Track"));
|
||||
|
||||
window.RedrawProject();
|
||||
|
@ -874,7 +874,7 @@ void OnNewLabelTrack(const CommandContext &context)
|
|||
|
||||
t->SetSelected(true);
|
||||
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Created new label track"), _("New Track"));
|
||||
|
||||
window.RedrawProject();
|
||||
|
@ -900,7 +900,7 @@ void OnNewTimeTrack(const CommandContext &context)
|
|||
|
||||
t->SetSelected(true);
|
||||
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Created new time track"), _("New Track"));
|
||||
|
||||
window.RedrawProject();
|
||||
|
@ -1023,7 +1023,7 @@ void OnResample(const CommandContext &context)
|
|||
// commit that to the undo stack. The second and later times,
|
||||
// consolidate.
|
||||
|
||||
ProjectManager::Get( project ).PushState(
|
||||
ProjectHistory::Get( project ).PushState(
|
||||
_("Resampled audio track(s)"), _("Resample Track"), flags);
|
||||
flags = flags | UndoPush::CONSOLIDATE;
|
||||
}
|
||||
|
@ -1057,7 +1057,7 @@ void OnMuteAllTracks(const CommandContext &context)
|
|||
pt->SetSolo(false);
|
||||
}
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(true);
|
||||
ProjectHistory::Get( project ).ModifyState(true);
|
||||
window.RedrawProject();
|
||||
}
|
||||
|
||||
|
@ -1078,7 +1078,7 @@ void OnUnmuteAllTracks(const CommandContext &context)
|
|||
pt->SetSolo(false);
|
||||
}
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(true);
|
||||
ProjectHistory::Get( project ).ModifyState(true);
|
||||
window.RedrawProject();
|
||||
}
|
||||
|
||||
|
@ -1240,7 +1240,8 @@ void OnScoreAlign(const CommandContext &context)
|
|||
_("Alignment completed: MIDI from %.2f to %.2f secs, Audio from %.2f to %.2f secs."),
|
||||
params.mMidiStart, params.mMidiEnd,
|
||||
params.mAudioStart, params.mAudioEnd));
|
||||
project.PushState(_("Sync MIDI with Audio"), _("Sync MIDI with Audio"));
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Sync MIDI with Audio"), _("Sync MIDI with Audio"));
|
||||
} else if (result == SA_TOOSHORT) {
|
||||
AudacityMessageBox(wxString::Format(
|
||||
_("Alignment error: input too short: MIDI from %.2f to %.2f secs, Audio from %.2f to %.2f secs."),
|
||||
|
@ -1262,7 +1263,7 @@ void OnSortTime(const CommandContext &context)
|
|||
auto &project = context.project;
|
||||
DoSortTracks(project, kAudacitySortByTime);
|
||||
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Tracks sorted by time"), _("Sort by Time"));
|
||||
|
||||
auto &trackPanel = TrackPanel::Get( project );
|
||||
|
@ -1274,7 +1275,7 @@ void OnSortName(const CommandContext &context)
|
|||
auto &project = context.project;
|
||||
DoSortTracks(project, kAudacitySortByName);
|
||||
|
||||
ProjectManager::Get( project )
|
||||
ProjectHistory::Get( project )
|
||||
.PushState(_("Tracks sorted by name"), _("Sort by Name"));
|
||||
|
||||
auto &trackPanel = TrackPanel::Get( project );
|
||||
|
|
|
@ -9,8 +9,9 @@
|
|||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectAudioIO.h"
|
||||
#include "../ProjectAudioManager.h"
|
||||
#include "../ProjectFileIO.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectHistory.h"
|
||||
#include "../ProjectSettings.h"
|
||||
#include "../ProjectWindow.h"
|
||||
#include "../SoundActivatedRecord.h"
|
||||
|
@ -261,7 +262,7 @@ bool DoPlayStopSelect
|
|||
// -- change t0, collapsing to point only if t1 was greater
|
||||
selection.setT0(time, false);
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(false); // without bWantsAutoSave
|
||||
ProjectHistory::Get( project ).ModifyState(false); // without bWantsAutoSave
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -463,7 +464,7 @@ void OnTimerRecord(const CommandContext &context)
|
|||
switch (iTimerRecordingOutcome) {
|
||||
case POST_TIMER_RECORD_CANCEL_WAIT:
|
||||
// Canceled on the wait dialog
|
||||
ProjectManager::Get( project ).RollbackState();
|
||||
ProjectHistory::Get( project ).RollbackState();
|
||||
break;
|
||||
case POST_TIMER_RECORD_CANCEL:
|
||||
// RunWaitDialog() shows the "wait for start" as well as "recording"
|
||||
|
@ -472,7 +473,7 @@ void OnTimerRecord(const CommandContext &context)
|
|||
// However, we can't undo it here because the PushState() is called in TrackPanel::OnTimer(),
|
||||
// which is blocked by this function.
|
||||
// so instead we mark a flag to undo it there.
|
||||
ProjectManager::Get( project ).SetTimerRecordCancelled();
|
||||
ProjectAudioManager::Get( project ).SetTimerRecordCancelled();
|
||||
break;
|
||||
case POST_TIMER_RECORD_NOTHING:
|
||||
// No action required
|
||||
|
@ -628,7 +629,7 @@ void OnPunchAndRoll(const CommandContext &context)
|
|||
;
|
||||
else
|
||||
// Roll back the deletions
|
||||
ProjectManager::Get( project ).RollbackState();
|
||||
ProjectHistory::Get( project ).RollbackState();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1028,6 +1029,7 @@ void OnMoveToNextLabel(const CommandContext &context)
|
|||
void OnStopSelect(const CommandContext &context)
|
||||
{
|
||||
auto &project = context.project;
|
||||
auto &history = ProjectHistory::Get( project );
|
||||
auto &viewInfo = project.GetViewInfo();
|
||||
auto &selectedRegion = viewInfo.selectedRegion;
|
||||
wxCommandEvent evt;
|
||||
|
@ -1036,7 +1038,7 @@ void OnStopSelect(const CommandContext &context)
|
|||
auto &controlToolbar = ControlToolBar::Get( project );
|
||||
selectedRegion.setT0(gAudioIO->GetStreamTime(), false);
|
||||
controlToolBar.OnStop(evt);
|
||||
project.ModifyState(false); // without bWantsAutoSave
|
||||
history.ModifyState(false); // without bWantsAutoSave
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "../MixerBoard.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectHistory.h"
|
||||
#include "../ProjectWindow.h"
|
||||
#include "../TrackPanel.h"
|
||||
#include "../UndoManager.h"
|
||||
|
@ -282,7 +282,7 @@ void OnZoomFitV(const CommandContext &context)
|
|||
|
||||
window.GetVerticalScrollBar().SetThumbPosition(0);
|
||||
window.RedrawProject();
|
||||
ProjectManager::Get( project ).ModifyState(true);
|
||||
ProjectHistory::Get( project ).ModifyState(true);
|
||||
}
|
||||
|
||||
void OnAdvancedVZoom(const CommandContext &context)
|
||||
|
@ -306,7 +306,7 @@ void OnCollapseAllTracks(const CommandContext &context)
|
|||
for (auto t : tracks.Any())
|
||||
t->SetMinimized(true);
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(true);
|
||||
ProjectHistory::Get( project ).ModifyState(true);
|
||||
window.RedrawProject();
|
||||
}
|
||||
|
||||
|
@ -319,7 +319,7 @@ void OnExpandAllTracks(const CommandContext &context)
|
|||
for (auto t : tracks.Any())
|
||||
t->SetMinimized(false);
|
||||
|
||||
ProjectManager::Get( project ).ModifyState(true);
|
||||
ProjectHistory::Get( project ).ModifyState(true);
|
||||
window.RedrawProject();
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectAudioIO.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectAudioManager.h"
|
||||
#include "../ProjectSettings.h"
|
||||
#include "../ProjectWindow.h"
|
||||
#include "../ViewInfo.h"
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "../ImageManipulation.h"
|
||||
#include "../KeyboardCapture.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectAudioManager.h"
|
||||
#include "../TimeTrack.h"
|
||||
#include "../ViewInfo.h"
|
||||
#include "../WaveTrack.h"
|
||||
|
|
|
@ -13,7 +13,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
|
||||
#include "../../../HitTestResult.h"
|
||||
#include "../../../LabelTrack.h"
|
||||
#include "../../../ProjectManager.h"
|
||||
#include "../../../ProjectHistory.h"
|
||||
#include "../../../RefreshCode.h"
|
||||
#include "../../../TrackPanelMouseEvent.h"
|
||||
#include "../../../UndoManager.h"
|
||||
|
@ -141,7 +141,7 @@ UIHandle::Result LabelGlyphHandle::Release
|
|||
auto &viewInfo = ViewInfo::Get( *pProject );
|
||||
if (mpLT->HandleGlyphDragRelease
|
||||
(mHit, event, mRect, viewInfo, &viewInfo.selectedRegion)) {
|
||||
ProjectManager::Get( *pProject ).PushState(_("Modified Label"),
|
||||
ProjectHistory::Get( *pProject ).PushState(_("Modified Label"),
|
||||
_("Label Edit"),
|
||||
UndoPush::CONSOLIDATE);
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ UIHandle::Result LabelGlyphHandle::Release
|
|||
|
||||
UIHandle::Result LabelGlyphHandle::Cancel(AudacityProject *pProject)
|
||||
{
|
||||
ProjectManager::Get( *pProject ).RollbackState();
|
||||
ProjectHistory::Get( *pProject ).RollbackState();
|
||||
auto result = LabelDefaultClickHandle::Cancel( pProject );
|
||||
return result | RefreshCode::RefreshAll;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../../HitTestResult.h"
|
||||
#include "../../../LabelTrack.h"
|
||||
#include "../../../ProjectAudioIO.h"
|
||||
#include "../../../ProjectManager.h"
|
||||
#include "../../../ProjectHistory.h"
|
||||
#include "../../../RefreshCode.h"
|
||||
#include "../../../SelectionState.h"
|
||||
#include "../../../TrackPanelMouseEvent.h"
|
||||
|
@ -110,7 +110,7 @@ UIHandle::Result LabelTextHandle::Click
|
|||
// PRL: bug1659 -- make selection change undo correctly
|
||||
const bool unsafe = ProjectAudioIO::Get( *pProject ).IsAudioActive();
|
||||
if (!unsafe)
|
||||
ProjectManager::Get( *pProject ).ModifyState(false);
|
||||
ProjectHistory::Get( *pProject ).ModifyState(false);
|
||||
|
||||
return result | RefreshCode::RefreshCell | RefreshCode::UpdateSelection;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
|
||||
#include "../../../../TrackPanelMouseEvent.h"
|
||||
#include "../../../../NoteTrack.h"
|
||||
#include "../../../../ProjectManager.h"
|
||||
#include "../../../../ProjectHistory.h"
|
||||
#include "../../../../RefreshCode.h"
|
||||
#include "../../../../TrackPanel.h"
|
||||
|
||||
|
@ -102,7 +102,7 @@ UIHandle::Result NoteTrackButtonHandle::Release
|
|||
if (pTrack->LabelClick(mRect, event.m_x, event.m_y,
|
||||
event.Button(wxMOUSE_BTN_RIGHT))) {
|
||||
// No undo items needed??
|
||||
ProjectManager::Get( *pProject ).ModifyState(false);
|
||||
ProjectHistory::Get( *pProject ).ModifyState(false);
|
||||
return RefreshAll;
|
||||
}
|
||||
return RefreshNone;
|
||||
|
|
|
@ -24,7 +24,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../../../NoteTrack.h"
|
||||
#include "../../../../widgets/PopupMenuTable.h"
|
||||
#include "../../../../Project.h"
|
||||
#include "../../../../ProjectManager.h"
|
||||
#include "../../../../ProjectHistory.h"
|
||||
#include "../../../../RefreshCode.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -117,7 +117,7 @@ void NoteTrackMenuTable::OnChangeOctave(wxCommandEvent &event)
|
|||
pTrack->ShiftNoteRange((bDown) ? -12 : 12);
|
||||
|
||||
AudacityProject *const project = ::GetActiveProject();
|
||||
ProjectManager::Get( *project )
|
||||
ProjectHistory::Get( *project )
|
||||
.ModifyState(false);
|
||||
mpData->result = RefreshCode::RefreshAll;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
|
||||
#include "../../../../ProjectManager.h"
|
||||
#include "../../../../ProjectHistory.h"
|
||||
#include "../../../../RefreshCode.h"
|
||||
#include "../../../../TrackPanel.h" // for TrackInfo
|
||||
#include "../../../../UndoManager.h"
|
||||
|
@ -60,7 +60,7 @@ UIHandle::Result VelocitySliderHandle::SetValue
|
|||
UIHandle::Result VelocitySliderHandle::CommitChanges
|
||||
(const wxMouseEvent &, AudacityProject *pProject)
|
||||
{
|
||||
ProjectManager::Get( *pProject )
|
||||
ProjectHistory::Get( *pProject )
|
||||
.PushState(_("Moved velocity slider"), _("Velocity"),
|
||||
UndoPush::CONSOLIDATE);
|
||||
return RefreshCode::RefreshCell;
|
||||
|
|
|
@ -17,7 +17,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
|
||||
#include "../../../../HitTestResult.h"
|
||||
#include "../../../../NoteTrack.h"
|
||||
#include "../../../../ProjectManager.h"
|
||||
#include "../../../../ProjectHistory.h"
|
||||
#include "../../../../RefreshCode.h"
|
||||
#include "../../../../TrackPanelMouseEvent.h"
|
||||
|
||||
|
@ -81,7 +81,7 @@ unsigned NoteTrackVRulerControls::HandleWheelRotation
|
|||
return RefreshNone;
|
||||
}
|
||||
|
||||
ProjectManager::Get( *pProject ).ModifyState(false);
|
||||
ProjectHistory::Get( *pProject ).ModifyState(false);
|
||||
|
||||
return RefreshCell | UpdateVRuler;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../../../HitTestResult.h"
|
||||
#include "../../../../NoteTrack.h"
|
||||
#include "../../../../Project.h"
|
||||
#include "../../../../ProjectManager.h"
|
||||
#include "../../../../ProjectHistory.h"
|
||||
#include "../../../../RefreshCode.h"
|
||||
#include "../../../../TrackPanelMouseEvent.h"
|
||||
#include "../../../../widgets/PopupMenuTable.h"
|
||||
|
@ -241,7 +241,7 @@ void NoteTrackVRulerMenuTable::OnZoom( int iZoomCode ){
|
|||
mpData->pTrack->ShiftNoteRange(-12);
|
||||
break;
|
||||
}
|
||||
ProjectManager::Get( *GetActiveProject() ).ModifyState(false);
|
||||
ProjectHistory::Get( *GetActiveProject() ).ModifyState(false);
|
||||
using namespace RefreshCode;
|
||||
mpData->result = UpdateVRuler | RefreshAll;
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ UIHandle::Result NoteTrackVZoomHandle::Release
|
|||
}
|
||||
|
||||
mZoomEnd = mZoomStart = 0;
|
||||
ProjectManager::Get( *pProject ).ModifyState(false);
|
||||
ProjectHistory::Get( *pProject ).ModifyState(false);
|
||||
|
||||
return RefreshAll;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../../../HitTestResult.h"
|
||||
#include "../../../../NoteTrack.h"
|
||||
#include "../../../../ProjectAudioIO.h"
|
||||
#include "../../../../ProjectManager.h"
|
||||
#include "../../../../ProjectHistory.h"
|
||||
#include "../../../../ProjectSettings.h"
|
||||
#include "../../../../RefreshCode.h"
|
||||
#include "../../../../TrackPanelMouseEvent.h"
|
||||
|
@ -252,7 +252,7 @@ UIHandle::Result StretchHandle::Release
|
|||
|
||||
/* i18n-hint: (noun) The track that is used for MIDI notes which can be
|
||||
dragged to change their duration.*/
|
||||
ProjectManager::Get( *pProject ).PushState(_("Stretch Note Track"),
|
||||
ProjectHistory::Get( *pProject ).PushState(_("Stretch Note Track"),
|
||||
/* i18n-hint: In the history list, indicates a MIDI note has
|
||||
been dragged to change its duration (stretch it). Using either past
|
||||
or present tense is fine here. If unsure, go for whichever is
|
||||
|
@ -264,7 +264,7 @@ UIHandle::Result StretchHandle::Release
|
|||
|
||||
UIHandle::Result StretchHandle::Cancel(AudacityProject *pProject)
|
||||
{
|
||||
ProjectManager::Get( *pProject ).RollbackState();
|
||||
ProjectHistory::Get( *pProject ).RollbackState();
|
||||
return RefreshCode::RefreshNone;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../../../Experimental.h"
|
||||
|
||||
#include "../../../../HitTestResult.h"
|
||||
#include "../../../../ProjectManager.h"
|
||||
#include "../../../../ProjectAudioIO.h"
|
||||
#include "../../../../ProjectHistory.h"
|
||||
#include "../../../../RefreshCode.h"
|
||||
#include "../../../../Snap.h" // for kPixelTolerance
|
||||
#include "../../../../TrackPanelMouseEvent.h"
|
||||
|
@ -224,16 +224,16 @@ UIHandle::Result CutlineHandle::Release
|
|||
default:
|
||||
wxASSERT(false);
|
||||
case Merge:
|
||||
ProjectManager::Get( *pProject )
|
||||
ProjectHistory::Get( *pProject )
|
||||
.PushState(_("Merged Clips"), _("Merge"), UndoPush::CONSOLIDATE);
|
||||
break;
|
||||
case Expand:
|
||||
ProjectManager::Get( *pProject )
|
||||
ProjectHistory::Get( *pProject )
|
||||
.PushState(_("Expanded Cut Line"), _("Expand"));
|
||||
result |= RefreshCode::UpdateSelection;
|
||||
break;
|
||||
case Remove:
|
||||
ProjectManager::Get( *pProject )
|
||||
ProjectHistory::Get( *pProject )
|
||||
.PushState(_("Removed Cut Line"), _("Remove"));
|
||||
break;
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ UIHandle::Result CutlineHandle::Cancel(AudacityProject *pProject)
|
|||
{
|
||||
using namespace RefreshCode;
|
||||
UIHandle::Result result = RefreshCell;
|
||||
ProjectManager::Get( *pProject ).RollbackState();
|
||||
ProjectHistory::Get( *pProject ).RollbackState();
|
||||
if (mOperation == Expand) {
|
||||
AudacityProject &project = *pProject;
|
||||
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
|
||||
|
|
|
@ -20,7 +20,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../../../HitTestResult.h"
|
||||
#include "../../../../prefs/WaveformSettings.h"
|
||||
#include "../../../../ProjectAudioIO.h"
|
||||
#include "../../../../ProjectManager.h"
|
||||
#include "../../../../ProjectHistory.h"
|
||||
#include "../../../../RefreshCode.h"
|
||||
#include "../../../../TrackArtist.h"
|
||||
#include "../../../../TrackPanelMouseEvent.h"
|
||||
|
@ -434,7 +434,7 @@ UIHandle::Result SampleHandle::Release
|
|||
//*************************************************
|
||||
//On up-click, send the state to the undo stack
|
||||
mClickedTrack.reset(); //Set this to NULL so it will catch improper drag events.
|
||||
ProjectManager::Get( *pProject ).PushState(_("Moved Samples"),
|
||||
ProjectHistory::Get( *pProject ).PushState(_("Moved Samples"),
|
||||
_("Sample Edit"),
|
||||
UndoPush::CONSOLIDATE | UndoPush::AUTOSAVE);
|
||||
|
||||
|
@ -444,7 +444,7 @@ UIHandle::Result SampleHandle::Release
|
|||
|
||||
UIHandle::Result SampleHandle::Cancel(AudacityProject *pProject)
|
||||
{
|
||||
ProjectManager::Get( *pProject ).RollbackState();
|
||||
ProjectHistory::Get( *pProject ).RollbackState();
|
||||
mClickedTrack.reset();
|
||||
return RefreshCode::RefreshCell;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../../../Menus.h"
|
||||
#include "../../../../Project.h"
|
||||
#include "../../../../ProjectAudioIO.h"
|
||||
#include "../../../../ProjectManager.h"
|
||||
#include "../../../../ProjectHistory.h"
|
||||
#include "../../../../RefreshCode.h"
|
||||
#include "../../../../ShuttleGui.h"
|
||||
#include "../../../../TrackPanel.h"
|
||||
|
@ -220,7 +220,7 @@ void WaveColorMenuTable::OnWaveColorChange(wxCommandEvent & event)
|
|||
for (auto channel : TrackList::Channels(pTrack))
|
||||
channel->SetWaveColorIndex(newWaveColor);
|
||||
|
||||
ProjectManager::Get( *project )
|
||||
ProjectHistory::Get( *project )
|
||||
.PushState(wxString::Format(_("Changed '%s' to %s"),
|
||||
pTrack->GetName(),
|
||||
GetWaveColorStr(newWaveColor)),
|
||||
|
@ -339,7 +339,7 @@ void FormatMenuTable::OnFormatChange(wxCommandEvent & event)
|
|||
channel->ConvertToSampleFormat(newFormat);
|
||||
|
||||
/* i18n-hint: The strings name a track and a format */
|
||||
ProjectManager::Get( *project )
|
||||
ProjectHistory::Get( *project )
|
||||
.PushState(wxString::Format(_("Changed '%s' to %s"),
|
||||
pTrack->GetName(),
|
||||
GetSampleFormatStr(newFormat)),
|
||||
|
@ -441,7 +441,7 @@ void RateMenuTable::SetRate(WaveTrack * pTrack, double rate)
|
|||
// Separate conversion of "rate" enables changing the decimals without affecting i18n
|
||||
wxString rateString = wxString::Format(wxT("%.3f"), rate);
|
||||
/* i18n-hint: The string names a track */
|
||||
ProjectManager::Get( *project )
|
||||
ProjectHistory::Get( *project )
|
||||
.PushState(wxString::Format(_("Changed '%s' to %s Hz"),
|
||||
pTrack->GetName(), rateString),
|
||||
_("Rate Change"));
|
||||
|
@ -743,7 +743,7 @@ void WaveTrackMenuTable::OnSetDisplay(wxCommandEvent & event)
|
|||
}
|
||||
|
||||
AudacityProject *const project = ::GetActiveProject();
|
||||
ProjectManager::Get( *project ).ModifyState(true);
|
||||
ProjectHistory::Get( *project ).ModifyState(true);
|
||||
|
||||
using namespace RefreshCode;
|
||||
mpData->result = RefreshAll | UpdateVRuler;
|
||||
|
@ -798,7 +798,7 @@ void WaveTrackMenuTable::OnSpectrogramSettings(wxCommandEvent &)
|
|||
if (0 != dialog.ShowModal()) {
|
||||
// Redraw
|
||||
AudacityProject *const project = ::GetActiveProject();
|
||||
ProjectManager::Get( *project ).ModifyState(true);
|
||||
ProjectHistory::Get( *project ).ModifyState(true);
|
||||
//Bug 1725 Toolbar was left greyed out.
|
||||
//This solution is overkill, but does fix the problem and is what the
|
||||
//prefs dialog normally does.
|
||||
|
@ -834,10 +834,11 @@ void WaveTrackMenuTable::OnChannelChange(wxCommandEvent & event)
|
|||
pTrack->SetChannel(channel);
|
||||
AudacityProject *const project = ::GetActiveProject();
|
||||
/* i18n-hint: The strings name a track and a channel choice (mono, left, or right) */
|
||||
project->PushState(wxString::Format(_("Changed '%s' to %s"),
|
||||
pTrack->GetName(),
|
||||
channelmsg),
|
||||
_("Channel"));
|
||||
ProjectHistory::Get( *project )
|
||||
.PushState(wxString::Format(_("Changed '%s' to %s"),
|
||||
pTrack->GetName(),
|
||||
channelmsg),
|
||||
_("Channel"));
|
||||
mpData->result = RefreshCode::RefreshAll;
|
||||
}
|
||||
#endif
|
||||
|
@ -884,7 +885,7 @@ void WaveTrackMenuTable::OnMergeStereo(wxCommandEvent &)
|
|||
}
|
||||
|
||||
/* i18n-hint: The string names a track */
|
||||
ProjectManager::Get( *project )
|
||||
ProjectHistory::Get( *project )
|
||||
.PushState(wxString::Format(_("Made '%s' a stereo track"),
|
||||
pTrack->GetName()),
|
||||
_("Make Stereo"));
|
||||
|
@ -953,7 +954,7 @@ void WaveTrackMenuTable::OnSwapChannels(wxCommandEvent &)
|
|||
trackPanel.SetFocusedTrack(partner);
|
||||
|
||||
/* i18n-hint: The string names a track */
|
||||
ProjectManager::Get( *project )
|
||||
ProjectHistory::Get( *project )
|
||||
.PushState(wxString::Format(_("Swapped Channels in '%s'"),
|
||||
pTrack->GetName()),
|
||||
_("Swap Channels"));
|
||||
|
@ -968,7 +969,7 @@ void WaveTrackMenuTable::OnSplitStereo(wxCommandEvent &)
|
|||
WaveTrack *const pTrack = static_cast<WaveTrack*>(mpData->pTrack);
|
||||
AudacityProject *const project = ::GetActiveProject();
|
||||
/* i18n-hint: The string names a track */
|
||||
ProjectManager::Get( *project )
|
||||
ProjectHistory::Get( *project )
|
||||
.PushState(wxString::Format(_("Split stereo track '%s'"),
|
||||
pTrack->GetName()),
|
||||
_("Split"));
|
||||
|
@ -984,7 +985,7 @@ void WaveTrackMenuTable::OnSplitStereoMono(wxCommandEvent &)
|
|||
WaveTrack *const pTrack = static_cast<WaveTrack*>(mpData->pTrack);
|
||||
AudacityProject *const project = ::GetActiveProject();
|
||||
/* i18n-hint: The string names a track */
|
||||
ProjectManager::Get( *project ).
|
||||
ProjectHistory::Get( *project ).
|
||||
PushState(wxString::Format(_("Split Stereo to Mono '%s'"),
|
||||
pTrack->GetName()),
|
||||
_("Split to Mono"));
|
||||
|
|
|
@ -11,7 +11,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../../../Audacity.h"
|
||||
#include "WaveTrackSliderHandles.h"
|
||||
|
||||
#include "../../../../ProjectManager.h"
|
||||
#include "../../../../ProjectHistory.h"
|
||||
#include "../../../../RefreshCode.h"
|
||||
#include "../../../../TrackPanel.h"
|
||||
#include "../../../../UndoManager.h"
|
||||
|
@ -57,7 +57,7 @@ UIHandle::Result GainSliderHandle::SetValue
|
|||
UIHandle::Result GainSliderHandle::CommitChanges
|
||||
(const wxMouseEvent &, AudacityProject *pProject)
|
||||
{
|
||||
ProjectManager::Get( *pProject )
|
||||
ProjectHistory::Get( *pProject )
|
||||
.PushState(_("Moved gain slider"), _("Gain"), UndoPush::CONSOLIDATE);
|
||||
return RefreshCode::RefreshCell;
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ UIHandle::Result PanSliderHandle::SetValue(AudacityProject *pProject, float newV
|
|||
UIHandle::Result PanSliderHandle::CommitChanges
|
||||
(const wxMouseEvent &, AudacityProject *pProject)
|
||||
{
|
||||
ProjectManager::Get( *pProject )
|
||||
ProjectHistory::Get( *pProject )
|
||||
.PushState(_("Moved pan slider"), _("Pan"), UndoPush::CONSOLIDATE);
|
||||
return RefreshCode::RefreshCell;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../../../NumberScale.h"
|
||||
#include "../../../../prefs/SpectrogramSettings.h"
|
||||
#include "../../../../prefs/WaveformSettings.h"
|
||||
#include "../../../../ProjectManager.h"
|
||||
#include "../../../../ProjectHistory.h"
|
||||
#include "../../../../RefreshCode.h"
|
||||
#include "../../../../TrackPanelMouseEvent.h"
|
||||
#include "../../../../WaveTrack.h"
|
||||
|
@ -186,7 +186,7 @@ unsigned WaveTrackVRulerControls::HandleWheelRotation
|
|||
else
|
||||
return RefreshNone;
|
||||
|
||||
ProjectManager::Get( *pProject ).ModifyState(true);
|
||||
ProjectHistory::Get( *pProject ).ModifyState(true);
|
||||
|
||||
return RefreshCell | UpdateVRuler;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../../../prefs/SpectrogramSettings.h"
|
||||
#include "../../../../prefs/WaveformSettings.h"
|
||||
#include "../../../../Project.h"
|
||||
#include "../../../../ProjectManager.h"
|
||||
#include "../../../../ProjectHistory.h"
|
||||
#include "../../../../RefreshCode.h"
|
||||
#include "../../../../TrackPanelMouseEvent.h"
|
||||
#include "../../../../WaveTrack.h"
|
||||
|
@ -333,7 +333,7 @@ void WaveTrackVZoomHandle::DoZoom
|
|||
|
||||
zoomEnd = zoomStart = 0;
|
||||
if( pProject )
|
||||
ProjectManager::Get( *pProject ).ModifyState(true);
|
||||
ProjectHistory::Get( *pProject ).ModifyState(true);
|
||||
}
|
||||
|
||||
enum {
|
||||
|
@ -479,7 +479,7 @@ void WaveformVRulerMenuTable::OnWaveformScaleType(wxCommandEvent &evt)
|
|||
channel->GetIndependentWaveformSettings().scaleType = newScaleType;
|
||||
}
|
||||
|
||||
ProjectManager::Get( *::GetActiveProject() ).ModifyState(true);
|
||||
ProjectHistory::Get( *::GetActiveProject() ).ModifyState(true);
|
||||
|
||||
using namespace RefreshCode;
|
||||
mpData->result = UpdateVRuler | RefreshAll;
|
||||
|
@ -551,7 +551,7 @@ void SpectrumVRulerMenuTable::OnSpectrumScaleType(wxCommandEvent &evt)
|
|||
for (auto channel : TrackList::Channels(wt))
|
||||
channel->GetIndependentSpectrogramSettings().scaleType = newScaleType;
|
||||
|
||||
ProjectManager::Get( *::GetActiveProject() ).ModifyState(true);
|
||||
ProjectHistory::Get( *::GetActiveProject() ).ModifyState(true);
|
||||
|
||||
using namespace RefreshCode;
|
||||
mpData->result = UpdateVRuler | RefreshAll;
|
||||
|
|
|
@ -13,7 +13,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
|
||||
#include "../../../HitTestResult.h"
|
||||
#include "../../../Project.h"
|
||||
#include "../../../ProjectManager.h"
|
||||
#include "../../../ProjectHistory.h"
|
||||
#include "../../../RefreshCode.h"
|
||||
#include "../../../TimeTrack.h"
|
||||
#include "../../../widgets/PopupMenuTable.h"
|
||||
|
@ -105,7 +105,7 @@ void TimeTrackMenuTable::OnSetTimeTrackRange(wxCommandEvent & /*event*/)
|
|||
AudacityProject *const project = ::GetActiveProject();
|
||||
pTrack->SetRangeLower((double)lower / 100.0);
|
||||
pTrack->SetRangeUpper((double)upper / 100.0);
|
||||
ProjectManager::Get( *project )
|
||||
ProjectHistory::Get( *project )
|
||||
.PushState(wxString::Format(_("Set range to '%ld' - '%ld'"),
|
||||
lower,
|
||||
upper),
|
||||
|
@ -121,7 +121,7 @@ void TimeTrackMenuTable::OnTimeTrackLin(wxCommandEvent & /*event*/)
|
|||
TimeTrack *const pTrack = static_cast<TimeTrack*>(mpData->pTrack);
|
||||
pTrack->SetDisplayLog(false);
|
||||
AudacityProject *const project = ::GetActiveProject();
|
||||
ProjectManager::Get( *project )
|
||||
ProjectHistory::Get( *project )
|
||||
.PushState(_("Set time track display to linear"), _("Set Display"));
|
||||
|
||||
using namespace RefreshCode;
|
||||
|
@ -133,7 +133,7 @@ void TimeTrackMenuTable::OnTimeTrackLog(wxCommandEvent & /*event*/)
|
|||
TimeTrack *const pTrack = static_cast<TimeTrack*>(mpData->pTrack);
|
||||
pTrack->SetDisplayLog(true);
|
||||
AudacityProject *const project = ::GetActiveProject();
|
||||
ProjectManager::Get( *project )
|
||||
ProjectHistory::Get( *project )
|
||||
.PushState(_("Set time track display to logarithmic"), _("Set Display"));
|
||||
|
||||
using namespace RefreshCode;
|
||||
|
@ -146,12 +146,12 @@ void TimeTrackMenuTable::OnTimeTrackLogInt(wxCommandEvent & /*event*/)
|
|||
AudacityProject *const project = ::GetActiveProject();
|
||||
if (pTrack->GetInterpolateLog()) {
|
||||
pTrack->SetInterpolateLog(false);
|
||||
ProjectManager::Get( *project )
|
||||
ProjectHistory::Get( *project )
|
||||
.PushState(_("Set time track interpolation to linear"), _("Set Interpolation"));
|
||||
}
|
||||
else {
|
||||
pTrack->SetInterpolateLog(true);
|
||||
ProjectManager::Get( *project ).
|
||||
ProjectHistory::Get( *project ).
|
||||
PushState(_("Set time track interpolation to logarithmic"), _("Set Interpolation"));
|
||||
}
|
||||
mpData->result = RefreshCode::RefreshAll;
|
||||
|
|
|
@ -17,7 +17,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../HitTestResult.h"
|
||||
#include "../../prefs/WaveformSettings.h"
|
||||
#include "../../ProjectAudioIO.h"
|
||||
#include "../../ProjectManager.h"
|
||||
#include "../../ProjectHistory.h"
|
||||
#include "../../RefreshCode.h"
|
||||
#include "../../TimeTrack.h"
|
||||
#include "../../TrackArtist.h"
|
||||
|
@ -287,7 +287,7 @@ UIHandle::Result EnvelopeHandle::Release
|
|||
|
||||
const bool needUpdate = ForwardEventToEnvelopes(event, viewInfo);
|
||||
|
||||
ProjectManager::Get( *pProject ).PushState(
|
||||
ProjectHistory::Get( *pProject ).PushState(
|
||||
/* i18n-hint: (verb) Audacity has just adjusted the envelope .*/
|
||||
_("Adjusted envelope."),
|
||||
/* i18n-hint: The envelope is a curve that controls the audio loudness.*/
|
||||
|
@ -302,7 +302,7 @@ UIHandle::Result EnvelopeHandle::Release
|
|||
|
||||
UIHandle::Result EnvelopeHandle::Cancel(AudacityProject *pProject)
|
||||
{
|
||||
ProjectManager::Get( *pProject ).RollbackState();
|
||||
ProjectHistory::Get( *pProject ).RollbackState();
|
||||
mEnvelopeEditors.clear();
|
||||
return RefreshCode::RefreshCell;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../Menus.h"
|
||||
#include "../../Project.h"
|
||||
#include "../../ProjectAudioIO.h"
|
||||
#include "../../ProjectManager.h"
|
||||
#include "../../ProjectAudioManager.h"
|
||||
#include "../../TrackPanel.h"
|
||||
#include "../../ViewInfo.h"
|
||||
#include "../../prefs/PlaybackPrefs.h"
|
||||
|
|
|
@ -22,7 +22,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../NumberScale.h"
|
||||
#include "../../Project.h"
|
||||
#include "../../ProjectAudioIO.h"
|
||||
#include "../../ProjectManager.h"
|
||||
#include "../../ProjectHistory.h"
|
||||
#include "../../ProjectSettings.h"
|
||||
#include "../../ProjectWindow.h"
|
||||
#include "../../RefreshCode.h"
|
||||
|
@ -581,7 +581,7 @@ UIHandle::Result SelectHandle::Click
|
|||
}
|
||||
} );
|
||||
|
||||
ProjectManager::Get( *pProject ).ModifyState(false);
|
||||
ProjectHistory::Get( *pProject ).ModifyState(false);
|
||||
|
||||
// Do not start a drag
|
||||
return RefreshAll | UpdateSelection | Cancelled;
|
||||
|
@ -666,7 +666,7 @@ UIHandle::Result SelectHandle::Click
|
|||
};
|
||||
|
||||
// For persistence of the selection change:
|
||||
ProjectManager::Get( *pProject ).ModifyState(false);
|
||||
ProjectHistory::Get( *pProject ).ModifyState(false);
|
||||
|
||||
// Get timer events so we can auto-scroll
|
||||
Connect(pProject);
|
||||
|
@ -704,7 +704,7 @@ UIHandle::Result SelectHandle::Click
|
|||
static_cast<WaveTrack*>(pTrack),
|
||||
viewInfo, event.m_y, mRect.y, mRect.height);
|
||||
// For persistence of the selection change:
|
||||
ProjectManager::Get( *pProject ).ModifyState(false);
|
||||
ProjectHistory::Get( *pProject ).ModifyState(false);
|
||||
mSelectionBoundary = SBWidth;
|
||||
return UpdateSelection;
|
||||
}
|
||||
|
@ -988,7 +988,7 @@ UIHandle::Result SelectHandle::Release
|
|||
wxWindow *)
|
||||
{
|
||||
using namespace RefreshCode;
|
||||
ProjectManager::Get( *pProject ).ModifyState(false);
|
||||
ProjectHistory::Get( *pProject ).ModifyState(false);
|
||||
mFrequencySnapper.reset();
|
||||
mSnapManager.reset();
|
||||
if (mSelectionStateChanger) {
|
||||
|
@ -1128,7 +1128,7 @@ void SelectHandle::StartSelection( AudacityProject *pProject )
|
|||
// PRL: commented out the Sonify stuff with the TrackPanel refactor.
|
||||
// It was no-op anyway.
|
||||
//SonifyBeginModifyState();
|
||||
ProjectManager::Get( *pProject ).ModifyState(false);
|
||||
ProjectHistory::Get( *pProject ).ModifyState(false);
|
||||
//SonifyEndModifyState();
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../HitTestResult.h"
|
||||
#include "../../NoteTrack.h"
|
||||
#include "../../ProjectAudioIO.h"
|
||||
#include "../../ProjectManager.h"
|
||||
#include "../../ProjectHistory.h"
|
||||
#include "../../ProjectSettings.h"
|
||||
#include "../../RefreshCode.h"
|
||||
#include "../../TrackPanelMouseEvent.h"
|
||||
|
@ -835,7 +835,7 @@ UIHandle::Result TimeShiftHandle::Release
|
|||
fabs( mClipMoveState.hSlideAmount ) );
|
||||
consolidate = true;
|
||||
}
|
||||
ProjectManager::Get( *pProject ).PushState(msg, _("Time-Shift"),
|
||||
ProjectHistory::Get( *pProject ).PushState(msg, _("Time-Shift"),
|
||||
consolidate ? (UndoPush::CONSOLIDATE) : (UndoPush::AUTOSAVE));
|
||||
|
||||
return result | FixScrollbars;
|
||||
|
@ -843,7 +843,7 @@ UIHandle::Result TimeShiftHandle::Release
|
|||
|
||||
UIHandle::Result TimeShiftHandle::Cancel(AudacityProject *pProject)
|
||||
{
|
||||
ProjectManager::Get( *pProject ).RollbackState();
|
||||
ProjectHistory::Get( *pProject ).RollbackState();
|
||||
return RefreshCode::RefreshAll;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../Menus.h"
|
||||
#include "../../Project.h"
|
||||
#include "../../ProjectAudioIO.h"
|
||||
#include "../../ProjectManager.h"
|
||||
#include "../../ProjectHistory.h"
|
||||
#include "../../RefreshCode.h"
|
||||
#include "../../Track.h"
|
||||
#include "../../TrackPanel.h"
|
||||
|
@ -40,7 +40,7 @@ UIHandle::Result MinimizeButtonHandle::CommitChanges
|
|||
bool wasMinimized = pTrack->GetMinimized();
|
||||
for (auto channel : TrackList::Channels(pTrack.get()))
|
||||
channel->SetMinimized(!wasMinimized);
|
||||
ProjectManager::Get( *pProject ).ModifyState(true);
|
||||
ProjectHistory::Get( *pProject ).ModifyState(true);
|
||||
|
||||
// Redraw all tracks when any one of them expands or contracts
|
||||
// (Could we invent a return code that draws only those at or below
|
||||
|
|
|
@ -16,7 +16,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../RefreshCode.h"
|
||||
#include "../../Menus.h"
|
||||
#include "../../Project.h"
|
||||
#include "../../ProjectManager.h"
|
||||
#include "../../ProjectHistory.h"
|
||||
#include "../../TrackPanel.h" // for TrackInfo
|
||||
#include "../../TrackPanelMouseEvent.h"
|
||||
#include <wx/textdlg.h>
|
||||
|
@ -223,7 +223,7 @@ void TrackMenuTable::OnSetName(wxCommandEvent &)
|
|||
for (auto channel : TrackList::Channels(pTrack))
|
||||
channel->SetName(newName);
|
||||
|
||||
ProjectManager::Get( *proj )
|
||||
ProjectHistory::Get( *proj )
|
||||
.PushState(wxString::Format(_("Renamed '%s' to '%s'"),
|
||||
oldName,
|
||||
newName),
|
||||
|
|
|
@ -15,7 +15,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../Menus.h"
|
||||
#include "../../Project.h"
|
||||
#include "../../ProjectAudioIO.h"
|
||||
#include "../../ProjectManager.h"
|
||||
#include "../../ProjectHistory.h"
|
||||
#include "../../RefreshCode.h"
|
||||
#include "../../TrackPanel.h"
|
||||
#include "../../TrackPanelMouseEvent.h"
|
||||
|
@ -181,7 +181,7 @@ UIHandle::Result TrackSelectHandle::Release
|
|||
wxASSERT( mpTrack );
|
||||
if (mRearrangeCount != 0) {
|
||||
AudacityProject *const project = ::GetActiveProject();
|
||||
ProjectManager::Get( *project ).PushState(
|
||||
ProjectHistory::Get( *project ).PushState(
|
||||
wxString::Format(
|
||||
/* i18n-hint: will substitute name of track for %s */
|
||||
( mRearrangeCount < 0 ? _("Moved '%s' up") : _("Moved '%s' down") ),
|
||||
|
@ -200,7 +200,7 @@ UIHandle::Result TrackSelectHandle::Release
|
|||
|
||||
UIHandle::Result TrackSelectHandle::Cancel(AudacityProject *pProject)
|
||||
{
|
||||
ProjectManager::Get( *pProject ).RollbackState();
|
||||
ProjectHistory::Get( *pProject ).RollbackState();
|
||||
// Bug 1677
|
||||
mpTrack.reset();
|
||||
return RefreshCode::RefreshAll;
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
#include "../ImageManipulation.h"
|
||||
#include "../prefs/GUISettings.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectAudioManager.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
|
|
|
@ -130,6 +130,7 @@
|
|||
<ClCompile Include="..\..\..\src\AudacityLogger.cpp" />
|
||||
<ClCompile Include="..\..\..\src\AudioIO.cpp" />
|
||||
<ClCompile Include="..\..\..\src\AutoRecovery.cpp" />
|
||||
<ClCompile Include="..\..\..\src\AutoRecoveryDialog.cpp" />
|
||||
<ClCompile Include="..\..\..\src\BatchCommandDialog.cpp" />
|
||||
<ClCompile Include="..\..\..\src\BatchCommands.cpp" />
|
||||
<ClCompile Include="..\..\..\src\BatchProcessDialog.cpp" />
|
||||
|
@ -222,10 +223,14 @@
|
|||
<ClCompile Include="..\..\..\src\Profiler.cpp" />
|
||||
<ClCompile Include="..\..\..\src\Project.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectAudioIO.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectAudioManager.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectFileIO.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectFileIORegistry.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectFileManager.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectFSCK.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectHistory.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectManager.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectSelectionManager.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectSettings.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectWindow.cpp" />
|
||||
<ClCompile Include="..\..\..\src\RealFFTf.cpp" />
|
||||
|
@ -502,6 +507,7 @@
|
|||
<ClInclude Include="..\..\..\src\AudioIO.h" />
|
||||
<ClInclude Include="..\..\..\src\AudioIOListener.h" />
|
||||
<ClInclude Include="..\..\..\src\AutoRecovery.h" />
|
||||
<ClInclude Include="..\..\..\src\AutoRecoveryDialog.h" />
|
||||
<ClInclude Include="..\..\..\src\BatchCommandDialog.h" />
|
||||
<ClInclude Include="..\..\..\src\BatchCommands.h" />
|
||||
<ClInclude Include="..\..\..\src\BatchProcessDialog.h" />
|
||||
|
@ -537,7 +543,6 @@
|
|||
<ClInclude Include="..\..\..\src\HitTestResult.h" />
|
||||
<ClInclude Include="..\..\..\src\import\FormatClassifier.h" />
|
||||
<ClInclude Include="..\..\..\src\import\ImportForwards.h" />
|
||||
<ClInclude Include="..\..\..\src\import\ImportGStreamer.h" />
|
||||
<ClInclude Include="..\..\..\src\import\MultiFormatReader.h" />
|
||||
<ClInclude Include="..\..\..\src\import\SpecPowerMeter.h" />
|
||||
<ClInclude Include="..\..\..\src\InconsistencyException.h" />
|
||||
|
@ -654,10 +659,14 @@
|
|||
<ClInclude Include="..\..\..\src\Profiler.h" />
|
||||
<ClInclude Include="..\..\..\src\Project.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectAudioIO.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectAudioManager.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectFileIO.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectFileIORegistry.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectFileManager.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectFSCK.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectHistory.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectManager.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectSelectionManager.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectSettings.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectWindow.h" />
|
||||
<ClInclude Include="..\..\..\src\RealFFTf.h" />
|
||||
|
@ -742,13 +751,7 @@
|
|||
<ClInclude Include="..\..\..\src\export\ExportOGG.h" />
|
||||
<ClInclude Include="..\..\..\src\export\ExportPCM.h" />
|
||||
<ClInclude Include="..\..\..\src\import\Import.h" />
|
||||
<ClInclude Include="..\..\..\src\import\ImportFFmpeg.h" />
|
||||
<ClInclude Include="..\..\..\src\import\ImportFLAC.h" />
|
||||
<ClInclude Include="..\..\..\src\import\ImportLOF.h" />
|
||||
<ClInclude Include="..\..\..\src\import\ImportMIDI.h" />
|
||||
<ClInclude Include="..\..\..\src\import\ImportMP3.h" />
|
||||
<ClInclude Include="..\..\..\src\import\ImportOGG.h" />
|
||||
<ClInclude Include="..\..\..\src\import\ImportPCM.h" />
|
||||
<ClInclude Include="..\..\..\src\import\ImportPlugin.h" />
|
||||
<ClInclude Include="..\..\..\src\import\ImportRaw.h" />
|
||||
<ClInclude Include="..\..\..\src\import\RawAudioGuess.h" />
|
||||
|
|
|
@ -131,6 +131,9 @@
|
|||
<ClCompile Include="..\..\..\src\AutoRecovery.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\AutoRecoveryDialog.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\BatchCommandDialog.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
|
@ -263,18 +266,30 @@
|
|||
<ClCompile Include="..\..\..\src\ProjectAudioIO.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ProjectAudioManager.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ProjectFileIO.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ProjectFileIORegistry.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ProjectFileManager.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ProjectFSCK.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ProjectHistory.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ProjectManager.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ProjectSelectionManager.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ProjectSettings.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
|
@ -1198,6 +1213,9 @@
|
|||
<ClInclude Include="..\..\..\src\AutoRecovery.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\AutoRecoveryDialog.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\BatchCommandDialog.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
|
@ -1336,18 +1354,30 @@
|
|||
<ClInclude Include="..\..\..\src\ProjectAudioIO.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ProjectAudioManager.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ProjectFileIO.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ProjectFileIORegistry.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ProjectFileManager.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ProjectFSCK.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ProjectHistory.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ProjectManager.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ProjectSelectionManager.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ProjectSettings.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
|
@ -1600,27 +1630,9 @@
|
|||
<ClInclude Include="..\..\..\src\import\Import.h">
|
||||
<Filter>src\import</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\import\ImportFFmpeg.h">
|
||||
<Filter>src\import</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\import\ImportFLAC.h">
|
||||
<Filter>src\import</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\import\ImportLOF.h">
|
||||
<Filter>src\import</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\import\ImportMIDI.h">
|
||||
<Filter>src\import</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\import\ImportMP3.h">
|
||||
<Filter>src\import</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\import\ImportOGG.h">
|
||||
<Filter>src\import</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\import\ImportPCM.h">
|
||||
<Filter>src\import</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\import\ImportPlugin.h">
|
||||
<Filter>src\import</Filter>
|
||||
</ClInclude>
|
||||
|
@ -1918,9 +1930,6 @@
|
|||
<ClInclude Include="..\..\..\src\SseMathFuncs.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\import\ImportGStreamer.h">
|
||||
<Filter>src\import</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\widgets\HelpSystem.h">
|
||||
<Filter>src\widgets</Filter>
|
||||
</ClInclude>
|
||||
|
|
Loading…
Reference in New Issue