diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-11 12:34:08 +0200 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-11 12:34:08 +0200 |
commit | 367b1259ad7678495a613cca96665ec8acccb310 (patch) | |
tree | d11c334bc9fb1fd52b964258f2e2050c42ffbeeb /src | |
parent | d0437f358af898fe1a7dddfb0021da3a1a326d3f (diff) |
fixes #1346 (StdMsg: "Send by..." in group chats)
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdmsg/src/chat_options.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_window.cpp | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp index 96bdb59659..2764e3c528 100644 --- a/src/core/stdmsg/src/chat_options.cpp +++ b/src/core/stdmsg/src/chat_options.cpp @@ -31,8 +31,6 @@ struct branch_t }; static branch_t branch1[] = { - { LPGENW("Send message by pressing the 'Enter' key"), "SendOnEnter", 0, true }, - { LPGENW("Send message by pressing the 'Enter' key twice"), "SendOnDblEnter", 0, false }, { LPGENW("Flash window when someone speaks"), "FlashWindow", 0, false }, { LPGENW("Flash window when a word is highlighted"), "FlashWindowHighlight", 0, true }, { LPGENW("Show list of users in the chat room"), "ShowNicklist", 0, true }, diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp index d0104e61c9..a015311e85 100644 --- a/src/core/stdmsg/src/chat_window.cpp +++ b/src/core/stdmsg/src/chat_window.cpp @@ -626,11 +626,11 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) return TRUE; if (wParam == '\n' || wParam == '\r') { - if ((isCtrl != 0) ^ (0 != db_get_b(0, CHAT_MODULE, "SendOnEnter", 1))) { + if ((isCtrl && g_dat.bSendOnCtrlEnter) || (!isCtrl && g_dat.bSendOnEnter)) { m_btnOk.OnClick(&m_btnOk); return 0; } - if (db_get_b(0, CHAT_MODULE, "SendOnDblEnter", 0)) { + if (g_dat.bSendOnDblEnter) { if (m_iLastEnterTime + 2 < time(0)) m_iLastEnterTime = time(0); else { @@ -658,10 +658,10 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) bool isAlt = (GetKeyState(VK_MENU) & 0x8000) != 0; if (wParam == VK_RETURN) { szTabSave[0] = '\0'; - if ((isCtrl != 0) ^ (0 != db_get_b(0, CHAT_MODULE, "SendOnEnter", 1))) + if ((isCtrl && g_dat.bSendOnCtrlEnter) || (!isCtrl && g_dat.bSendOnEnter)) return 0; - if (db_get_b(0, CHAT_MODULE, "SendOnDblEnter", 0)) + if (g_dat.bSendOnDblEnter) if (m_iLastEnterTime + 2 >= time(0)) return 0; |