MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / apply

Method apply

src/ui/SelectMultipleLanguagesDialog.cpp:71–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void SelectMultipleLanguagesDialog::apply() {
72 int count = ListBox_GetCount(m_h_lang_list);
73 std::wstring buf;
74 bool first = true;
75 auto langs = m_speller_container.get_available_languages();
76 for (int i = 0; i < count; i++) {
77 if (CheckedListBox_GetCheckState(m_h_lang_list, i)) {
78 if (!first) {
79 buf += L"|";
80 } else
81 first = false;
82
83 buf += langs[i].orig_name;
84 }
85 }
86 {
87 auto mut = m_settings.modify();
88 mut->get_active_multi_languages() = buf;
89 mut->get_active_language() = multiple_language_alias;
90 }
91}
92
93INT_PTR SelectMultipleLanguagesDialog::run_dlg_proc(UINT message, WPARAM w_param, LPARAM /*l_param*/) {
94 switch (message) {

Callers

nothing calls this directly

Calls 2

modifyMethod · 0.45

Tested by

no test coverage detected