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

Method OnFolderBrowse

src/export/ExportFilePanel.cpp:442–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440}
441
442void ExportFilePanel::OnFolderBrowse(wxCommandEvent &event)
443{
444 FileNames::FileTypes fileTypes;
445
446 for(auto [plugin, formatIndex] : ExportPluginRegistry::Get())
447 {
448 const auto formatInfo = plugin->GetFormatInfo(formatIndex);
449 fileTypes.emplace_back(formatInfo.description, formatInfo.extensions);
450 }
451 wxFileDialog fd(this, _("Choose a location to save the exported files"),
452 mFolder->GetValue(),
453 mFullName->GetValue(),
454 FileNames::FormatWildcard(fileTypes),
455 wxFD_SAVE);
456 fd.SetFilterIndex(mFormat->GetSelection());
457
458 if(fd.ShowModal() == wxID_OK)
459 {
460 wxFileName filepath (fd.GetPath());
461 mFolder->SetValue(filepath.GetPath());
462 mFullName->SetValue(filepath.GetFullName());
463 const auto selectedFormat = fd.GetFilterIndex();
464 if(selectedFormat != mFormat->GetSelection())
465 {
466 mFormat->SetSelection(selectedFormat);
467 ChangeFormat(selectedFormat);
468 }
469 }
470}
471
472void ExportFilePanel::OnChannelsChange(wxCommandEvent& event)
473{

Callers

nothing calls this directly

Calls 11

GetFunction · 0.85
SetFilterIndexMethod · 0.80
GetFullNameMethod · 0.80
GetFilterIndexMethod · 0.80
GetFormatInfoMethod · 0.45
GetValueMethod · 0.45
GetSelectionMethod · 0.45
ShowModalMethod · 0.45
GetPathMethod · 0.45
SetValueMethod · 0.45
SetSelectionMethod · 0.45

Tested by

no test coverage detected