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

Method LangChoiceDialog

src/LangChoice.cpp:67–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65END_EVENT_TABLE()
66
67LangChoiceDialog::LangChoiceDialog(wxWindow * parent,
68 wxWindowID id,
69 const TranslatableString & title):
70 wxDialogWrapper(parent, id, title)
71{
72 SetName();
73 const auto &paths = FileNames::AudacityPathList();
74 Languages::GetLanguages(paths, mLangCodes, mLangNames);
75 int lang = make_iterator_range( mLangCodes )
76 .index( Languages::GetSystemLanguageCode(paths) );
77
78 ShuttleGui S(this, eIsCreating);
79
80 S.StartVerticalLay(false);
81 {
82 S.StartHorizontalLay();
83 {
84 S.SetBorder(15);
85 mChoice = S.AddChoice(XXO("Choose Language for Audacity to use:"),
86 mLangNames,
87 lang);
88 }
89 S.EndVerticalLay();
90
91 S.SetBorder(0);
92 S.AddStandardButtons(eOkButton);
93 }
94 S.EndVerticalLay();
95
96 Fit();
97}
98
99void LangChoiceDialog::OnOk(wxCommandEvent & WXUNUSED(event))
100{

Callers

nothing calls this directly

Calls 5

GetLanguagesFunction · 0.85
make_iterator_rangeFunction · 0.85
GetSystemLanguageCodeFunction · 0.85
AddChoiceMethod · 0.80
indexMethod · 0.45

Tested by

no test coverage detected