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

Method DoOnRuleTableSelect

src/prefs/ExtImportPrefs.cpp:465–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463}
464
465void ExtImportPrefs::DoOnRuleTableSelect (int toprow)
466{
467 auto &items = Importer::Get().GetImportItems();
468
469 if (toprow < 0 || toprow >= (int)items.size())
470 {
471 return;
472 }
473
474 ExtImportItem *item = items[toprow].get();
475 PluginList->DeleteAllItems();
476
477 int fcount;
478 fcount = item->filters.size();
479 int shift = 0;
480 for (int i = 0; i < fcount; i++)
481 {
482 if (item->divider == i)
483 {
484 PluginList->InsertItem (i, _("Unused filters:"));
485 PluginList->SetItemData (i, -1);
486 shift = 1;
487 }
488 if (item->filter_objects[i] != NULL)
489 {
490 PluginList->InsertItem (i + shift,
491 item->filter_objects[i]->GetPluginFormatDescription().Translation());
492 }
493 else
494 {
495 PluginList->InsertItem (i + shift, item->filters[i]);
496 }
497 PluginList->SetItemData (i + shift, i);
498 }
499 if (item->divider == -1)
500 {
501 PluginList->InsertItem (fcount, _("Unused filters:"));
502 PluginList->SetItemData (fcount, -1);
503 }
504 wxListItem info;
505 info.SetId (0);
506 info.SetColumn (0);
507 info.SetStateMask (wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED);
508 info.SetState (wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED);
509 info.SetMask (wxLIST_MASK_STATE);
510 PluginList->SetItem (info);
511 PluginList->SetColumnWidth (0, wxLIST_AUTOSIZE);
512 last_selected = toprow;
513}
514
515void ExtImportPrefs::OnRuleTableEdit (wxGridEvent& event)
516{

Callers

nothing calls this directly

Calls 7

GetFunction · 0.85
TranslationMethod · 0.80
SetIdMethod · 0.80
SetStateMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected