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/QuickContacts/src/quickcontacts.cpp | |
parent | 4aab3b6bc3d66ade09b25649d389b8aef358bfbd (diff) |
Hotkeys: code cleaning
Diffstat (limited to 'plugins/QuickContacts/src/quickcontacts.cpp')
-rw-r--r-- | plugins/QuickContacts/src/quickcontacts.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index 499005b6ae..d6b05ccb77 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -122,12 +122,11 @@ int ModulesLoaded(WPARAM, LPARAM) hasNewHotkeyModule = TRUE;
- HOTKEYDESC hkd = {0};
- hkd.cbSize = sizeof(hkd);
+ HOTKEYDESC hkd = {};
hkd.dwFlags = HKD_UNICODE;
hkd.pszName = "Quick Contacts/Open dialog";
- hkd.pwszDescription = LPGENW("Open dialog");
- hkd.pwszSection = LPGENW("Quick Contacts");
+ hkd.szDescription.w = LPGENW("Open dialog");
+ hkd.szSection.w = LPGENW("Quick Contacts");
hkd.pszService = MS_QC_SHOW_DIALOG;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_ALT, 'Q');
Hotkey_Register(&hkd);
@@ -137,37 +136,37 @@ int ModulesLoaded(WPARAM, LPARAM) hkd.lParam = HOTKEY_FILE;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'F');
hkd.pszName = "Quick Contacts/File";
- hkd.pwszDescription = LPGENW("Send file");
+ hkd.szDescription.w = LPGENW("Send file");
Hotkey_Register(&hkd);
hkd.lParam = HOTKEY_URL;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'U');
hkd.pszName = "Quick Contacts/URL";
- hkd.pwszDescription = LPGENW("Send URL");
+ hkd.szDescription.w = LPGENW("Send URL");
Hotkey_Register(&hkd);
hkd.lParam = HOTKEY_INFO;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'I');
hkd.pszName = "Quick Contacts/Info";
- hkd.pwszDescription = LPGENW("Open user info");
+ hkd.szDescription.w = LPGENW("Open user info");
Hotkey_Register(&hkd);
hkd.lParam = HOTKEY_HISTORY;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'H');
hkd.pszName = "Quick Contacts/History";
- hkd.pwszDescription = LPGENW("Open history");
+ hkd.szDescription.w = LPGENW("Open history");
Hotkey_Register(&hkd);
hkd.lParam = HOTKEY_MENU;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'M');
hkd.pszName = "Quick Contacts/Menu";
- hkd.pwszDescription = LPGENW("Open contact menu");
+ hkd.szDescription.w = LPGENW("Open contact menu");
Hotkey_Register(&hkd);
hkd.lParam = HOTKEY_ALL_CONTACTS;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'A');
hkd.pszName = "Quick Contacts/All Contacts";
- hkd.pwszDescription = LPGENW("Show all contacts");
+ hkd.szDescription.w = LPGENW("Show all contacts");
Hotkey_Register(&hkd);
if (ServiceExists(MS_SKIN_ADDHOTKEY))
@@ -641,7 +640,7 @@ LRESULT CALLBACK HookProc(int code, WPARAM, LPARAM lparam) MSG *msg = (MSG*)lparam;
if (hasNewHotkeyModule) {
- int action = CallService(MS_HOTKEY_CHECK, (WPARAM) msg, (LPARAM) "Quick Contacts");
+ int action = Hotkey_Check(msg, "Quick Contacts");
if (action != 0)
{
SendMessage(hwndMain, WM_COMMAND, action, 0);
|