Skip to content

Commit 9c89295

Browse files
authored
Do not call CoInitialize unless native speller was used (#327)
1 parent 3d522d2 commit 9c89295

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

src/spellers/SpellerContainer.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ void SpellerContainer::add_to_dictionary(std::wstring wstr) {
100100
SpellerContainer::SpellerContainer(const Settings *settings, const NppData *npp_data)
101101
: m_settings(*settings) {
102102
init_spellers(*npp_data);
103-
m_native_speller->init(); // just to allow checking if it's available or not
104103
m_settings.settings_changed.connect([this] { on_settings_changed(); });
105104
}
106105

src/ui/SettingsDialog.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -814,15 +814,6 @@ void SimpleSettingsTab::update_controls(const Settings &settings, const SpellerC
814814
Button_SetCheck(m_h_select_misspelled_on_menu_cb, settings.data.select_word_on_context_menu_click);
815815
}
816816

817-
void SimpleSettingsTab::init_speller_id_combobox(const SpellerContainer &speller_container) {
818-
m_speller_cmb.clear();
819-
for (auto id : enum_range<SpellerId>()) {
820-
if (id == SpellerId::native && !speller_container.native_speller().is_working())
821-
continue;
822-
m_speller_cmb.add_item(id);
823-
}
824-
}
825-
826817
void SettingsDialog::update_rect_offset_due_to_buttons(RECT &rc) {
827818
auto ok_hwnd = GetDlgItem(_hSelf, IDOK);
828819
RECT ok_rect;
@@ -842,7 +833,6 @@ INT_PTR SettingsDialog::run_dlg_proc(UINT message, WPARAM w_param, LPARAM l_para
842833

843834
m_simple_dlg.init_settings(_hInst, _hSelf);
844835
m_simple_dlg.create(IDD_SIMPLE, false, false);
845-
m_simple_dlg.init_speller_id_combobox(m_speller_container);
846836
m_simple_dlg.display();
847837
m_advanced_dlg.init(_hInst, _hSelf);
848838
m_advanced_dlg.create(IDD_ADVANCED, false, false);

0 commit comments

Comments
 (0)