mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-02 00:49:33 +02:00
Add File->Reset Menu Item (#ifdeffed out)
An compile-time optional menu item for checking the ResetProjectToEmpty() functionality.
This commit is contained in:
parent
9357c90b43
commit
71005cf125
@ -332,6 +332,13 @@ void AudacityProject::CreateMenusAndCommands()
|
|||||||
AudioIONotBusyFlag,
|
AudioIONotBusyFlag,
|
||||||
AudioIONotBusyFlag);
|
AudioIONotBusyFlag);
|
||||||
|
|
||||||
|
#ifdef EXPERIMENTAL_RESET
|
||||||
|
// Empty the current project and forget its name and path.
|
||||||
|
c->AddItem(wxT("Reset"), XXO("&Reset..."), FN(OnReset), wxT(""),
|
||||||
|
AudioIONotBusyFlag,
|
||||||
|
AudioIONotBusyFlag);
|
||||||
|
#endif
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
CreateRecentFilesMenu(c);
|
CreateRecentFilesMenu(c);
|
||||||
@ -4752,6 +4759,16 @@ void AudacityProject::OnOpen(const CommandContext &WXUNUSED(context) )
|
|||||||
OpenFiles(this);
|
OpenFiles(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// JKC: This is like OnClose, except it emptys the project in place,
|
||||||
|
// rather than createing a new empty project (with new toolbars etc).
|
||||||
|
// It does not test for unsaved changes.
|
||||||
|
// It is not in the menus by default. Its main purpose is/was for
|
||||||
|
// developers checking functionality of ResetProjectToEmpty().
|
||||||
|
void AudacityProject::OnReset(const CommandContext &WXUNUSED(context))
|
||||||
|
{
|
||||||
|
ResetProjectToEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
void AudacityProject::OnClose(const CommandContext &WXUNUSED(context) )
|
void AudacityProject::OnClose(const CommandContext &WXUNUSED(context) )
|
||||||
{
|
{
|
||||||
mMenuClose = true;
|
mMenuClose = true;
|
||||||
|
@ -217,6 +217,7 @@ void OnMacBringAllToFront(const CommandContext &context );
|
|||||||
|
|
||||||
void OnNew(const CommandContext &context );
|
void OnNew(const CommandContext &context );
|
||||||
void OnOpen(const CommandContext &context );
|
void OnOpen(const CommandContext &context );
|
||||||
|
void OnReset(const CommandContext &context);
|
||||||
void OnClose(const CommandContext &context );
|
void OnClose(const CommandContext &context );
|
||||||
void OnSave(const CommandContext &context );
|
void OnSave(const CommandContext &context );
|
||||||
void OnSaveAs(const CommandContext &context );
|
void OnSaveAs(const CommandContext &context );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user