MCPcopy Create free account
hub / github.com/audacity/audacity / ChangeOK

Method ChangeOK

src/BatchProcessDialog.cpp:831–858  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

829
830
831bool MacrosWindow::ChangeOK()
832{
833 if (mChanged) {
834 int id;
835
836 auto title = XO("%s changed").Format( mActiveMacro );
837 auto msg = XO("Do you want to save the changes?");
838
839 id = AudacityMessageBox(
840 msg,
841 title,
842 wxYES_NO | wxCANCEL);
843 if (id == wxCANCEL) {
844 return false;
845 }
846
847 if (id == wxYES) {
848 if (!mMacroCommands.WriteMacro(mActiveMacro)) {
849 return false;
850 }
851 }
852
853 mChanged = false;
854 mSave->Enable( mChanged );
855 }
856
857 return true;
858}
859/// An item in the macros list has been selected.
860void MacrosWindow::OnMacroSelected(wxListEvent & event)
861{

Callers

nothing calls this directly

Calls 3

AudacityMessageBoxFunction · 0.85
WriteMacroMethod · 0.80
EnableMethod · 0.45

Tested by

no test coverage detected