| 564 | } |
| 565 | |
| 566 | void 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 |
nothing calls this directly
no test coverage detected