summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-11-05 19:23:27 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-11-05 19:23:31 +0300
commita716ef2bcd976387000014ad2bdd7c94df396624 (patch)
tree5bb777e6fedd092e026cf6275e8a5eb8aed8298e /plugins/TabSRMM/src
parent8b9c5a4f77a35712d5bf54aa5cf44c261f8ecadc (diff)
fixes #3091 (StdMsg/Scriver: Get rid of all hardcoded hotkeys)
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp4
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp16
-rw-r--r--plugins/TabSRMM/src/msgs.h5
3 files changed, 1 insertions, 24 deletions
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index 54b77c5bb5..06360ceaba 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -60,10 +60,6 @@ static HOTKEYDESC _hotkeydescs[] = {
{ "tabsrmm_msend", LPGEN("Toggle multi send"), TABSRMM_HK_SECTION_IM, nullptr, HOTKEYCODE(HOTKEYF_ALT | HOTKEYF_CONTROL, 'M'), 0, TABSRMM_HK_TOGGLEMULTISEND },
{ "tabsrmm_clearlog", LPGEN("Clear message log"), TABSRMM_HK_SECTION_GENERIC, nullptr, HOTKEYCODE(HOTKEYF_CONTROL, 'L'), 0, TABSRMM_HK_CLEARLOG },
{ "tabsrmm_sbar", LPGEN("Collapse side bar"), TABSRMM_HK_SECTION_GENERIC, nullptr, HOTKEYCODE(0, VK_F9), 0, TABSRMM_HK_TOGGLESIDEBAR },
- { "tabsrmm_muc_cmgr", LPGEN("Channel manager"), TABSRMM_HK_SECTION_GC, nullptr, HOTKEYCODE(HOTKEYF_SHIFT | HOTKEYF_CONTROL, 'C'), 0, TABSRMM_HK_CHANNELMGR },
- { "tabsrmm_muc_filter", LPGEN("Toggle filter"), TABSRMM_HK_SECTION_GC, nullptr, HOTKEYCODE(HOTKEYF_SHIFT | HOTKEYF_CONTROL, 'F'), 0, TABSRMM_HK_FILTERTOGGLE },
- { "tabsrmm_muc_nick", LPGEN("Toggle nick list"), TABSRMM_HK_SECTION_GC, nullptr, HOTKEYCODE(HOTKEYF_SHIFT | HOTKEYF_CONTROL, 'N'), 0, TABSRMM_HK_LISTTOGGLE },
- { "tabsrmm_muc_server_show", LPGEN("Show server window"), TABSRMM_HK_SECTION_GC, nullptr, HOTKEYCODE(HOTKEYF_SHIFT | HOTKEYF_CONTROL, '1'), 0, TABSRMM_HK_MUC_SHOWSERVER },
{ "tabsrmm_close_other", LPGEN("Close other tabs"), TABSRMM_HK_SECTION_GENERIC, nullptr, HOTKEYCODE(HOTKEYF_ALT | HOTKEYF_CONTROL, 'W'), 0, TABSRMM_HK_CLOSE_OTHER },
};
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index b213fa3964..6502f247dd 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -1413,25 +1413,11 @@ int CMsgDialog::OnFilter(MSGFILTER *pFilter)
if ((msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN) && !(GetKeyState(VK_RMENU) & 0x8000)) {
MSG message = { m_hwnd, msg, wp, lp };
- LRESULT mim_hotkey_check = Hotkey_Check(&message, isChat() ? TABSRMM_HK_SECTION_GC : TABSRMM_HK_SECTION_IM);
+ LRESULT mim_hotkey_check = Hotkey_Check(&message, TABSRMM_HK_SECTION_IM);
if (mim_hotkey_check)
m_bkeyProcessed = true;
switch (mim_hotkey_check) {
- case TABSRMM_HK_CHANNELMGR:
- m_btnChannelMgr.Click();
- return _dlgReturn(m_hwnd, 1);
- case TABSRMM_HK_FILTERTOGGLE:
- m_btnFilter.Click();
- InvalidateRect(m_btnFilter.GetHwnd(), nullptr, TRUE);
- return _dlgReturn(m_hwnd, 1);
- case TABSRMM_HK_LISTTOGGLE:
- m_btnNickList.Click();
- return _dlgReturn(m_hwnd, 1);
- case TABSRMM_HK_MUC_SHOWSERVER:
- if (m_si->iType != GCW_SERVER)
- Chat_DoEventHook(m_si, GC_USER_MESSAGE, nullptr, L"/servershow", 0);
- return _dlgReturn(m_hwnd, 1);
case TABSRMM_HK_SETUSERPREFS:
CallService(MS_TABMSG_SETUSERPREFS, m_hContact, 0);
return _dlgReturn(m_hwnd, 1);
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index 87f700e74e..7e50a8bf61 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -994,17 +994,12 @@ struct SIDEBARITEM
#define TABSRMM_HK_CLEARLOG 24
#define TABSRMM_HK_TOGGLESENDLATER 25
#define TABSRMM_HK_TOGGLESIDEBAR 26
-#define TABSRMM_HK_CHANNELMGR 27
-#define TABSRMM_HK_FILTERTOGGLE 28
-#define TABSRMM_HK_LISTTOGGLE 29
-#define TABSRMM_HK_MUC_SHOWSERVER 30
#define TABSRMM_HK_CLOSE_OTHER 31
#define TABSRMM_HK_SENDMENU 32
#define TABSRMM_HK_PROTOMENU 33
#define TABSRMM_HK_SECTION_IM LPGEN("Message windows - IM")
#define TABSRMM_HK_SECTION_GENERIC LPGEN("Message windows - all")
-#define TABSRMM_HK_SECTION_GC LPGEN("Message windows - group chats")
// encryption status bar indicator
#define MSG_ICON_MODULE " TabSrmm"