diff options
author | George Hazan <ghazan@miranda.im> | 2020-04-10 17:57:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-04-10 17:57:38 +0300 |
commit | 3a1018cabbee215a0ccebe260c4fd1ed5870121e (patch) | |
tree | 1063830551d790424efad183b2d2be3008c18c75 /src/mir_app | |
parent | a1d3e949563298b0d9aec7dd04cffdd054b86bf7 (diff) |
fixes #2312 (Clist Classic - Hotkey for toggling "Disable groups" on contact list, Ctrl+Shift+G by default)
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/keyboard.cpp | 31 | ||||
-rw-r--r-- | src/mir_app/src/menu_groups.cpp | 8 |
2 files changed, 20 insertions, 19 deletions
diff --git a/src/mir_app/src/keyboard.cpp b/src/mir_app/src/keyboard.cpp index 91bdcf3ad8..ba9df7941f 100644 --- a/src/mir_app/src/keyboard.cpp +++ b/src/mir_app/src/keyboard.cpp @@ -50,43 +50,44 @@ static INT_PTR hkOpts(WPARAM, LPARAM) int InitClistHotKeys(void)
{
- CreateServiceFunction("CLIST/HK/SHOWHIDE", hkHideShow);
- CreateServiceFunction("CLIST/HK/Opts", hkOpts);
- CreateServiceFunction("CLIST/HK/Read", hkRead);
-
HOTKEYDESC shk = {};
- shk.dwFlags = HKD_UNICODE;
- shk.szDescription.w = LPGENW("Show/Hide contact list");
+ shk.szSection.a = "Main";
+
+ shk.szDescription.a = LPGEN("Show/Hide contact list");
shk.pszName = "ShowHide";
- shk.szSection.w = L"Main";
shk.pszService = "CLIST/HK/SHOWHIDE";
shk.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'A');
g_plugin.addHotkey(&shk);
+ CreateServiceFunction(shk.pszService, hkHideShow);
- shk.szDescription.w = LPGENW("Read message");
+ shk.szDescription.a = LPGEN("Read message");
shk.pszName = "ReadMessage";
- shk.szSection.w = L"Main";
shk.pszService = "CLIST/HK/Read";
shk.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'I');
g_plugin.addHotkey(&shk);
+ CreateServiceFunction(shk.pszService, hkRead);
- shk.szDescription.w = LPGENW("Open Options page");
+ shk.szDescription.a = LPGEN("Open Options page");
shk.pszName = "ShowOptions";
- shk.szSection.w = L"Main";
shk.pszService = "CLIST/HK/Opts";
shk.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'O') | HKF_MIRANDA_LOCAL;
g_plugin.addHotkey(&shk);
+ CreateServiceFunction(shk.pszService, hkOpts);
+
+ shk.szDescription.a = LPGEN("Toggle groups");
+ shk.pszName = "Togglegroups";
+ shk.pszService = MS_CLIST_TOGGLEGROUPS;
+ shk.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'G');
+ g_plugin.addHotkey(&shk);
- shk.szDescription.w = LPGENW("Open logging options");
+ shk.szDescription.a = LPGEN("Open logging options");
shk.pszName = "ShowLogOptions";
- shk.szSection.w = L"Main";
shk.pszService = "Netlib/Log/Win";
shk.DefHotKey = 0;
g_plugin.addHotkey(&shk);
- shk.szDescription.w = LPGENW("Open 'Find user' dialog");
+ shk.szDescription.a = LPGEN("Open 'Find user' dialog");
shk.pszName = "FindUsers";
- shk.szSection.w = L"Main";
shk.pszService = "FindAdd/FindAddCommand";
shk.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'F') | HKF_MIRANDA_LOCAL;
g_plugin.addHotkey(&shk);
diff --git a/src/mir_app/src/menu_groups.cpp b/src/mir_app/src/menu_groups.cpp index b63144d1be..7cd8978b31 100644 --- a/src/mir_app/src/menu_groups.cpp +++ b/src/mir_app/src/menu_groups.cpp @@ -115,7 +115,7 @@ static INT_PTR UseGroupsHelper(WPARAM, LPARAM) {
int newVal = !(GetWindowLongPtr(g_clistApi.hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
Clist::UseGroups = newVal;
- SendMessage(g_clistApi.hwndContactTree, CLM_SETUSEGROUPS, newVal,0);
+ SendMessage(g_clistApi.hwndContactTree, CLM_SETUSEGROUPS, newVal, 0);
return newVal;
}
@@ -182,7 +182,7 @@ HMENU cliBuildGroupPopupMenu(ClcGroup *group) MIR_APP_DLL(HGENMENU) Menu_AddSubGroupMenuItem(TMO_MenuItem *pmi, GroupMenuParam *gmp)
{
- SubGroupMenuExecParam *mmep = (SubGroupMenuExecParam*)mir_calloc(sizeof(SubGroupMenuExecParam));
+ SubGroupMenuExecParam *mmep = (SubGroupMenuExecParam *)mir_calloc(sizeof(SubGroupMenuExecParam));
if (mmep == nullptr)
return nullptr;
@@ -192,7 +192,7 @@ MIR_APP_DLL(HGENMENU) Menu_AddSubGroupMenuItem(TMO_MenuItem *pmi, GroupMenuParam mmep->Param1 = gmp->wParam;
mmep->Param2 = gmp->lParam;
}
-
+
HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, pmi, mmep);
char buf[1024];
@@ -205,7 +205,7 @@ MIR_APP_DLL(HGENMENU) Menu_AddSubGroupMenuItem(TMO_MenuItem *pmi, GroupMenuParam static INT_PTR SubGroupMenuCheckService(WPARAM wParam, LPARAM)
{
- TCheckProcParam * CParam = (TCheckProcParam*)wParam;
+ TCheckProcParam *CParam = (TCheckProcParam *)wParam;
if (CParam) {
SubGroupMenuExecParam *mmep = (SubGroupMenuExecParam *)(CParam->MenuItemOwnerData);
if (mmep)
|