1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 16:40:07 +02:00

Split AutoRecoveryDialog.cpp from AutoRecovery.cpp...

... leaving AutoRecovery as a lower-level file, to be used by ProjectHistory
for auto-save, and not including ProjectManager.

The new file floats to a high level of the graph, but AutoRecovery.cpp
remains in the big strongly connected component.
This commit is contained in:
Paul Licameli 2019-06-06 11:21:15 -04:00
parent f03684db4f
commit 0c6cda50c3
11 changed files with 406 additions and 338 deletions

View File

@ -44,6 +44,8 @@ src/AudioIO.h
src/AudioIOListener.h src/AudioIOListener.h
src/AutoRecovery.cpp src/AutoRecovery.cpp
src/AutoRecovery.h src/AutoRecovery.h
src/AutoRecoveryDialog.cpp
src/AutoRecoveryDialog.h
src/BatchCommandDialog.cpp src/BatchCommandDialog.cpp
src/BatchCommandDialog.h src/BatchCommandDialog.h
src/BatchCommands.cpp src/BatchCommands.cpp

View File

@ -1232,6 +1232,7 @@
5E18CFF02291C31000E75250 /* ProjectFileIORegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E18CFEE2291C31000E75250 /* ProjectFileIORegistry.cpp */; }; 5E18CFF02291C31000E75250 /* ProjectFileIORegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E18CFEE2291C31000E75250 /* ProjectFileIORegistry.cpp */; };
5E18CFF322931D3D00E75250 /* AudacityMessageBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E18CFF222931D3D00E75250 /* AudacityMessageBox.cpp */; }; 5E18CFF322931D3D00E75250 /* AudacityMessageBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E18CFF222931D3D00E75250 /* AudacityMessageBox.cpp */; };
5E19D655217D51190024D0B1 /* PluginMenus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E19D64C217D51190024D0B1 /* PluginMenus.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 */; }; 5E2A19941EED688500217B58 /* SelectionState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E2A19921EED688500217B58 /* SelectionState.cpp */; };
5E36A0A8217FA2430068E082 /* EditMenus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E36A09F217FA2430068E082 /* EditMenus.cpp */; }; 5E36A0A8217FA2430068E082 /* EditMenus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E36A09F217FA2430068E082 /* EditMenus.cpp */; };
5E36A0A9217FA2430068E082 /* ExtraMenus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E36A0A0217FA2430068E082 /* ExtraMenus.cpp */; }; 5E36A0A9217FA2430068E082 /* ExtraMenus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E36A0A0217FA2430068E082 /* ExtraMenus.cpp */; };
@ -3222,6 +3223,8 @@
5E18CFF122931CA900E75250 /* AudacityMessageBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudacityMessageBox.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>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; 5E36A09F217FA2430068E082 /* EditMenus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EditMenus.cpp; path = menus/EditMenus.cpp; sourceTree = "<group>"; };
@ -4328,6 +4331,7 @@
28C3946B1818356800FDDAC9 /* AudacityLogger.cpp */, 28C3946B1818356800FDDAC9 /* AudacityLogger.cpp */,
1790AFD209883BFD008A330A /* AudioIO.cpp */, 1790AFD209883BFD008A330A /* AudioIO.cpp */,
28560C8F0A75E40F00A3429E /* AutoRecovery.cpp */, 28560C8F0A75E40F00A3429E /* AutoRecovery.cpp */,
5E19F59722A9665500E3F88E /* AutoRecoveryDialog.cpp */,
1790AFD409883BFD008A330A /* BatchCommandDialog.cpp */, 1790AFD409883BFD008A330A /* BatchCommandDialog.cpp */,
1790AFD609883BFD008A330A /* BatchCommands.cpp */, 1790AFD609883BFD008A330A /* BatchCommands.cpp */,
1790AFD809883BFD008A330A /* BatchProcessDialog.cpp */, 1790AFD809883BFD008A330A /* BatchProcessDialog.cpp */,
@ -4437,6 +4441,7 @@
1790AFD309883BFD008A330A /* AudioIO.h */, 1790AFD309883BFD008A330A /* AudioIO.h */,
28F996D91A2A9261008FEEF3 /* AudioIOListener.h */, 28F996D91A2A9261008FEEF3 /* AudioIOListener.h */,
28560C900A75E40F00A3429E /* AutoRecovery.h */, 28560C900A75E40F00A3429E /* AutoRecovery.h */,
5E19F59822A9665500E3F88E /* AutoRecoveryDialog.h */,
1790AFD509883BFD008A330A /* BatchCommandDialog.h */, 1790AFD509883BFD008A330A /* BatchCommandDialog.h */,
1790AFD709883BFD008A330A /* BatchCommands.h */, 1790AFD709883BFD008A330A /* BatchCommands.h */,
1790AFD909883BFD008A330A /* BatchProcessDialog.h */, 1790AFD909883BFD008A330A /* BatchProcessDialog.h */,
@ -8521,6 +8526,7 @@
5EA0182C1EC7B226001F2996 /* WaveTrackUI.cpp in Sources */, 5EA0182C1EC7B226001F2996 /* WaveTrackUI.cpp in Sources */,
5E07842E1DEE6B8600CA76EA /* FileException.cpp in Sources */, 5E07842E1DEE6B8600CA76EA /* FileException.cpp in Sources */,
2860BA250E0F0D8600A13878 /* TimerRecordDialog.cpp in Sources */, 2860BA250E0F0D8600A13878 /* TimerRecordDialog.cpp in Sources */,
5E19F59922A9665500E3F88E /* AutoRecoveryDialog.cpp in Sources */,
2860BA280E0F0DD800A13878 /* ExportFFmpeg.cpp in Sources */, 2860BA280E0F0DD800A13878 /* ExportFFmpeg.cpp in Sources */,
5E36A0AB217FA2430068E082 /* NavigationMenus.cpp in Sources */, 5E36A0AB217FA2430068E082 /* NavigationMenus.cpp in Sources */,
28D587CB0E264CF4009C7DEA /* LoadLV2.cpp in Sources */, 28D587CB0E264CF4009C7DEA /* LoadLV2.cpp in Sources */,

View File

@ -96,6 +96,7 @@ It handles initialization and termination by subclassing wxApp.
#include "PlatformCompatibility.h" #include "PlatformCompatibility.h"
#include "FileNames.h" #include "FileNames.h"
#include "AutoRecovery.h" #include "AutoRecovery.h"
#include "AutoRecoveryDialog.h"
#include "SplashDialog.h" #include "SplashDialog.h"
#include "FFT.h" #include "FFT.h"
#include "BlockFile.h" #include "BlockFile.h"

View File

@ -21,261 +21,17 @@ text or binary format to a file.
#include "Audacity.h" #include "Audacity.h"
#include "AutoRecovery.h" #include "AutoRecovery.h"
#include "DirManager.h" #include "DirManager.h"
#include "FileNames.h"
#include "blockfile/SimpleBlockFile.h" #include "blockfile/SimpleBlockFile.h"
#include "ProjectManager.h"
#include "Sequence.h" #include "Sequence.h"
#include "ShuttleGui.h"
#include <wx/evtloop.h>
#include <wx/wxprec.h> #include <wx/wxprec.h>
#include <wx/filefn.h> #include <wx/filefn.h>
#include <wx/listctrl.h>
#include <wx/dir.h> #include <wx/dir.h>
#include <wx/dialog.h> #include <wx/dialog.h>
#include <wx/app.h> #include <wx/app.h>
#include "WaveClip.h" #include "WaveClip.h"
#include "WaveTrack.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 /// Recording recovery handler

View File

@ -21,22 +21,6 @@
class wxFFile; class wxFFile;
class AudacityProject; 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 // XML Handler for a <recordingrecovery> tag
// //

259
src/AutoRecoveryDialog.cpp Normal file
View File

@ -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;
}
}

32
src/AutoRecoveryDialog.h Normal file
View File

@ -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

View File

@ -115,6 +115,8 @@ audacity_SOURCES = \
AudioIOListener.h \ AudioIOListener.h \
AutoRecovery.cpp \ AutoRecovery.cpp \
AutoRecovery.h \ AutoRecovery.h \
AutoRecoveryDialog.cpp \
AutoRecoveryDialog.h \
BatchCommandDialog.cpp \ BatchCommandDialog.cpp \
BatchCommandDialog.h \ BatchCommandDialog.h \
BatchCommands.cpp \ BatchCommands.cpp \

View File

@ -294,45 +294,46 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \
AudacityApp.cpp AudacityApp.h AudacityException.cpp \ AudacityApp.cpp AudacityApp.h AudacityException.cpp \
AudacityException.h AudacityLogger.cpp AudacityLogger.h \ AudacityException.h AudacityLogger.cpp AudacityLogger.h \
AudioIO.cpp AudioIO.h AudioIOListener.h AutoRecovery.cpp \ AudioIO.cpp AudioIO.h AudioIOListener.h AutoRecovery.cpp \
AutoRecovery.h BatchCommandDialog.cpp BatchCommandDialog.h \ AutoRecovery.h AutoRecoveryDialog.cpp AutoRecoveryDialog.h \
BatchCommands.cpp BatchCommands.h BatchProcessDialog.cpp \ BatchCommandDialog.cpp BatchCommandDialog.h BatchCommands.cpp \
BatchProcessDialog.h Benchmark.cpp Benchmark.h \ BatchCommands.h BatchProcessDialog.cpp BatchProcessDialog.h \
CellularPanel.cpp CellularPanel.h ClientData.h \ Benchmark.cpp Benchmark.h CellularPanel.cpp CellularPanel.h \
ClientDataHelpers.h Clipboard.cpp Clipboard.h CrashReport.cpp \ ClientData.h ClientDataHelpers.h Clipboard.cpp Clipboard.h \
CrashReport.h Dependencies.cpp Dependencies.h DeviceChange.cpp \ CrashReport.cpp CrashReport.h Dependencies.cpp Dependencies.h \
DeviceChange.h DeviceManager.cpp DeviceManager.h Diags.cpp \ DeviceChange.cpp DeviceChange.h DeviceManager.cpp \
Diags.h Envelope.cpp Envelope.h Experimental.h FFmpeg.cpp \ DeviceManager.h Diags.cpp Diags.h Envelope.cpp Envelope.h \
FFmpeg.h FFT.cpp FFT.h FileException.cpp FileException.h \ Experimental.h FFmpeg.cpp FFmpeg.h FFT.cpp FFT.h \
FileIO.cpp FileIO.h FileNames.cpp FileNames.h float_cast.h \ FileException.cpp FileException.h FileIO.cpp FileIO.h \
FreqWindow.cpp FreqWindow.h HelpText.cpp HelpText.h \ FileNames.cpp FileNames.h float_cast.h FreqWindow.cpp \
HistoryWindow.cpp HistoryWindow.h HitTestResult.h \ FreqWindow.h HelpText.cpp HelpText.h HistoryWindow.cpp \
ImageManipulation.cpp ImageManipulation.h \ HistoryWindow.h HitTestResult.h ImageManipulation.cpp \
InconsistencyException.cpp InconsistencyException.h \ ImageManipulation.h InconsistencyException.cpp \
InterpolateAudio.cpp InterpolateAudio.h KeyboardCapture.cpp \ InconsistencyException.h InterpolateAudio.cpp \
KeyboardCapture.h LabelDialog.cpp LabelDialog.h LabelTrack.cpp \ InterpolateAudio.h KeyboardCapture.cpp KeyboardCapture.h \
LabelTrack.h LangChoice.cpp LangChoice.h Languages.cpp \ LabelDialog.cpp LabelDialog.h LabelTrack.cpp LabelTrack.h \
Languages.h Legacy.cpp Legacy.h Lyrics.cpp Lyrics.h \ LangChoice.cpp LangChoice.h Languages.cpp Languages.h \
LyricsWindow.cpp LyricsWindow.h MacroMagic.h Matrix.cpp \ Legacy.cpp Legacy.h Lyrics.cpp Lyrics.h LyricsWindow.cpp \
Matrix.h MemoryX.h Menus.cpp Menus.h \ LyricsWindow.h MacroMagic.h Matrix.cpp Matrix.h MemoryX.h \
MissingAliasFileDialog.cpp MissingAliasFileDialog.h Mix.cpp \ Menus.cpp Menus.h MissingAliasFileDialog.cpp \
Mix.h MixerBoard.cpp MixerBoard.h ModuleManager.cpp \ MissingAliasFileDialog.h Mix.cpp Mix.h MixerBoard.cpp \
ModuleManager.h NumberScale.h PitchName.cpp PitchName.h \ MixerBoard.h ModuleManager.cpp ModuleManager.h NumberScale.h \
PlatformCompatibility.cpp PlatformCompatibility.h \ PitchName.cpp PitchName.h PlatformCompatibility.cpp \
PluginManager.cpp PluginManager.h Printing.cpp Printing.h \ PlatformCompatibility.h PluginManager.cpp PluginManager.h \
Profiler.cpp Profiler.h Project.cpp Project.h \ Printing.cpp Printing.h Profiler.cpp Profiler.h Project.cpp \
ProjectAudioIO.cpp ProjectAudioIO.h ProjectAudioManager.cpp \ Project.h ProjectAudioIO.cpp ProjectAudioIO.h \
ProjectAudioManager.h ProjectFileIO.cpp ProjectFileIO.h \ ProjectAudioManager.cpp ProjectAudioManager.h \
ProjectFileIORegistry.cpp ProjectFileIORegistry.h \ ProjectFileIO.cpp ProjectFileIO.h ProjectFileIORegistry.cpp \
ProjectFSCK.cpp ProjectFSCK.h ProjectHistory.cpp \ ProjectFileIORegistry.h ProjectFSCK.cpp ProjectFSCK.h \
ProjectHistory.h ProjectManager.cpp ProjectManager.h \ ProjectHistory.cpp ProjectHistory.h ProjectManager.cpp \
ProjectSettings.cpp ProjectSettings.h ProjectWindow.cpp \ ProjectManager.h ProjectSettings.cpp ProjectSettings.h \
ProjectWindow.h RealFFTf.cpp RealFFTf.h RealFFTf48x.cpp \ ProjectWindow.cpp ProjectWindow.h RealFFTf.cpp RealFFTf.h \
RealFFTf48x.h RefreshCode.h Resample.cpp Resample.h \ RealFFTf48x.cpp RealFFTf48x.h RefreshCode.h Resample.cpp \
RevisionIdent.h RingBuffer.cpp RingBuffer.h Screenshot.cpp \ Resample.h RevisionIdent.h RingBuffer.cpp RingBuffer.h \
Screenshot.h SelectedRegion.cpp SelectedRegion.h \ Screenshot.cpp Screenshot.h SelectedRegion.cpp \
SelectionState.cpp SelectionState.h Shuttle.cpp Shuttle.h \ SelectedRegion.h SelectionState.cpp SelectionState.h \
ShuttleGetDefinition.cpp ShuttleGetDefinition.h ShuttleGui.cpp \ Shuttle.cpp Shuttle.h ShuttleGetDefinition.cpp \
ShuttleGui.h ShuttlePrefs.cpp ShuttlePrefs.h Snap.cpp Snap.h \ ShuttleGetDefinition.h ShuttleGui.cpp ShuttleGui.h \
ShuttlePrefs.cpp ShuttlePrefs.h Snap.cpp Snap.h \
SoundActivatedRecord.cpp SoundActivatedRecord.h Spectrum.cpp \ SoundActivatedRecord.cpp SoundActivatedRecord.h Spectrum.cpp \
Spectrum.h SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \ Spectrum.h SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \
SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \ SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \
@ -640,6 +641,7 @@ am_audacity_OBJECTS = $(am__objects_1) audacity-AboutDialog.$(OBJEXT) \
audacity-AudacityException.$(OBJEXT) \ audacity-AudacityException.$(OBJEXT) \
audacity-AudacityLogger.$(OBJEXT) audacity-AudioIO.$(OBJEXT) \ audacity-AudacityLogger.$(OBJEXT) audacity-AudioIO.$(OBJEXT) \
audacity-AutoRecovery.$(OBJEXT) \ audacity-AutoRecovery.$(OBJEXT) \
audacity-AutoRecoveryDialog.$(OBJEXT) \
audacity-BatchCommandDialog.$(OBJEXT) \ audacity-BatchCommandDialog.$(OBJEXT) \
audacity-BatchCommands.$(OBJEXT) \ audacity-BatchCommands.$(OBJEXT) \
audacity-BatchProcessDialog.$(OBJEXT) \ audacity-BatchProcessDialog.$(OBJEXT) \
@ -1367,45 +1369,46 @@ audacity_SOURCES = $(libaudacity_la_SOURCES) AboutDialog.cpp \
AudacityApp.cpp AudacityApp.h AudacityException.cpp \ AudacityApp.cpp AudacityApp.h AudacityException.cpp \
AudacityException.h AudacityLogger.cpp AudacityLogger.h \ AudacityException.h AudacityLogger.cpp AudacityLogger.h \
AudioIO.cpp AudioIO.h AudioIOListener.h AutoRecovery.cpp \ AudioIO.cpp AudioIO.h AudioIOListener.h AutoRecovery.cpp \
AutoRecovery.h BatchCommandDialog.cpp BatchCommandDialog.h \ AutoRecovery.h AutoRecoveryDialog.cpp AutoRecoveryDialog.h \
BatchCommands.cpp BatchCommands.h BatchProcessDialog.cpp \ BatchCommandDialog.cpp BatchCommandDialog.h BatchCommands.cpp \
BatchProcessDialog.h Benchmark.cpp Benchmark.h \ BatchCommands.h BatchProcessDialog.cpp BatchProcessDialog.h \
CellularPanel.cpp CellularPanel.h ClientData.h \ Benchmark.cpp Benchmark.h CellularPanel.cpp CellularPanel.h \
ClientDataHelpers.h Clipboard.cpp Clipboard.h CrashReport.cpp \ ClientData.h ClientDataHelpers.h Clipboard.cpp Clipboard.h \
CrashReport.h Dependencies.cpp Dependencies.h DeviceChange.cpp \ CrashReport.cpp CrashReport.h Dependencies.cpp Dependencies.h \
DeviceChange.h DeviceManager.cpp DeviceManager.h Diags.cpp \ DeviceChange.cpp DeviceChange.h DeviceManager.cpp \
Diags.h Envelope.cpp Envelope.h Experimental.h FFmpeg.cpp \ DeviceManager.h Diags.cpp Diags.h Envelope.cpp Envelope.h \
FFmpeg.h FFT.cpp FFT.h FileException.cpp FileException.h \ Experimental.h FFmpeg.cpp FFmpeg.h FFT.cpp FFT.h \
FileIO.cpp FileIO.h FileNames.cpp FileNames.h float_cast.h \ FileException.cpp FileException.h FileIO.cpp FileIO.h \
FreqWindow.cpp FreqWindow.h HelpText.cpp HelpText.h \ FileNames.cpp FileNames.h float_cast.h FreqWindow.cpp \
HistoryWindow.cpp HistoryWindow.h HitTestResult.h \ FreqWindow.h HelpText.cpp HelpText.h HistoryWindow.cpp \
ImageManipulation.cpp ImageManipulation.h \ HistoryWindow.h HitTestResult.h ImageManipulation.cpp \
InconsistencyException.cpp InconsistencyException.h \ ImageManipulation.h InconsistencyException.cpp \
InterpolateAudio.cpp InterpolateAudio.h KeyboardCapture.cpp \ InconsistencyException.h InterpolateAudio.cpp \
KeyboardCapture.h LabelDialog.cpp LabelDialog.h LabelTrack.cpp \ InterpolateAudio.h KeyboardCapture.cpp KeyboardCapture.h \
LabelTrack.h LangChoice.cpp LangChoice.h Languages.cpp \ LabelDialog.cpp LabelDialog.h LabelTrack.cpp LabelTrack.h \
Languages.h Legacy.cpp Legacy.h Lyrics.cpp Lyrics.h \ LangChoice.cpp LangChoice.h Languages.cpp Languages.h \
LyricsWindow.cpp LyricsWindow.h MacroMagic.h Matrix.cpp \ Legacy.cpp Legacy.h Lyrics.cpp Lyrics.h LyricsWindow.cpp \
Matrix.h MemoryX.h Menus.cpp Menus.h \ LyricsWindow.h MacroMagic.h Matrix.cpp Matrix.h MemoryX.h \
MissingAliasFileDialog.cpp MissingAliasFileDialog.h Mix.cpp \ Menus.cpp Menus.h MissingAliasFileDialog.cpp \
Mix.h MixerBoard.cpp MixerBoard.h ModuleManager.cpp \ MissingAliasFileDialog.h Mix.cpp Mix.h MixerBoard.cpp \
ModuleManager.h NumberScale.h PitchName.cpp PitchName.h \ MixerBoard.h ModuleManager.cpp ModuleManager.h NumberScale.h \
PlatformCompatibility.cpp PlatformCompatibility.h \ PitchName.cpp PitchName.h PlatformCompatibility.cpp \
PluginManager.cpp PluginManager.h Printing.cpp Printing.h \ PlatformCompatibility.h PluginManager.cpp PluginManager.h \
Profiler.cpp Profiler.h Project.cpp Project.h \ Printing.cpp Printing.h Profiler.cpp Profiler.h Project.cpp \
ProjectAudioIO.cpp ProjectAudioIO.h ProjectAudioManager.cpp \ Project.h ProjectAudioIO.cpp ProjectAudioIO.h \
ProjectAudioManager.h ProjectFileIO.cpp ProjectFileIO.h \ ProjectAudioManager.cpp ProjectAudioManager.h \
ProjectFileIORegistry.cpp ProjectFileIORegistry.h \ ProjectFileIO.cpp ProjectFileIO.h ProjectFileIORegistry.cpp \
ProjectFSCK.cpp ProjectFSCK.h ProjectHistory.cpp \ ProjectFileIORegistry.h ProjectFSCK.cpp ProjectFSCK.h \
ProjectHistory.h ProjectManager.cpp ProjectManager.h \ ProjectHistory.cpp ProjectHistory.h ProjectManager.cpp \
ProjectSettings.cpp ProjectSettings.h ProjectWindow.cpp \ ProjectManager.h ProjectSettings.cpp ProjectSettings.h \
ProjectWindow.h RealFFTf.cpp RealFFTf.h RealFFTf48x.cpp \ ProjectWindow.cpp ProjectWindow.h RealFFTf.cpp RealFFTf.h \
RealFFTf48x.h RefreshCode.h Resample.cpp Resample.h \ RealFFTf48x.cpp RealFFTf48x.h RefreshCode.h Resample.cpp \
RevisionIdent.h RingBuffer.cpp RingBuffer.h Screenshot.cpp \ Resample.h RevisionIdent.h RingBuffer.cpp RingBuffer.h \
Screenshot.h SelectedRegion.cpp SelectedRegion.h \ Screenshot.cpp Screenshot.h SelectedRegion.cpp \
SelectionState.cpp SelectionState.h Shuttle.cpp Shuttle.h \ SelectedRegion.h SelectionState.cpp SelectionState.h \
ShuttleGetDefinition.cpp ShuttleGetDefinition.h ShuttleGui.cpp \ Shuttle.cpp Shuttle.h ShuttleGetDefinition.cpp \
ShuttleGui.h ShuttlePrefs.cpp ShuttlePrefs.h Snap.cpp Snap.h \ ShuttleGetDefinition.h ShuttleGui.cpp ShuttleGui.h \
ShuttlePrefs.cpp ShuttlePrefs.h Snap.cpp Snap.h \
SoundActivatedRecord.cpp SoundActivatedRecord.h Spectrum.cpp \ SoundActivatedRecord.cpp SoundActivatedRecord.h Spectrum.cpp \
Spectrum.h SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \ Spectrum.h SplashDialog.cpp SplashDialog.h SseMathFuncs.cpp \
SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \ SseMathFuncs.h Tags.cpp Tags.h Theme.cpp Theme.h \
@ -2522,6 +2525,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-AudacityLogger.Po@am__quote@ @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-AudioIO.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-AutoRecovery.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-BatchCommandDialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-BatchCommands.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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-BatchProcessDialog.Po@am__quote@
@ -3380,6 +3384,20 @@ audacity-AutoRecovery.obj: AutoRecovery.cpp
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @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-AutoRecovery.obj `if test -f 'AutoRecovery.cpp'; then $(CYGPATH_W) 'AutoRecovery.cpp'; else $(CYGPATH_W) '$(srcdir)/AutoRecovery.cpp'; fi` @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 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_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 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-BatchCommandDialog.Tpo $(DEPDIR)/audacity-BatchCommandDialog.Po

View File

@ -130,6 +130,7 @@
<ClCompile Include="..\..\..\src\AudacityLogger.cpp" /> <ClCompile Include="..\..\..\src\AudacityLogger.cpp" />
<ClCompile Include="..\..\..\src\AudioIO.cpp" /> <ClCompile Include="..\..\..\src\AudioIO.cpp" />
<ClCompile Include="..\..\..\src\AutoRecovery.cpp" /> <ClCompile Include="..\..\..\src\AutoRecovery.cpp" />
<ClCompile Include="..\..\..\src\AutoRecoveryDialog.cpp" />
<ClCompile Include="..\..\..\src\BatchCommandDialog.cpp" /> <ClCompile Include="..\..\..\src\BatchCommandDialog.cpp" />
<ClCompile Include="..\..\..\src\BatchCommands.cpp" /> <ClCompile Include="..\..\..\src\BatchCommands.cpp" />
<ClCompile Include="..\..\..\src\BatchProcessDialog.cpp" /> <ClCompile Include="..\..\..\src\BatchProcessDialog.cpp" />
@ -504,6 +505,7 @@
<ClInclude Include="..\..\..\src\AudioIO.h" /> <ClInclude Include="..\..\..\src\AudioIO.h" />
<ClInclude Include="..\..\..\src\AudioIOListener.h" /> <ClInclude Include="..\..\..\src\AudioIOListener.h" />
<ClInclude Include="..\..\..\src\AutoRecovery.h" /> <ClInclude Include="..\..\..\src\AutoRecovery.h" />
<ClInclude Include="..\..\..\src\AutoRecoveryDialog.h" />
<ClInclude Include="..\..\..\src\BatchCommandDialog.h" /> <ClInclude Include="..\..\..\src\BatchCommandDialog.h" />
<ClInclude Include="..\..\..\src\BatchCommands.h" /> <ClInclude Include="..\..\..\src\BatchCommands.h" />
<ClInclude Include="..\..\..\src\BatchProcessDialog.h" /> <ClInclude Include="..\..\..\src\BatchProcessDialog.h" />

View File

@ -131,6 +131,9 @@
<ClCompile Include="..\..\..\src\AutoRecovery.cpp"> <ClCompile Include="..\..\..\src\AutoRecovery.cpp">
<Filter>src</Filter> <Filter>src</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\..\src\AutoRecoveryDialog.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\BatchCommandDialog.cpp"> <ClCompile Include="..\..\..\src\BatchCommandDialog.cpp">
<Filter>src</Filter> <Filter>src</Filter>
</ClCompile> </ClCompile>
@ -1204,6 +1207,9 @@
<ClInclude Include="..\..\..\src\AutoRecovery.h"> <ClInclude Include="..\..\..\src\AutoRecovery.h">
<Filter>src</Filter> <Filter>src</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\..\src\AutoRecoveryDialog.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\BatchCommandDialog.h"> <ClInclude Include="..\..\..\src\BatchCommandDialog.h">
<Filter>src</Filter> <Filter>src</Filter>
</ClInclude> </ClInclude>