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

Method OnExport

src/prefs/KeyConfigPrefs.cpp:566–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

564}
565
566void KeyConfigPrefs::OnExport(wxCommandEvent & WXUNUSED(event))
567{
568 wxString file = wxT("Audacity-keys.xml");
569
570 file = SelectFile(FileNames::Operation::Export,
571 XO("Export Keyboard Shortcuts As:"),
572 wxEmptyString,
573 file,
574 wxT("xml"),
575 { FileNames::XMLFiles, FileNames::AllFiles },
576 wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
577 this);
578
579 if (!file) {
580 return;
581 }
582
583 GuardedCall( [&] {
584 XMLFileWriter prefFile{ file, XO("Error Exporting Keyboard Shortcuts") };
585 mManager->WriteXML(prefFile);
586 prefFile.Commit();
587 } );
588}
589
590
591

Callers

nothing calls this directly

Calls 4

SelectFileFunction · 0.85
GuardedCallFunction · 0.85
WriteXMLMethod · 0.45
CommitMethod · 0.45

Tested by

no test coverage detected