summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-11-04 20:40:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-11-04 20:40:25 +0300
commitbf8ab82826fd61cb64f4913322f1b6bf584a86f8 (patch)
tree7fd30c8322375df27087771705a6768f6349b9a6 /plugins/TabSRMM
parentd2fb94b7177ae475ca177ac7e69bac9d28d5a86d (diff)
fixes #2608 (TabSRMM: make Ctrl+K hotkey customizable)
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp1
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp12
-rw-r--r--plugins/TabSRMM/src/msgs.h1
3 files changed, 5 insertions, 9 deletions
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index f395031df3..d8e6a59db1 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -46,6 +46,7 @@ static HOTKEYDESC _hotkeydescs[] = {
{ "tabsrmm_copts", LPGEN("Container options"), TABSRMM_HK_SECTION_GENERIC, nullptr, HOTKEYCODE(HOTKEYF_CONTROL, 'O'), 0, TABSRMM_HK_CONTAINEROPTIONS },
{ "tabsrmm_sendfile", LPGEN("Send a file"), TABSRMM_HK_SECTION_IM, nullptr, HOTKEYCODE(HOTKEYF_ALT, 'F'), 0, TABSRMM_HK_SENDFILE },
{ "tabsrmm_quote", LPGEN("Quote message"), TABSRMM_HK_SECTION_IM, nullptr, HOTKEYCODE(HOTKEYF_ALT, 'Q'), 0, TABSRMM_HK_QUOTEMSG },
+ { "tabsrmm_clear", LPGEN("Clear message area"), TABSRMM_HK_SECTION_IM, nullptr, HOTKEYCODE(HOTKEYF_CONTROL, 'K'), 0, TABSRMM_HK_CLEARMSG },
{ "tabsrmm_sendlater", LPGEN("Toggle send later"), TABSRMM_HK_SECTION_IM, nullptr, HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'S'), 0, TABSRMM_HK_TOGGLESENDLATER },
{ "tabsrmm_send", LPGEN("Send message"), TABSRMM_HK_SECTION_GENERIC, nullptr, 0, 0, TABSRMM_HK_SEND },
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index b2171a9169..6dcc92760c 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -1404,6 +1404,9 @@ int CMsgDialog::OnFilter(MSGFILTER *pFilter)
case TABSRMM_HK_QUOTEMSG:
SendMessage(m_hwnd, WM_COMMAND, IDC_QUOTE, 0);
return _dlgReturn(m_hwnd, 1);
+ case TABSRMM_HK_CLEARMSG:
+ m_message.SetText(L"");
+ return _dlgReturn(m_hwnd, 1);
case TABSRMM_HK_USERMENU:
SendMessage(m_hwnd, WM_COMMAND, IDC_PROTOCOL, 0);
return _dlgReturn(m_hwnd, 1);
@@ -1889,15 +1892,6 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
if (!isAlt && !isCtrl && !m_pContainer->m_flags.m_bNoSound && wParam != VK_ESCAPE && !(wParam == VK_TAB && PluginConfig.m_bAllowTab))
Skin_PlaySound("SoundOnTyping");
-
- if (isCtrl && !isAlt) {
- switch (wParam) {
- case 0x0b:
- if (!isChat())
- m_message.SetText(L"");
- return 0;
- }
- }
break;
case WM_MOUSEWHEEL:
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index b1027bb849..15e2dc0b65 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -1009,6 +1009,7 @@ struct SIDEBARITEM
#define TABSRMM_HK_SENDFILE 12
#define TABSRMM_HK_QUOTEMSG 13
#define TABSRMM_HK_SEND 14
+#define TABSRMM_HK_CLEARMSG 15
#define TABARMM_HK_TOGGLEINFOPANEL 16
#define TABSRMM_HK_HISTORY 17
#define TABSRMM_HK_TOGGLETOOLBAR 18