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

Function init_needed_dialogs

src/plugin/Plugin.cpp:830–858  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

828// Please let me know if you need to access to some messages :
829
830void init_needed_dialogs(WPARAM w_param) {
831 // A little bit of code duplication here :(
832 auto menu_id = w_param;
833 if ((!get_use_allocated_ids() && HIBYTE(menu_id) != menu_id::plguin_menu && HIBYTE(menu_id) != menu_id::language_menu) ||
834 (get_use_allocated_ids() && (static_cast<int>(menu_id) < get_context_menu_id_start() || static_cast<int>(menu_id) > get_context_menu_id_start() + 350)))
835 return;
836 int used_menu_id;
837 if (get_use_allocated_ids()) {
838 used_menu_id = (static_cast<int>(menu_id) < get_langs_menu_id_start() ? menu_id::plguin_menu : menu_id::language_menu);
839 } else {
840 used_menu_id = HIBYTE(menu_id);
841 }
842 switch (used_menu_id) {
843 case menu_id::language_menu:
844 WPARAM result;
845 if (!get_use_allocated_ids())
846 result = LOBYTE(menu_id);
847 else
848 result = menu_id - get_langs_menu_id_start();
849 if (result == menu_id::download_dictionaries)
850 download_dics_dlg->do_dialog();
851 else if (result == menu_id::customize_multiple_languages) {
852 get_lang_list()->do_dialog();
853 } else if (result == menu_id::remove_dictionaries) {
854 get_remove_dics()->do_dialog();
855 }
856 break;
857 }
858}
859
860extern "C" __declspec(dllexport) LRESULT
861// ReSharper disable once CppInconsistentNaming

Callers 1

messageProcFunction · 0.85

Calls 6

get_use_allocated_idsFunction · 0.85
get_langs_menu_id_startFunction · 0.85
get_lang_listFunction · 0.85
get_remove_dicsFunction · 0.85
do_dialogMethod · 0.45

Tested by

no test coverage detected