From 312527636ef61001c77fc452fa5a0d31a8c6ee69 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 15 Apr 2018 15:26:58 +0300 Subject: suddenly chkCtrlSupport lost a link with g_dat.bCtrlSupport in StdMsg's options --- src/core/stdmsg/src/msgdialog.cpp | 47 ++++++++++++++++++++------------------ src/core/stdmsg/src/msgoptions.cpp | 1 + 2 files changed, 26 insertions(+), 22 deletions(-) (limited to 'src/core') diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index c7547331b9..e179f4a978 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -703,33 +703,36 @@ LRESULT CSrmmWindow::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) return 0; } - if (wParam == VK_UP && isCtrl && g_dat.bCtrlSupport && !g_dat.bAutoClose) { - if (m_cmdList.getCount()) { - if (m_cmdListInd < 0) { - m_cmdListInd = m_cmdList.getCount() - 1; - SetEditorText(m_message.GetHwnd(), m_cmdList[m_cmdListInd]); - } - else if (m_cmdListInd > 0) { - SetEditorText(m_message.GetHwnd(), m_cmdList[--m_cmdListInd]); + if (isCtrl && g_dat.bCtrlSupport && !g_dat.bAutoClose) { + if (wParam == VK_UP) { + if (m_cmdList.getCount()) { + if (m_cmdListInd < 0) { + m_cmdListInd = m_cmdList.getCount() - 1; + SetEditorText(m_message.GetHwnd(), m_cmdList[m_cmdListInd]); + } + else if (m_cmdListInd > 0) { + SetEditorText(m_message.GetHwnd(), m_cmdList[--m_cmdListInd]); + } } + m_btnOk.Enable(GetWindowTextLength(m_message.GetHwnd()) != 0); + UpdateReadChars(); + return 0; } - m_btnOk.Enable(GetWindowTextLength(m_message.GetHwnd()) != 0); - UpdateReadChars(); - return 0; - } - if (wParam == VK_DOWN && isCtrl && g_dat.bCtrlSupport && !g_dat.bAutoClose) { - if (m_cmdList.getCount() && m_cmdListInd >= 0) { - if (m_cmdListInd < m_cmdList.getCount() - 1) - SetEditorText(m_message.GetHwnd(), m_cmdList[++m_cmdListInd]); - else { - m_cmdListInd = -1; - SetEditorText(m_message.GetHwnd(), m_cmdList[m_cmdList.getCount() - 1]); + if (wParam == VK_DOWN) { + if (m_cmdList.getCount() && m_cmdListInd >= 0) { + if (m_cmdListInd < m_cmdList.getCount() - 1) + SetEditorText(m_message.GetHwnd(), m_cmdList[++m_cmdListInd]); + else { + m_cmdListInd = -1; + SetEditorText(m_message.GetHwnd(), m_cmdList[m_cmdList.getCount() - 1]); + } } - } - m_btnOk.Enable(GetWindowTextLength(m_message.GetHwnd()) != 0); - UpdateReadChars(); + m_btnOk.Enable(GetWindowTextLength(m_message.GetHwnd()) != 0); + UpdateReadChars(); + return 0; + } } if (ProcessHotkeys(wParam, isShift, isCtrl, isAlt)) diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index da0ddf36f6..0c8bbf0e74 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -238,6 +238,7 @@ public: CreateLink(chkCharCount, g_dat.bShowReadChar); CreateLink(chkStatusWin, g_dat.bUseStatusWinIcon); CreateLink(chkShowButtons, g_dat.bShowButtons); + CreateLink(chkCtrlSupport, g_dat.bCtrlSupport); CreateLink(chkSendOnEnter, g_dat.bSendOnEnter); CreateLink(chkSendOnDblEnter, g_dat.bSendOnDblEnter); CreateLink(chkSavePerContact, g_dat.bSavePerContact); -- cgit v1.2.3