| 65 | END_EVENT_TABLE() |
| 66 | |
| 67 | LangChoiceDialog::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 | |
| 99 | void LangChoiceDialog::OnOk(wxCommandEvent & WXUNUSED(event)) |
| 100 | { |
nothing calls this directly
no test coverage detected