diff options
author | George Hazan <ghazan@miranda.im> | 2017-07-30 17:30:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-07-30 17:30:39 +0300 |
commit | 6fad3235de6bec045fec19a7265e19e880ac84e2 (patch) | |
tree | ea375f721c2cc7e586142ccd0298b096a7a5b31f /plugins/SpellChecker | |
parent | 4aab3b6bc3d66ade09b25649d389b8aef358bfbd (diff) |
Hotkeys: code cleaning
Diffstat (limited to 'plugins/SpellChecker')
-rw-r--r-- | plugins/SpellChecker/src/spellchecker.cpp | 6 | ||||
-rw-r--r-- | plugins/SpellChecker/src/utils.cpp | 9 |
2 files changed, 5 insertions, 10 deletions
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index 63d7ab3304..4726369e2b 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -211,10 +211,10 @@ static int ModulesLoaded(WPARAM, LPARAM) Srmm_AddIcon(&sid); } - HOTKEYDESC hkd = { sizeof(hkd) }; + HOTKEYDESC hkd = {}; hkd.pszName = "Spell Checker/Toggle"; - hkd.pszSection = LPGEN("Spell Checker"); - hkd.pszDescription = LPGEN("Enable/disable spell checker"); + hkd.szSection.a = LPGEN("Spell Checker"); + hkd.szDescription.a = LPGEN("Enable/disable spell checker"); hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT | HOTKEYF_ALT, 'S'); hkd.lParam = HOTKEY_ACTION_TOGGLE; Hotkey_Register(&hkd); diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 6c1e6dd82c..0c62b9e307 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -552,13 +552,8 @@ LRESULT CALLBACK EditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return -1;
// Hotkey support
- MSG msgData = { 0 };
- msgData.hwnd = hwnd;
- msgData.message = msg;
- msgData.wParam = wParam;
- msgData.lParam = lParam;
-
- int action = CallService(MS_HOTKEY_CHECK, (WPARAM)&msgData, (LPARAM)"Spell Checker");
+ MSG msgData = { hwnd, msg, wParam, lParam };
+ int action = Hotkey_Check(&msgData, "Spell Checker");
if (action == HOTKEY_ACTION_TOGGLE) {
ToggleEnabled(dlg);
return 1;
|