summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-11-19 16:12:15 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-11-19 16:12:15 +0300
commitc71d9d80faa0bf5beb9ea9fdb940396862463c02 (patch)
tree6393790f09f9e3627fb1d0ad6242cdb4dbab5045 /src
parent218dfe41695891debd86980de6035e6a551dff1b (diff)
fixes #2610 (Message plugins: add abitity to Ctrl+V file)
Diffstat (limited to 'src')
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp11
-rw-r--r--src/mir_app/src/srmm_base.cpp14
2 files changed, 12 insertions, 13 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 354c740b45..400a87a368 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -1072,6 +1072,7 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
return 0;
}
+ case EM_PASTESPECIAL:
case WM_PASTE:
if (IsClipboardFormatAvailable(CF_HDROP)) {
if (OpenClipboard(m_message.GetHwnd())) {
@@ -1154,11 +1155,6 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
return TRUE;
}
- if ((wParam == 45 && isShift || wParam == 0x56 && isCtrl) && !isAlt) { // ctrl-v (paste clean text)
- m_message.SendMsg(EM_PASTESPECIAL, CF_UNICODETEXT, 0);
- return TRUE;
- }
-
if (wParam == VK_TAB && isShift && !isCtrl) { // SHIFT-TAB (go to nick list)
SetFocus(m_nickList.GetHwnd());
return TRUE;
@@ -1183,11 +1179,6 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
}
}
- if (wParam == VK_INSERT && isShift || wParam == 'V' && isCtrl) { // ctrl-v (paste clean text)
- m_message.SendMsg(WM_PASTE, 0, 0);
- return 0;
- }
-
if (isCtrl && g_dat.bCtrlSupport && m_cmdList.getCount()) {
if (wParam == VK_UP && m_cmdListInd != 0) {
if (m_cmdListInd < 0)
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index e672cf5776..86ca47ce4e 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -165,15 +165,15 @@ LRESULT CSrmmBaseDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
case WM_CHAR:
switch (wParam) {
- case 0x02:
+ case 0x02: // ctrl+B
if (m_btnBold.Enabled())
return 1;
break;
- case 0x09:
+ case 0x09: // ctrl+I
if (m_btnItalic.Enabled())
return 1;
break;
- case 0x15:
+ case 0x15: // ctrl+U
if (m_btnUnderline.Enabled())
return 1;
break;
@@ -193,6 +193,14 @@ LRESULT CSrmmBaseDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
break;
case WM_KEYDOWN:
+ if ((GetKeyState(VK_CONTROL) & 0x8000) && wParam == 'V' || (GetKeyState(VK_SHIFT) & 0x8000) && wParam == VK_INSERT) {
+ if (IsClipboardFormatAvailable(CF_HDROP)) {
+ m_message.SendMsg(WM_PASTE, 0, 0);
+ return 0;
+ }
+ }
+ __fallthrough;
+
case WM_SYSKEYDOWN:
if (!(GetKeyState(VK_RMENU) & 0x8000)) {
MSG message = { m_hwnd, msg, wParam, lParam };