summaryrefslogtreecommitdiff
path: root/plugins/BasicHistory/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-07-30 17:30:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-07-30 17:30:39 +0300
commit6fad3235de6bec045fec19a7265e19e880ac84e2 (patch)
treeea375f721c2cc7e586142ccd0298b096a7a5b31f /plugins/BasicHistory/src
parent4aab3b6bc3d66ade09b25649d389b8aef358bfbd (diff)
Hotkeys: code cleaning
Diffstat (limited to 'plugins/BasicHistory/src')
-rw-r--r--plugins/BasicHistory/src/HistoryWindow.cpp2
-rw-r--r--plugins/BasicHistory/src/Options.cpp9
2 files changed, 5 insertions, 6 deletions
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp
index 14de1f2307..b12eafe799 100644
--- a/plugins/BasicHistory/src/HistoryWindow.cpp
+++ b/plugins/BasicHistory/src/HistoryWindow.cpp
@@ -1529,7 +1529,7 @@ bool HistoryWindow::DoHotkey(UINT msg, LPARAM lParam, WPARAM wParam, int window)
message.message = msg;
message.lParam = lParam;
message.wParam = wParam;
- LRESULT mim_hotkey_check = CallService(MS_HOTKEY_CHECK, (WPARAM)&message, (LPARAM)("History"));
+ LRESULT mim_hotkey_check = Hotkey_Check(&message, "History");
switch (mim_hotkey_check) {
case HISTORY_HK_FIND:
SetFocus(findWindow);
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp
index 6b33158851..a5817a06dc 100644
--- a/plugins/BasicHistory/src/Options.cpp
+++ b/plugins/BasicHistory/src/Options.cpp
@@ -178,8 +178,8 @@ struct ColorOptionsList
struct HotkeyOptionsList
{
const char *pszName;
- const wchar_t *pwszDescription;
- const wchar_t *pwszSection;
+ wchar_t *pwszDescription;
+ wchar_t *pwszSection;
const char *pszService;
WORD DefHotKey;
LPARAM lParam;
@@ -240,7 +240,6 @@ void Options::Load(void)
HOTKEYDESC hid = { 0 };
fid.cbSize = sizeof(FontIDW);
cid.cbSize = sizeof(ColourIDW);
- hid.cbSize = sizeof(HOTKEYDESC);
strncpy_s(fid.dbSettingsGroup, "BasicHistory_Fonts", _TRUNCATE);
wcsncpy_s(fid.backgroundGroup, L"History", _TRUNCATE);
wcsncpy_s(fid.group, LPGENW("History"), _TRUNCATE);
@@ -271,8 +270,8 @@ void Options::Load(void)
hid.dwFlags = HKD_UNICODE;
for (int i = 0; i < g_hotkeysSize; ++i) {
hid.pszName = g_HotkeyOptionsList[i].pszName;
- hid.pwszDescription = g_HotkeyOptionsList[i].pwszDescription;
- hid.pwszSection = g_HotkeyOptionsList[i].pwszSection;
+ hid.szDescription.w = g_HotkeyOptionsList[i].pwszDescription;
+ hid.szSection.w = g_HotkeyOptionsList[i].pwszSection;
hid.pszService = g_HotkeyOptionsList[i].pszService;
hid.DefHotKey = g_HotkeyOptionsList[i].DefHotKey;
hid.lParam = g_HotkeyOptionsList[i].lParam;